Repository navigation
Conversation
jetm
marked this pull request as ready for review
November 12, 2026 21:18
jetm
force-pushed
the
feed-loop/distro-loopback-coherence
branch
from
November 12, 2026 22:59
46f834e to
7fd3bad
Compare
Several tests in feeds and container read process-wide environment variables or share global session state, yet they run in parallel with other tests that mutate the same state. This makes them fail intermittently depending on scheduling, and a leaked AVOCADO_REPO_URL or similar variable from one test can silently change the feed resolution another test expects. Mark the affected tests as serial and have the feed tests clear the release environment before loading their config, so each starts from a known baseline. Extend the cleanup helper to cover the repo URL, SDK repo URL, insecure and CA variables, which were previously left behind and could leak between tests. Improve the container test failure message to name the temp directory when the stub tool log is missing. A bare unwrap hid whether the tool was never invoked or the shutdown raced with another test, which made the flakiness hard to diagnose. Signed-off-by: Javier Tia <javier@peridio.com>
The changelog entry on loopback feed address rewriting did not say how the distro feed's address is handled. Readers could assume that container arguments passed on the command line, such as `--network=host`, also influence the rewrite and the host entry. They do not, which can lead to confusion when a feed URL is or is not rewritten unexpectedly. State that the distro feed's address follows the same detection but only considers `sdk.container_args` from the configuration. Note that command-line container arguments still reach the container but are not consulted for the rewrite or host entry. This documents the actual behavior so users know where to set arguments that should affect feed address handling. Signed-off-by: Javier Tia <javier@peridio.com>
The distro feed decides whether to keep a loopback repo URL or rewrite it to the host-gateway alias by checking whether the run uses host networking. That check read the run's own container args, which also carry arguments layered on from the command line. A `--network=host` passed only on the command line therefore made the feed keep a loopback URL and skip the host entry, even though the project config never asked for host networking. The two views of the same decision could also disagree between the env URL and the `--add-host` route. Record the host-networking reading of `sdk.container_args` when the composed configuration is loaded, and have the container run consult it for both the URL rewrite and the host entry. The composed load is the point where those arguments are final, and it is recorded there rather than in the shared YAML parser so that `Config::load` and unit tests do not alter a process-wide value. Commands that never run a composed load record nothing and fall back to the run's own container args, keeping their previous behavior. The recorded value is per thread under test, so parallel tests do not observe each other's recordings. Signed-off-by: Javier Tia <javier@peridio.com>
…ro URL The distro feed's loopback decision now follows sdk.container_args alone, so a --network=host given only on the command line rewrites a loopback distro URL to the host gateway while docker still runs with host networking. A repository server bound only to 127.0.0.1 is unreachable in that case, and nothing in the entry said so, which would show up only as a dnf failure. The entry also claimed command-line container arguments are not consulted for the rewrite or the host entry. That holds for the commands that compose the configuration; container dev, save and vm load the plain configuration and fall back to the command-line arguments, so the claim names the split.
jetm
force-pushed
the
feed-loop/distro-loopback-coherence
branch
from
November 12, 2026 23:24
7fd3bad to
35d1e43
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
The distro feed's loopback rewrite and its
--add-hostentry read the container arguments of the run, which include anything passed on the command line. Named feeds readsdk.container_argsonly. For one project the two feeds could disagree. Separately, four feeds tests and two container shutdown tests failed depending on ambient environment variables or on parallel tests sharing process-wide state.Solution
The composed configuration load records whether
sdk.container_argsselects host networking, and the distro rewrite and the host entry read that value. Commands that load only the plain configuration (container dev,save,vm) record nothing and keep reading the run's arguments, so they do not regress. Docker still receives every argument unchanged. The six tests now clear the environment they depend on and run serially.Key changes
src/utils/feeds.rs: the recorder and its getter. Under test the recorded value is per thread, so parallel tests do not see each other's value.src/utils/config.rs: the composed load records it.src/utils/container.rs: the rewrite and the host-entry condition read it, with the old reading as the fallback.CHANGELOG.md: says that a--network=hostgiven only on the command line now rewrites a loopback distro URL.Reviewer notes
A
--network=hostpassed only on the command line now gets the rewritten address and the host entry while docker still runs with host networking. A repository server bound only to127.0.0.1is then unreachable that way; the changelog says to put the argument insdk.container_args. Please check that behavior change and the fallback for the plain-loader commands.Tests on this layer alone: format and clippy clean, 2408 lib tests pass. The one test skipped by name,
overlay_copy_sets_attributes_only_on_paths_it_creates, is an existing setgid check that depends on host GNU tools.