Skip to content

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

Merged
centosinfra-prod-github-app[bot] merged 1 commit into
packit:mainfrom
Nitjsefnie-OSC:docs/443-job-actions-replace
Jul 24, 2026
Merged

docs: clarify that job-level actions replace top-level actions as a whole#1155
centosinfra-prod-github-app[bot] merged 1 commit into
packit:mainfrom
Nitjsefnie-OSC: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.

@centosinfra-prod-github-app

Copy link
Copy Markdown
Contributor

…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>
@mfocko mfocko self-assigned this Jul 24, 2026
@mfocko
mfocko force-pushed the docs/443-job-actions-replace branch from 026bfb3 to 0d94a35 Compare July 24, 2026 21:08
@centosinfra-prod-github-app

Copy link
Copy Markdown
Contributor

@mfocko mfocko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot for your contribution.

@mfocko mfocko added the mergeit Merge via Zuul label Jul 24, 2026
@centosinfra-prod-github-app

Copy link
Copy Markdown
Contributor

@centosinfra-prod-github-app
centosinfra-prod-github-app Bot merged commit 135d9ed into packit:main Jul 24, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in Packit pull requests Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mergeit Merge via Zuul

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)

3 participants