Document that job-level actions replace the whole top-level actions mapping#1154
Open
Nitjsefnie wants to merge 1 commit into
Open
Document that job-level actions replace the whole top-level actions mapping#1154Nitjsefnie wants to merge 1 commit into
Nitjsefnie wants to merge 1 commit into
Conversation
…ackit#443) A job that defines its own `actions` replaces the whole top-level `actions` mapping rather than merging per action, so it inherits none of the top-level actions. Add a worked example to the existing caution and fix the `action` -> `actions` typo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 08s |
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.
Fixes #443.
The existing
:::cautionondocs/configuration/actions.mdstated the replacement abstractly; #443 asked for the concrete answer to "is it whole-section replacement or per-key merge?". This expands that same admonition (no restructuring) with a worked example mirroring the issue — three top-level actions, acopr_buildjob redefining onlycreate-archive— and states explicitly that only the job's own actions run.The claim is verified three ways against packit source, not taken from the issue title:
JobConfigSchemahas noactionsfield, andrearrange_jobsshallow-merges the job dict over the package config (packit/schema.py:884) — theactionskey is overwritten wholesale.tests/unit/config/test_package_config.py:1375-1419asserts a job'sactionsdrops unlisted top-level actions.PackageConfig.get_from_dict— the job ends up with{create-archive}only.Also fixes the pre-existing
action→actionstypo in the retained sentence.Gate:
make import+yarn build(the actual PR gate per.github/workflows/test-deploy.yml) — production build succeeds.AI assistance disclosure
Researched and written with AI assistance (Claude); the documented behavior was verified against packit source, an upstream test, and a live schema-load before opening.