Skip to content

Document that job-level actions replace the whole top-level actions mapping#1154

Closed
Nitjsefnie wants to merge 1 commit into
packit:mainfrom
Nitjsefnie-OSC:docs/443-nested-actions-replace
Closed

Document that job-level actions replace the whole top-level actions mapping#1154
Nitjsefnie wants to merge 1 commit into
packit:mainfrom
Nitjsefnie-OSC:docs/443-nested-actions-replace

Conversation

@Nitjsefnie

Copy link
Copy Markdown
Contributor

Fixes #443.

The existing :::caution on docs/configuration/actions.md stated 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, a copr_build job redefining only create-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:

  • Schema code: JobConfigSchema has no actions field, and rearrange_jobs shallow-merges the job dict over the package config (packit/schema.py:884) — the actions key is overwritten wholesale.
  • Upstream test: tests/unit/config/test_package_config.py:1375-1419 asserts a job's actions drops unlisted top-level actions.
  • Runtime: loaded exactly the example config through PackageConfig.get_from_dict — the job ends up with {create-archive} only.

Also fixes the pre-existing actionactions typo 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.

…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 <[email protected]>
@centosinfra-prod-github-app

Copy link
Copy Markdown
Contributor

@Nitjsefnie

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #1155, which covers the same #443 fix across both affected docs pages (actions.md + jobs.md) — one coherent PR is easier to review.

@Nitjsefnie Nitjsefnie closed this Jul 23, 2026
@github-project-automation github-project-automation Bot moved this from New to Done in Packit pull requests Jul 23, 2026
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