image/docker: use unified configfile for registries.d#753
Open
jankaluza wants to merge 12 commits intocontainers:mainfrom
Open
image/docker: use unified configfile for registries.d#753jankaluza wants to merge 12 commits intocontainers:mainfrom
jankaluza wants to merge 12 commits intocontainers:mainfrom
Conversation
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
When no policy.json is found, `DefaultPolicy()`` previously returned a generic error without indicating where the system looked for the file. This commit introduces `configfile.ReadWithPaths()` to track all attempted config file locations during iteration. It uses this in DefaultPolicy() to include the searched paths in the error message when no policy file is found. Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
This commit does the following: - The `setup()` function now returns the SystemContext. - The hardcoded check for "no policy file found" has moved to the test itself. - Fixture is used for SignaturePolicyPath. Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
This commit introduces `File.ErrorIfNotFound`. If it is true, the Read returns an error which contains all the paths it tried when searching for a config file. The ReadWithPaths is replaced by this new logic. Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
Switch registries.d loading to use `configfile.Read()`, enabling unified drop-in search across /usr, /etc, and user config directories. Files are merged with standard precedence, with higher-priority paths masking lower ones. Preserve explicit RegistriesDirPath override behavior. Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
Member
Author
|
This depends on #711. If someone wants to review this early, check only the last commit. |
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.
Switch registries.d loading to use
configfile.Read(), enablingunified drop-in search across /usr, /etc, and user config directories.
Files are merged with standard precedence, with higher-priority paths
masking lower ones.
Preserve explicit RegistriesDirPath override behavior.
Signed-off-by: Jan Kaluza jkaluza@redhat.com