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

check and fix the use of errors.As #1004

Merged
merged 1 commit into from
Dec 6, 2020
Merged

check and fix the use of errors.As #1004

merged 1 commit into from
Dec 6, 2020

Conversation

nopcoder
Copy link
Contributor

@nopcoder nopcoder commented Dec 6, 2020

No description provided.

@nopcoder nopcoder requested a review from arielshaqed December 6, 2020 11:59
@nopcoder nopcoder self-assigned this Dec 6, 2020
@codecov-io
Copy link

Codecov Report

Merging #1004 (e9c88a9) into master (b1b3858) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1004   +/-   ##
=======================================
  Coverage   44.26%   44.26%           
=======================================
  Files         140      140           
  Lines       11570    11570           
=======================================
  Hits         5121     5121           
  Misses       5799     5799           
  Partials      650      650           
Impacted Files Coverage Δ
catalog/mvcc/cataloger_merge.go 73.33% <0.00%> (ø)
catalog/mvcc/cataloger_create_branch.go 84.90% <0.00%> (-3.78%) ⬇️
catalog/mvcc/cataloger_create_repository.go 62.96% <0.00%> (+3.70%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1b3858...e9c88a9. Read the comment docs.

@nopcoder nopcoder merged commit cf041f8 into master Dec 6, 2020
@nopcoder nopcoder deleted the bugfix/errors-as branch December 6, 2020 13:50
@@ -99,7 +99,7 @@ func testVerifyEntries(t testing.TB, ctx context.Context, c catalog.Cataloger, r
for _, entry := range entries {
ent, err := c.GetEntry(ctx, repository, reference, entry.Path, catalog.GetEntryParams{})
if entry.Deleted {
if !errors.As(err, &db.ErrNotFound) {
if !errors.Is(err, db.ErrNotFound) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ouch, this one is particularly nasty.

Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, this is the one that failed the weekend bug fix when you run all the tests

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.

4 participants