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

refactor(log): replace panics with log fatal or log panic functions #1723

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

laurentiuNiculae
Copy link
Contributor

@laurentiuNiculae laurentiuNiculae commented Aug 22, 2023

What type of PR is this?

Which issue does this PR fix:
Closes #1686

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.

@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Attention: 37 lines in your changes are missing coverage. Please review.

Comparison is base (83f287d) 91.87% compared to head (2869ccc) 92.01%.

Files Patch % Lines
pkg/storage/storage.go 63.63% 9 Missing and 3 partials ⚠️
pkg/cli/server/root.go 69.56% 7 Missing ⚠️
pkg/api/authn.go 80.00% 4 Missing ⚠️
pkg/cli/client/config_cmd.go 0.00% 3 Missing ⚠️
pkg/exporter/cli/cli.go 0.00% 3 Missing ⚠️
pkg/storage/cache/boltdb.go 89.65% 3 Missing ⚠️
pkg/cli/server/config_reloader.go 0.00% 2 Missing ⚠️
pkg/compliance/v1_0_0/check.go 0.00% 1 Missing ⚠️
pkg/storage/cache.go 90.00% 1 Missing ⚠️
pkg/storage/cache/dynamodb.go 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1723      +/-   ##
==========================================
+ Coverage   91.87%   92.01%   +0.14%     
==========================================
  Files         165      165              
  Lines       28125    28206      +81     
==========================================
+ Hits        25840    25955     +115     
+ Misses       1687     1661      -26     
+ Partials      598      590       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@laurentiuNiculae laurentiuNiculae force-pushed the log-remove-panic branch 2 times, most recently from fa4643d to e6cc319 Compare August 25, 2023 08:02
@laurentiuNiculae laurentiuNiculae marked this pull request as ready for review August 25, 2023 08:40
pkg/api/authn.go Outdated Show resolved Hide resolved
pkg/api/authn.go Outdated Show resolved Hide resolved
pkg/api/authn.go Outdated Show resolved Hide resolved
pkg/meta/meta.go Outdated Show resolved Hide resolved
pkg/storage/cache/boltdb.go Outdated Show resolved Hide resolved
pkg/storage/cache/dynamodb.go Outdated Show resolved Hide resolved
pkg/api/controller.go Outdated Show resolved Hide resolved
@laurentiuNiculae laurentiuNiculae force-pushed the log-remove-panic branch 5 times, most recently from 064d471 to e85cb5b Compare August 28, 2023 13:45
pkg/meta/meta.go Outdated Show resolved Hide resolved
pkg/storage/cache.go Outdated Show resolved Hide resolved
@laurentiuNiculae laurentiuNiculae force-pushed the log-remove-panic branch 9 times, most recently from f65de52 to 17aa72c Compare September 4, 2023 15:31
pkg/api/controller_test.go Outdated Show resolved Hide resolved
pkg/api/controller_test.go Outdated Show resolved Hide resolved
pkg/cli/extensions_test.go Outdated Show resolved Hide resolved
pkg/storage/cache.go Outdated Show resolved Hide resolved
pkg/storage/cache/dynamodb_test.go Outdated Show resolved Hide resolved
@laurentiuNiculae laurentiuNiculae force-pushed the log-remove-panic branch 4 times, most recently from 4738576 to c96b3bc Compare September 13, 2023 09:05
@laurentiuNiculae laurentiuNiculae force-pushed the log-remove-panic branch 9 times, most recently from 95ea598 to 8d18a2e Compare November 9, 2023 12:11
pkg/api/controller_test.go Outdated Show resolved Hide resolved
pkg/storage/storage_test.go Outdated Show resolved Hide resolved
@laurentiuNiculae laurentiuNiculae force-pushed the log-remove-panic branch 4 times, most recently from 9ecba16 to 66faa58 Compare November 13, 2023 10:27
andaaron
andaaron previously approved these changes Nov 13, 2023
@laurentiuNiculae laurentiuNiculae force-pushed the log-remove-panic branch 3 times, most recently from fbd523f to d8c7812 Compare November 22, 2023 12:45
@rchincha rchincha merged commit 92837c2 into project-zot:main Nov 24, 2023
32 of 33 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.

[Refactor] Zot should not use panics, it should use log.Fatal
3 participants