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

✨ mask helm conflict errors #1016

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

perdasilva
Copy link
Contributor

@perdasilva perdasilva commented Jul 8, 2024

Description

As part of #736 we'd like to mark helm errors when an installation fails due to conflict. This PR wraps the ActionClient interface we use to talk to helm and processes the errors returned give a set of programatic rules. So far, only the install conflict error translator is modeled

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

@perdasilva perdasilva requested a review from a team as a code owner July 8, 2024 16:18
Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit d78e9a9
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/6696723a2fe9700008789218
😎 Deploy Preview https://deploy-preview-1016--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@perdasilva perdasilva force-pushed the perdasilva/oprun-3281 branch 2 times, most recently from 20887b3 to 73fdc37 Compare July 8, 2024 16:45
Copy link

codecov bot commented Jul 8, 2024

Codecov Report

Attention: Patch coverage is 93.65079% with 4 lines in your changes missing coverage. Please review.

Project coverage is 73.29%. Comparing base (422a740) to head (d78e9a9).
Report is 2 commits behind head on main.

Files Patch % Lines
internal/action/error/errors.go 92.00% 2 Missing ⚠️
internal/action/helm.go 94.59% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1016      +/-   ##
==========================================
+ Coverage   72.63%   73.29%   +0.66%     
==========================================
  Files          28       30       +2     
  Lines        1889     1951      +62     
==========================================
+ Hits         1372     1430      +58     
- Misses        381      384       +3     
- Partials      136      137       +1     
Flag Coverage Δ
e2e 54.32% <58.73%> (+0.13%) ⬆️
unit 46.64% <84.12%> (+1.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

internal/error/errors.go Outdated Show resolved Hide resolved
internal/error/errors.go Outdated Show resolved Hide resolved
@LalatenduMohanty
Copy link
Member

@perdasilva can you please add the results (logging) before and after the PR here. Which will help me better understand the difference in user experience.

@perdasilva perdasilva changed the title ✨ mask helm conflict errors [WIP] ✨ mask helm conflict errors Jul 9, 2024
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 9, 2024
@perdasilva
Copy link
Contributor Author

perdasilva commented Jul 9, 2024

@perdasilva can you please add the results (logging) before and after the PR here. Which will help me better understand the difference in user experience.

Went from:

CustomResourceDefinition "applications.argoproj.io" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "clusterextension-test": current value is "clusterextension-sample"; annotation validation error: key "meta.helm.sh/release-namespace" must equal "test": current value is "default"

To:

CustomResourceDefinition 'applications.argoproj.io' already exists in namespace ''

@LalatenduMohanty
Copy link
Member

CustomResourceDefinition 'applications.argoproj.io' already exists in namespace ''

@joelanford mentioned that this logging is also not right because it does not the point right root cause to the user.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 10, 2024
@perdasilva perdasilva force-pushed the perdasilva/oprun-3281 branch 3 times, most recently from fe7be7f to 5a2d772 Compare July 10, 2024 15:31
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 10, 2024
@perdasilva
Copy link
Contributor Author

perdasilva commented Jul 10, 2024

CustomResourceDefinition 'applications.argoproj.io' already exists in namespace ''

@joelanford mentioned that this logging is also not right because it does not the point right root cause to the user.

it would be good to have an example..? or alternatively, here is the line. Please feel free to suggest a change

@perdasilva perdasilva changed the title [WIP] ✨ mask helm conflict errors ✨ mask helm conflict errors Jul 10, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 10, 2024
@perdasilva perdasilva force-pushed the perdasilva/oprun-3281 branch 8 times, most recently from 7b5c4a8 to 671a0a9 Compare July 16, 2024 13:07
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Copy link
Contributor

@tmshort tmshort left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 16, 2024
@tmshort tmshort added this pull request to the merge queue Jul 16, 2024
Merged via the queue into operator-framework:main with commit 957fc1b Jul 16, 2024
18 checks passed
perdasilva added a commit to LalatenduMohanty/operator-controller that referenced this pull request Aug 13, 2024
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Co-authored-by: Per Goncalves da Silva <pegoncal@redhat.com>
perdasilva added a commit to kevinrizza/operator-controller that referenced this pull request Aug 13, 2024
Signed-off-by: Per Goncalves da Silva <pegoncal@redhat.com>
Co-authored-by: Per Goncalves da Silva <pegoncal@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants