Conversation
client.conf discovery merged every existing file in a fixed two-path list (/etc/openqa/client.conf then the user config dir), later keys winning. That let a section in the user config combine with a section in /etc/openqa across an administration boundary, and never consulted /usr/etc/openqa or client.conf.d/*.conf drop-ins at all; $OPENQA_CONFIG was also an exclusive override even when its directory held no config. config::default_paths now performs the same tiered lookup as current openQA: $OPENQA_CONFIG, then the XDG-or-home user directory, then /etc/openqa and /usr/etc/openqa. The first tier producing any file wins outright; later tiers are not read at all. Within a tier, each directory contributes its client.conf followed by its client.conf.d/*.conf drop-ins (sorted, later wins), and a directory with only drop-ins does not stop the scan of the tier's remaining directories. Anyone relying on the old cross-tier merge -- an override in ~/.config/openqa/client.conf combined with host sections that exist only in /etc/openqa/client.conf -- now loses the /etc sections outright, hence the breaking change. $XDG_CONFIG_HOME as the tier-2 selector and treating a malformed file as a hard error are kept as deliberate divergences from upstream. config::default_paths and ClientBuilder::config_paths keep their existing signatures; an explicit config_paths list is still a plain in-order merge with no tiering.
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.
Summary
client.confdiscovery merged every existing file in a fixed two-pathlist (
/etc/openqa/client.confthen the user config dir), later keyswinning. That let a section in the user config combine with a section
in
/etc/openqaacross an administration boundary, and neverconsulted
/usr/etc/openqaorclient.conf.d/*.confdrop-ins at all;$OPENQA_CONFIGwas also an exclusive override even when itsdirectory held no config.
config::default_pathsnow performs the same tiered lookup as currentopenQA:
$OPENQA_CONFIG(only when set and non-empty)$XDG_CONFIG_HOME/openqa(or~/.config/openqa)/etc/openqa, then/usr/etc/openqaThe first tier producing any file wins outright; later tiers are not
read at all. Within a tier, each directory contributes its
client.conffollowed by itsclient.conf.d/*.confdrop-ins (sorted,later wins), and a directory with only drop-ins does not stop the scan
of the tier's remaining directories.
Breaking change
Anyone relying on the old cross-tier merge — an override in
~/.config/openqa/client.confcombined with host sections that existonly in
/etc/openqa/client.conf— now loses the/etcsectionsoutright.
$XDG_CONFIG_HOMEas the tier-2 selector and treating amalformed file as a hard error are kept as deliberate divergences from
upstream.
config::default_pathsandClientBuilder::config_pathskeep theirexisting signatures; an explicit
config_pathslist is still a plainin-order merge with no tiering.
Testing
cargo fmt --checkcargo clippy --all-targets --locked -- -D warningscargo test --lockedcargo check --locked --all-targetscargo deny check