Repository navigation
Conversation
jetm
force-pushed
the
feed-loop/feed-preflight
branch
from
November 12, 2026 15:03
3e75b44 to
6afe501
Compare
jetm
marked this pull request as ready for review
November 12, 2026 21:18
jetm
force-pushed
the
feed-loop/feed-preflight
branch
from
November 12, 2026 22:59
e4a1512 to
ca3031c
Compare
When a feed repository is unreachable or serves no metadata, the failure currently surfaces only after the install has started, as a dnf error inside the container. By then the message rarely says which configured feed is at fault, and time has already been spent on downloads that cannot succeed. Probe the repodata index of each URL feed, and of the extension repository when the caller needs one, before anything is fetched. Each error names the feed and the reason: connection failure, missing metadata, or an unexpected HTTP status. A path feed is verified on disk instead, since it is never served over the network. Probe from the host using the locator as configured, because the container's rewritten loopback address is not reachable from the host. Use a per-feed client so each feed keeps its own CA, TLS verification and credential. Probe the extension repository only when an extension needs it, so a minimal project is not required to run one. Unlike the addon check, which only warns about an unreadable index, treat an unreachable feed as an error. dnf would fail on it anyway, just later and with less context. The function is not called yet; the install and SDK install commands will wire it in separately. Signed-off-by: Javier Tia <javier@peridio.com>
Currently an unreachable feed repository is only noticed once dnf runs inside the container, well after the install has started pulling content. The failure then carries little information about which feed is at fault, and the user has already waited through earlier steps. Call the existing feed preflight from both `install` and `sdk install` before anything is downloaded. Because `install` also runs the SDK install, the probes are recorded per target and executed only once per process, so the feeds are not asked twice. Extensions marked `enabled: false` are still fetched, so they count when deciding whether the extension repository must be reachable. Resolution is repeated in the hook instead of being shared with `materialize_feeds`, since that runs later and depends on a mint that this check has to precede. Only a successful probe is remembered, as a failure terminates the command anyway. The preflight function is now used, so drop its dead-code allowance. Signed-off-by: Javier Tia <javier@peridio.com>
The feed preflight introduced for the first-build loop refuses to run in several cases where dnf would have succeeded. A minimal project with only local extensions was rejected when the feed had no extension repository, even though nothing would be fetched from it. With --runs-on, dnf runs on a remote runner that may reach feeds this host cannot, so a local probe says nothing useful. Any non-404 error status, such as a rate limit or proxy rejection, aborted the command although the feed was reachable. Add-on feeds were probed ahead of the add-on check, hiding its did-you-mean message behind a bare metadata error. The extension repository URL was also guessed without a releasever, where the container falls back to the image's os-release, which the host cannot see. Require the extension repository only when an active extension declares a package source, since git, path and local extensions never touch it. Skip the probes under --runs-on. Treat only a definite missing-metadata answer (404 or 410) or an unreachable server as fatal, and warn on other statuses so dnf reports a genuinely unusable feed. Leave add-on feeds to the index-based check when an index is known, and skip the extension repository probe when no releasever is configured. Record whether the extension repository was probed in the once-per- target cache. A later caller that needs it after a narrower pass runs the probe instead of inheriting a pass that never covered it. Signed-off-by: Javier Tia <javier@peridio.com>
Installs now fail before any download when a feed is unreachable or has no metadata. Users who used to see a dnf error from inside the container need to know where the new error comes from and when it is skipped. Record the preflight under Added, including the once-per-target probe and the --runs-on skip. Signed-off-by: Javier Tia <javier@peridio.com>
The probe parsed the configured CA with from_pem, which reads one certificate, so a bundle whose signing root was not first made the preflight fail with a TLS error on a feed dnf would reach. The snapshot client already adds each certificate of a bundle; the probe now does the same, and the extension-repository probe shares the path. Signed-off-by: Javier Tia <javier@peridio.com>
…nally Two preflight tests returned early when an ambient release variable supplied a releasever or an add-on index, so on such a machine they passed having checked nothing. Clear the release and channel variables under the module's serial guard and assert the precondition, so the test either exercises the path or fails. Signed-off-by: Javier Tia <javier@peridio.com>
from_pem_bundle returns an empty list for an empty or DER-encoded file instead of an error, so a misconfigured ca: setting added no trust anchor and the probe quietly used the system roots. Fail with the feed name and the path so the mistake surfaces at the preflight. Signed-off-by: Javier Tia <javier@peridio.com>
… off The probe built its client with certificate verification disabled whenever a feed set tls_verify to false, so the preflight itself sent requests, credentials included, to a server it had not authenticated. That is the one thing a verification setting should never be bent into. A feed that opts out is now not probed at all and a warning says why, leaving dnf, which honours the setting, to report an unusable feed. A verifying probe still fails naming the feed when it cannot trust the server. Signed-off-by: Javier Tia <javier@peridio.com>
jetm
force-pushed
the
feed-loop/feed-preflight
branch
from
November 12, 2026 23:24
ca3031c to
6144d92
Compare
Contributor
Author
|
Consolidated into #394, which carries this layer's commits together with the rest of the feed-first stack. Closing so review happens in one place. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
An unreachable feed repository surfaced as a dnf error from inside the container, without naming the feed.
Solution
installandsdk installprobe each URL feed's metadata, and the extension repository when a sourced extension needs one, before downloading. A not-found or a refused connection fails naming the feed.Key changes
--runs-on.Reviewer notes
This reverses today's warn-only tolerance for unreachable URL feeds, so I would like opinions on that. Tests: 2,392 passed (same single existing failure).