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

fix: errors silently ignored when deleting resources #792

Merged
merged 4 commits into from
Jun 26, 2024

Conversation

phm07
Copy link
Contributor

@phm07 phm07 commented Jun 26, 2024

See #791 for a description of the issue.

Closes #791

@phm07 phm07 added the bug label Jun 26, 2024
@phm07 phm07 self-assigned this Jun 26, 2024
@phm07 phm07 requested a review from a team as a code owner June 26, 2024 08:28
@phm07 phm07 requested a review from jooola June 26, 2024 08:29
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 59.73%. Comparing base (dcba0ca) to head (9d7c494).
Report is 2 commits behind head on main.

Files Patch % Lines
internal/cmd/base/delete.go 62.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #792      +/-   ##
==========================================
+ Coverage   59.68%   59.73%   +0.04%     
==========================================
  Files         210      210              
  Lines        7639     7641       +2     
==========================================
+ Hits         4559     4564       +5     
+ Misses       2437     2435       -2     
+ Partials      643      642       -1     

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

internal/cmd/base/delete.go Show resolved Hide resolved
Comment on lines 88 to 92
for _, result := range results {
if result.Error != nil {
errs = append(errs, result.Error)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

What do you think about combining this with the existing loop of results in Line 95/100

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would change the order of errors. Right now it's chronologic: errors that happen when starting the action come before errors that happened during the action. But I think you could move the loop above L94-98 to combine the loops without changing order

@apricote
Copy link
Member

Can we add a test to detect this in the future?

@phm07 phm07 merged commit a7655f8 into main Jun 26, 2024
5 checks passed
@phm07 phm07 deleted the fix-ignored-deletion-error branch June 26, 2024 13:07
phm07 pushed a commit that referenced this pull request Jun 26, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.44.1](v1.44.0...v1.44.1)
(2024-06-26)


### Bug Fixes

* errors silently ignored when deleting resources
([#792](#792))
([a7655f8](a7655f8)),
closes [#791](#791)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting protected resources fails quietly
3 participants