Skip to content

Allow SyncRelease to set different source= value#228

Open
kpcyrd wants to merge 5 commits intomainfrom
dbgsym-release-with-different-source
Open

Allow SyncRelease to set different source= value#228
kpcyrd wants to merge 5 commits intomainfrom
dbgsym-release-with-different-source

Conversation

@kpcyrd
Copy link
Copy Markdown
Owner

@kpcyrd kpcyrd commented Apr 1, 2026

This allows a release to use a different mirror base url. This is useful for having -dbgsym as part of the same profile (and benefit from having them grouped with the other builds).

Copilot AI review requested due to automatic review settings April 1, 2026 14:10
@kpcyrd kpcyrd force-pushed the dbgsym-release-with-different-source branch from a4b1fb5 to cef22a9 Compare April 1, 2026 14:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a SyncRelease type that allows each release entry in a sync profile to optionally override the default source mirror URL, enabling use cases like syncing -dbgsym releases from a different mirror while keeping them grouped in the same profile.

Changes:

  • Replaces releases: Vec<String> with releases: Vec<SyncRelease> in config and CLI args.
  • Adds SyncRelease parsing/helpers (name(), base_url()) and updates Debian/Fedora/Tails sync schedulers accordingly.
  • Updates example sync configuration to demonstrate per-release source overrides.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tools/src/schedule/tails.rs Adapts Tails sync to use release.name() instead of assuming String.
tools/src/schedule/fedora.rs Switches Fedora URL building to use SyncRelease helper for release-derived base.
tools/src/schedule/debian.rs Uses release.base_url(...) for index URLs and passes release.name() through sync/import paths.
tools/src/config.rs Introduces SyncRelease (string or { name, source }) and adds TOML parsing tests.
tools/src/args.rs Updates CLI parsing to accept --release as SyncRelease.
contrib/confs/rebuilderd-sync.conf Adds an example profile using per-release source overrides.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 448 to 452
let base_url = release.base_url(&sync.source);

// Downloading source package index
let db_url = format!("{base_url}/{component}/source/Sources.xz");
let bytes = fetch_url_or_path(http, &db_url).await?;
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

Per-release source overrides are used to build base_url for downloading Sources.xz/Packages.xz, but the generated artifact URLs still use sync.source (via SyncState::push(..., &sync.source, ...)). For a debug release with a different mirror, this will produce wrong download URLs. Thread the selected source (override-or-default) through to artifact URL construction (e.g., pass it into import_*/push).

Copilot uses AI. Check for mistakes.
@kpcyrd kpcyrd force-pushed the dbgsym-release-with-different-source branch from cef22a9 to d1e850f Compare April 2, 2026 12:37
Copilot AI review requested due to automatic review settings April 2, 2026 13:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 466 to 472
state.import_compressed_binary_package_file(
&bytes, &sources, release, component, sync,
&bytes,
&sources,
release.name(),
component,
sync,
)?;
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

Debian sync now downloads indices from release.source(&sync.source), but the artifact URLs in reports are still built from sync.source (see SyncState::push via import_binary_pkg). For releases with an overridden source (e.g., debian-debug), this will produce incorrect artifact URLs pointing at the default mirror. Consider plumbing the per-release source through to import_*_binary_package_file/import_binary_pkg (e.g., pass release.source(&sync.source) alongside release.name()), and add a regression test covering a release with a custom source.

Copilot uses AI. Check for mistakes.
@kpcyrd kpcyrd force-pushed the dbgsym-release-with-different-source branch from d61076d to c8d6b75 Compare April 2, 2026 13:13
Copilot AI review requested due to automatic review settings April 2, 2026 18:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants