Skip to content

LoadAllRepositoriesFromFS: log only filenames of loaded repositories#1070

Merged
thozza merged 2 commits intoosbuild:mainfrom
thozza:reporegistry-log-verbosity-fix
Nov 28, 2024
Merged

LoadAllRepositoriesFromFS: log only filenames of loaded repositories#1070
thozza merged 2 commits intoosbuild:mainfrom
thozza:reporegistry-log-verbosity-fix

Conversation

@thozza
Copy link
Copy Markdown
Member

@thozza thozza commented Nov 27, 2024

After the rework done by PR#1038 [1], the configFile changed from the file path string to fs.File instance. As a result, logging it makes the output verbose, as it logs the whole content of the loaded file (repo URLs, GPG keys, etc.). Revert to the old behavior by logging fileEntry.Name() for the loaded repository.

[1] #1038

After the rework done by PR#1038 [1], the `configFile` changed from the
file path string to `fs.File` instance. As a result, logging it makes
the output verbose, as it logs the whole content of the loaded file
(repo URLs, GPG keys, etc.). Revert to the old behavior by logging
`fileEntry.Name()` for the loaded repository.

[1] osbuild#1038

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
@thozza thozza requested review from achilleas-k and mvo5 November 27, 2024 11:53
mvo5
mvo5 previously approved these changes Nov 27, 2024
Copy link
Copy Markdown
Contributor

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

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

This looks fine and sorry that I broke this. Would you mind if I push a tiny regression test to the branch? 890a807

@thozza
Copy link
Copy Markdown
Member Author

thozza commented Nov 28, 2024

This looks fine and sorry that I broke this. Would you mind if I push a tiny regression test to the branch? 890a807

Sure, go ahead... 👍

This commit adds a tiny test to ensure repo logging does not break
again.
@mvo5
Copy link
Copy Markdown
Contributor

mvo5 commented Nov 28, 2024

This looks fine and sorry that I broke this. Would you mind if I push a tiny regression test to the branch? 890a807

Sure, go ahead... 👍

Updated and approved again, please have a look and merge if this feels okay.

Copy link
Copy Markdown
Member Author

@thozza thozza left a comment

Choose a reason for hiding this comment

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

test LGTM, thanks!

@thozza thozza enabled auto-merge November 28, 2024 08:16
@thozza thozza added this pull request to the merge queue Nov 28, 2024
Merged via the queue into osbuild:main with commit 5085f9a Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants