Skip to content

Document gotchas with sources generated in actions during sync_release - #1180

Merged
mfocko merged 2 commits into
packit:mainfrom
Nitjsefnie-OSC:docs/911-generated-sources-sync-release
Oct 30, 2026
Merged

mfocko merged 2 commits into
packit:mainfrom
Nitjsefnie-OSC:docs/911-generated-sources-sync-release

Conversation

@Nitjsefnie

@Nitjsefnie Nitjsefnie commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Document the gotcha that actions generating sources during release syncing run once per target dist-git branch: a non-reproducible generator can produce a different archive hash on each run, causing another lookaside upload per branch when that content is absent from the cache and uploads are enabled. The new note recommends making generation reproducible, which lets fedpkg/centpkg avoid uploading a file whose name and hash are already in the cache for the same package, even when Packit still runs the upload step on a branch whose sources file does not list the archive yet, and, where generation cannot be made reproducible, describes checking Fedora's lookaside cache for the archive by name and downloading it instead of generating it again.

Related Issues and Pull Requests

Fixes #911

Changes

  • docs/configuration/examples.md: a note under "Custom archive creation for release syncing" explaining that post-upstream-clone and pre-sync run once per target branch processed by the release-sync loop, that non-reproducible generation (changing timestamps, randomness) can change the archive hash per run and trigger another lookaside upload per branch when that content is absent from the cache and uploads are enabled, that with reproducible generation fedpkg/centpkg avoid uploading a file whose name and hash are already cached for the same package (Packit itself skips the upload step only when every archive is in the cache and listed in the branch's sources file and --force-new-sources is not set), and, for generation that cannot be made reproducible, how to check Fedora's lookaside cache index (https://src.fedoraproject.org/repo/pkgs/<package>/, package name in PACKIT_DOWNSTREAM_PACKAGE_NAME) for the archive by name and reuse it.

Testing

Docs-only change; nothing was executed locally. The Fedora lookaside index path the note names was checked live: https://src.fedoraproject.org/repo/pkgs/packit/ and each level below it down to an archive file returned HTTP 200. Fork CI green on the branch head 23917af: workflow run 40686921149 on the fork, 1 job green, provenance echo naming that SHA. Upstream CI on this PR: Test deployment green (run 40686913554), zuul packit-service/check success, pre-commit.ci pass.

Footer

Generated by GLM-5.3-Flash (brief, orchestration), GPT-6.1 Sol (research, implementation, review), GPT-6 Astra (review), Claude Opus 5.5 (brief, orchestration), GPT-6.1 Terra (implementation)

@centosinfra-prod-github-app

Copy link
Copy Markdown
Contributor

@Nitjsefnie

Copy link
Copy Markdown
Contributor Author

Heads-up: this branch lives in an organization-owned fork, and GitHub doesn't let maintainers push to those. If anything needs changing, just say so here and I'll make the change on this branch right away.

@majamassarini

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 11:27 AM UTC · Completed 11:38 AM UTC

Commit: 57b79c1 · View workflow run →

Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $3.61

@fullsend-ai-review fullsend-ai-review Bot added the risk/low PR risk: low label Oct 28, 2026
@fullsend-ai-review

Copy link
Copy Markdown

<!-- fullsend:risk-assessment -->
Risk Assessment: low (1/5)

Details

This docs-only PR adds 10 lines to one file, with no protected, security-sensitive, CI or dependency paths, from an established non-bot author, and the file has had no commits in 90 days; the weighted composite is 1.47, which rounds to 1.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium

  • [under-engineering] docs/configuration/examples.md:122 — Merging with Fixes #911 closes the issue, but the note does only part of what Document gotchas with sources generated in actions during sync_release #911 asks for. The issue says reproducible source generation "could be hard or even impossible to do". It names a second fix, checking whether the file is already in the lookaside cache before generating it, and then says "Document this". The only fix the note gives is "Make your generation reproducible". The sentence about Packit's content-hash lookaside check (line 123) helps only once the output is already byte-identical. Users who can't make generation reproducible get no advice.
    Remediation: Add the alternative from the issue to the note. For example: if reproducible generation isn't possible, have the post-upstream-clone/pre-sync action check whether the archive already exists in the lookaside cache, or is already listed in the dist-git sources file, and skip generating it in that case. A short example would help. Otherwise, change Fixes #911 to Related to #911 so the issue stays open for the rest of the work.

Low

  • [logic-error] docs/configuration/examples.md:123 — The note tells readers to make generation reproducible and then says that Packit checks the lookaside cache by content hash and skips the upload. Readers may take this to mean Packit's own check prevents duplicate uploads across branches. Lines 124-125 state the skip condition correctly: every archive is already in the cache, every filename is listed in that branch's sources file, and --force-new-sources is not set. In a typical multi-branch release sync, though, each branch's sources file doesn't list the new versioned archive yet. So Packit still runs new-sources for every branch. An identical archive is not uploaded again only because fedpkg/centpkg skip files whose name and hash are already in the cache. Every statement in the note is true, but the note never says where the deduplication actually happens.
    Remediation: Say where the deduplication happens. For example: "With reproducible generation, an archive identical to one already uploaded for another branch is not uploaded again, because fedpkg/centpkg skip files whose name and hash already exist in the lookaside cache. Packit skips the new-sources call entirely only when every archive is already in the cache and listed in the branch's sources file, and --force-new-sources is not set."

Labels: Docs-only change about release-sync and lookaside-cache behaviour for Fedora dist-git, matching the linked issue labels.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.

Comment thread docs/configuration/examples.md Resolved
Comment thread docs/configuration/examples.md Resolved
@fullsend-ai-review fullsend-ai-review Bot added kind/documentation Improvements to docs area/fedora Related to Fedora ecosystem labels Oct 28, 2026
Nitjsefnie and others added 2 commits October 28, 2026 12:49
…ncing

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Signed-off-by: Nitjsefnie <zmatek.peter@gmail.com>
Signed-off-by: Nitjsefnie <zmatek.peter@gmail.com>
Co-Authored-By: GPT-6.1 Terra <noreply@openai.com>
@Nitjsefnie
Nitjsefnie marked this pull request as draft October 28, 2026 12:19
@Nitjsefnie
Nitjsefnie force-pushed the docs/911-generated-sources-sync-release branch from 57b79c1 to 23917af Compare October 28, 2026 12:19
@centosinfra-prod-github-app

ghost commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

@Nitjsefnie
Nitjsefnie marked this pull request as ready for review October 28, 2026 12:24
@mfocko
mfocko merged commit 058ac4d into packit:main Oct 30, 2026
@github-project-automation github-project-automation Bot moved this from New to Done in Packit pull requests Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/fedora Related to Fedora ecosystem kind/documentation Improvements to docs risk/low PR risk: low

Projects

Development

Successfully merging this pull request may close these issues.

Document gotchas with sources generated in actions during sync_release

3 participants