Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove usage of zerolog.Logger.Msgf() from zot code #1382

Merged
merged 1 commit into from
Apr 28, 2023

Conversation

nicoldr
Copy link
Contributor

@nicoldr nicoldr commented Apr 20, 2023

What type of PR is this?

Which issue does this PR fix:
Closes #1366

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

pkg/api/controller.go Outdated Show resolved Hide resolved
pkg/api/controller.go Outdated Show resolved Hide resolved
pkg/api/routes.go Outdated Show resolved Hide resolved
pkg/api/routes.go Outdated Show resolved Hide resolved
pkg/api/routes.go Outdated Show resolved Hide resolved
pkg/meta/repodb/storage_parsing.go Outdated Show resolved Hide resolved
pkg/meta/update.go Outdated Show resolved Hide resolved
pkg/meta/update.go Outdated Show resolved Hide resolved
pkg/test/oci-layout/oci_layout.go Outdated Show resolved Hide resolved
pkg/test/oci-layout/oci_layout.go Outdated Show resolved Hide resolved
@nicoldr nicoldr force-pushed the modifyZerlogMsg branch 3 times, most recently from 9348ea5 to 49c6312 Compare April 26, 2023 14:06
@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

Merging #1382 (7d33a95) into main (40bf76a) will decrease coverage by 0.02%.
The diff coverage is 82.43%.

@@            Coverage Diff             @@
##             main    #1382      +/-   ##
==========================================
- Coverage   90.70%   90.68%   -0.02%     
==========================================
  Files          99       99              
  Lines       22268    22329      +61     
==========================================
+ Hits        20198    20250      +52     
- Misses       1544     1553       +9     
  Partials      526      526              
Impacted Files Coverage Δ
pkg/api/controller.go 92.54% <0.00%> (-0.23%) ⬇️
pkg/cli/config_reloader.go 81.25% <0.00%> (ø)
pkg/test/oci-layout/oci_layout.go 91.07% <60.00%> (-0.21%) ⬇️
pkg/meta/repodb/repodbfactory/repodb_factory.go 91.83% <66.66%> (ø)
pkg/extensions/sync/utils.go 89.31% <71.42%> (-0.87%) ⬇️
pkg/extensions/sync/signatures.go 82.21% <74.15%> (-0.19%) ⬇️
pkg/storage/cache/dynamodb.go 96.77% <75.00%> (ø)
pkg/storage/local/local.go 82.58% <76.47%> (+0.36%) ⬆️
pkg/common/common.go 93.18% <80.00%> (+0.03%) ⬆️
pkg/extensions/search/cve/cve.go 93.46% <83.33%> (+0.05%) ⬆️
... and 18 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Nicol Draghici <idraghic@cisco.com>
pkg/extensions/sync/signatures.go Outdated Show resolved Hide resolved
pkg/extensions/sync/signatures.go Show resolved Hide resolved
pkg/extensions/sync/utils.go Outdated Show resolved Hide resolved
pkg/extensions/sync/utils.go Outdated Show resolved Hide resolved
@nicoldr nicoldr force-pushed the modifyZerlogMsg branch 3 times, most recently from 196ec31 to 7d33a95 Compare April 27, 2023 17:39
@@ -405,7 +405,8 @@ func (c *Controller) getSubStore(subPaths map[string]config.StorageConfig,
} else {
storeName := fmt.Sprintf("%v", storageConfig.StorageDriver["name"])
if storeName != storage.S3StorageDriverName {
c.Log.Fatal().Err(errors.ErrBadConfig).Msgf("unsupported storage driver: %s", storageConfig.StorageDriver["name"])
c.Log.Fatal().Err(errors.ErrBadConfig).Str("storageDriver", storeName).
Msg("unsupported storage driver")
Copy link
Contributor

Choose a reason for hiding this comment

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

So, now I can column-search for "unsupported storage driver".

Copy link
Contributor

@rchincha rchincha left a comment

Choose a reason for hiding this comment

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

lgtm

@rchincha rchincha merged commit c169698 into project-zot:main Apr 28, 2023
23 of 25 checks passed
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.

[Feat]: consider converting Msgf() into Msg()
3 participants