docs: clarify that job-level actions replace top-level actions as a whole#1155
Open
Nitjsefnie wants to merge 1 commit into
Open
docs: clarify that job-level actions replace top-level actions as a whole#1155Nitjsefnie wants to merge 1 commit into
Nitjsefnie wants to merge 1 commit into
Conversation
…hole When a job defines its own `actions`, the whole mapping replaces the top-level `actions` instead of merging per action: actions not listed in the job (e.g. `fix-spec-file`, `post-upstream-clone`) are not inherited and do not run. Add a concrete example on the actions page and a cross-reference from the jobs page. Fixes packit#443 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 09s |
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 behavior was verified against the packit source before documenting, both statically and dynamically:
actionsis aCommonConfigSchemafield, not aJobConfigSchemafield, so inrearrange_jobsit stays inside the raw job dict; the effective package config is built with a shallow dict union (v | job, packitschema.py:882-885and the sibling branches), which replaces the value at theactionskey wholesale — no per-action merge.PackageConfigSchema().load()yields a job whose effective actions are onlycreate-archive; the top-levelfix-spec-file/post-upstream-cloneare absent.So the issue title's guess is confirmed: job-level
actionsreplace the top-level mapping as a whole.Changes:
docs/configuration/actions.md— the existing caution already stated the replace semantics abstractly; this adds the concrete example the issue asks for (the issue's own YAML shape, with a plain statement of which actions actually run when the job triggers), and fixesaction→actionsin the existing sentence.docs/configuration/jobs.md— the "define common options at the top level and only override when needed" sentence is where the merge assumption naturally forms; added one clause + a cross-link to the actions caution.Build gate: the CI pipeline's steps (
make import,yarn install --frozen-lockfile,yarn build) pass locally on this branch —[SUCCESS] Generated static files, cross-link resolves.Disclosure: this contribution was made with AI assistance (Claude); the documented behavior was proven against the packit source and parser rather than assumed.