Skip to content

common: port pkg/config to new configfile package#615

Merged
ashley-cui merged 5 commits intocontainers:mainfrom
Luap99:containers-conf
Feb 4, 2026
Merged

common: port pkg/config to new configfile package#615
ashley-cui merged 5 commits intocontainers:mainfrom
Luap99:containers-conf

Conversation

@Luap99
Copy link
Copy Markdown
Member

@Luap99 Luap99 commented Jan 28, 2026

Depends on #611

@github-actions github-actions Bot added storage Related to "storage" package common Related to "common" package labels Jan 28, 2026
@TomSweeneyRedHat
Copy link
Copy Markdown
Member

Quick look
LGTM

@Luap99 Luap99 force-pushed the containers-conf branch 3 times, most recently from dc3ba83 to c8074b4 Compare February 2, 2026 18:47
In order to use the new pkg/configfile from storage we must use a newer
commit in go.mod to make go mod tidy happy. Without this tidy fails as
it cannot lookup the package in the specified version.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
@Luap99 Luap99 marked this pull request as ready for review February 2, 2026 18:55
@github-actions github-actions Bot added the image Related to "image" package label Feb 2, 2026
@Luap99
Copy link
Copy Markdown
Member Author

Luap99 commented Feb 2, 2026

Ok marking as ready for review, containers/podman#27997 is a podman test PR which mostly passes test except some minor new error message fixes that will now be needed there.

@Luap99 Luap99 changed the title [WIP] common: port pkg/config to new configfile package common: port pkg/config to new configfile package Feb 2, 2026
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
The toml decoder does not mention the path so we need to wrap it in,
without it users won't know which file has the invalid syntax.

Also add a some context on module open error so users know the issue is
with the module not the main config files.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Print the file path on debug level and the full struct with trace level
in order to allow easier debugging on config loading problems.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
First actually ensure to reset the log level back to info.
Then because the file loading now logs the file path on debug level we
no longer can match for empty output. To check that there is no error in
the default file ensure there is no "Failed to decode the keys" line.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
@inknos
Copy link
Copy Markdown
Contributor

inknos commented Feb 4, 2026

Done with review. I think it's great work!

LGTM

Copy link
Copy Markdown
Member

@ashley-cui ashley-cui left a comment

Choose a reason for hiding this comment

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

LGTM

@ashley-cui ashley-cui merged commit 4e7127f into containers:main Feb 4, 2026
36 checks passed
@Luap99 Luap99 deleted the containers-conf branch February 4, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to "common" package image Related to "image" package storage Related to "storage" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants