Repository navigation
Pass config as a command flag for newer EasyP v1 images - #1
Merged
Merged
Conversation
Newer EasyP v1 builds remove the global --cfg flag and take --config after lint/breaking. Detect the placement from the command help in the selected image: keep the global --cfg for v0 and early v1 nightlies, and pass --config after the command otherwise. mod download only gets the config with the global form, since v1 reads protobuf.mod instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
easyp-tech/easyp#241 removes the global
--cfgflag and theEASYP_CFGvariable. In their place,lint,breaking,generate, andvalidate-configeach get their own--config, placed after the command name.Both actions currently pass the
configinput as a global--cfg=…, in front ofmod downloadand in front of the command. With an image built from that change, any workflow that setsconfigfails in the very first step, Download dependencies:Change
Both actions get a new step, Detect config flag placement. It runs only when
configis set, and it calls<command> --helpin the selected image:--configmod downloadgets--cfg=…(as before)--cfg=…(as before)<command> --config=…protobuf.mod/protobuf.lock, not the policyconfigunsetSome implementation details:
grep. Piping straight intogrep -qunderpipefailcould misfire on SIGPIPE.--formatfallback is kept. The command-local config flag is carried into both attempts.easyp.yaml/*.easyp.yaml).Test plan
Tested locally with a small runner that executes the
action.ymlsteps the way GitHub does. It substitutesinputs.*,github.workspaceandsteps.*.outputs.*, and runs each step withbash -eo pipefail.Fixtures were real git repos with an
origin, amainbranch, and a feature commit. The commit adds a lint violation (BadName) and deletes a field. The config is named so that it cannot be discovered without the input:ci.yamlfor v0,ci.easyp.yamlfor v1.v0.17.0FIELD_LOWER_SNAKE_CASEannotation, exit 1 ✅v1.0.0-nightly.20261009.1v0.17.0v1.0.0-nightly.20261009.1FIELD_NO_DELETEannotation, exit 1 ✅FIELD_NO_DELETEannotation, exit 1 ✅config)easyp.yaml, exit 1 with annotations ✅lint/action.yml--cfgusage error ❌ (confirms the regression)Breaking runs on Docker Desktop for macOS occasionally exited 2 with
Repository does not exist in current directory. Both the nightly image and the new build hit this. It happens right after the hostgit fetchrewrites.git, so it is a file-sharing artifact of the local environment, not of this change. GitHub's Linux runners use direct bind mounts.Merge after or together with easyp-tech/easyp#241. The change is safe to merge first, because older images keep the global form.
🤖 Generated with Claude Code