feat: add required default_build_context / default_dockerfile_path inputs#1
feat: add required default_build_context / default_dockerfile_path inputs#1eliran-ops wants to merge 2 commits into
Conversation
…puts The action requires callers to pass two non-empty defaults for build_context and dockerfile_path. Whenever a default would be applied (YAML field absent, config file missing, or service missing), the corresponding default input is emitted. If a default is needed and the input is empty, the action exits 1 with a clear error pointing at the offending input(s). Logging: - ::notice:: when a default is applied for an otherwise-found service (the YAML simply omitted the field; informational) - ::warning:: when the entire config or service is missing and defaults flow through (more prominent - usually a misconfiguration) Tests cover per-field fail-fast, both-empty collect-all error, ::warning:: prefix on not-found paths, and a regression guard that defaults do not leak when the YAML provides a value (57 PASS). Co-authored-by: Cursor <cursoragent@cursor.com>
# Conflicts: # .github/workflows/test.yml # README.md # action.yml # scripts/parse.sh # tests/parse_test.sh
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4bd920f. Configure here.
| echo "default-context outputs OK (empty fallback)" | ||
| echo "default-context outputs OK" | ||
|
|
||
| - name: Run action with caller-supplied default_* fallbacks |
There was a problem hiding this comment.
CI test asserts empty but default will be applied
High Severity
The cfg2 step passes default_build_context: '.' and the fixture smoke-default-context has no buildContext in YAML, so parse.sh will apply the default and emit build_context = ".". But the assertion still expects build_context to be empty (""). The step name was updated to reflect the new behavior ("default_build_context applied"), but the assertion and comments were left unchanged from the old behavior. This will cause the smoke CI job to fail on every PR.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 4bd920f. Configure here.


Summary
Adds two required inputs to the action:
default_build_contextanddefault_dockerfile_path. Whenever the action would otherwise emit an emptybuild_contextordockerfile_path(YAML field absent, config file missing, or service missing), the corresponding default flows through. If the relevant default is empty when needed, the action exits 1 with a clear error pointing at the offending input(s) — uniform rule, no asymmetry.::notice::is emitted when a default is applied for an otherwise-found service (informational; the YAML simply omitted the field).::warning::is emitted when the entire config file or service is missing (more prominent — usually a misconfiguration).The consuming workflow can drop
||fallbacks:Test plan
bash tests/parse_test.sh— 57/57 PASS locallybash tests/metadata_test.sh— PASScfg3smoke step (service-missing fallback) — outputs match assertions::error::ubuntu-latest,macos-latest) — verify on the PR runuses: ./steps (existing service, default-context fallback, missing-service fallback) succeedMade with Cursor
Note
Medium Risk
Breaking change for workflows that omitted the new required inputs or relied on empty build outputs; behavior affects all Docker build callers but improves explicit, fail-fast configuration.
Overview
Makes
default_build_contextanddefault_dockerfile_pathrequired action inputs and changes howbuild_context/dockerfile_pathare produced: whenever YAML omits them, config/service is missing, or values are empty/null, the action emits the caller’s defaults instead of empty strings or implicit".".scripts/parse.shenforces a uniform fail-fast rule—if a default would be used and the matching input is empty, the step exits 1 with::error::(including batched errors when both defaults are needed on not-found paths). Successful fallback paths log::notice::(per-field YAML absent) or::warning::(missing config or service). On success, consumers can rely on non-empty build outputs and drop workflow||fallbacks.action.yml, README, smoke workflow, andtests/parse_test.share updated for the new contract (required inputs, expanded fail-fast/notice/warning coverage, metadata checks).Reviewed by Cursor Bugbot for commit 4bd920f. Bugbot is set up for automated code reviews on this repo. Configure here.