Skip to content

docs: clarify that job-level actions replace top-level actions as a whole#1155

Open
Nitjsefnie wants to merge 1 commit into
packit:mainfrom
Nitjsefnie:docs/443-job-actions-replace
Open

docs: clarify that job-level actions replace top-level actions as a whole#1155
Nitjsefnie wants to merge 1 commit into
packit:mainfrom
Nitjsefnie:docs/443-job-actions-replace

Conversation

@Nitjsefnie

Copy link
Copy Markdown
Contributor

Fixes #443.

The behavior was verified against the packit source before documenting, both statically and dynamically:

  • Statically: actions is a CommonConfigSchema field, not a JobConfigSchema field, so in rearrange_jobs it stays inside the raw job dict; the effective package config is built with a shallow dict union (v | job, packit schema.py:882-885 and the sibling branches), which replaces the value at the actions key wholesale — no per-action merge.
  • Dynamically: loading the issue's exact YAML shape through packit's own PackageConfigSchema().load() yields a job whose effective actions are only create-archive; the top-level fix-spec-file / post-upstream-clone are absent.

So the issue title's guess is confirmed: job-level actions replace 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 fixes actionactions in 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.

…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>
@centosinfra-prod-github-app

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Doc: document that top-level actions are replaced by nested (job) actions (nor merged)

2 participants