Skip to content

✨ (pre-flight check) Improve error message #2006

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

Merged

Conversation

anik120
Copy link
Contributor

@anik120 anik120 commented Jun 3, 2025

Description

The line "failed to get release state using client-only dry-run" is too jargon heavy, and meaningless for the end user.
This PR replaces the error message with a more user friendly text.

Reviewer Checklist

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

@anik120 anik120 requested a review from a team as a code owner June 3, 2025 19:56
Copy link

netlify bot commented Jun 3, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit a9f2af6
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/6849da15633d700008519924
😎 Deploy Preview https://deploy-preview-2006--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 project configuration.

@anik120 anik120 force-pushed the improve-preflight-check-error-message branch from 6b10130 to 1513098 Compare June 3, 2025 19:58
Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

I think it might broke the downstream tests :-(
Last time I think they were matching the string

@tmshort @jianzhangbjz for you be aware of the change.

But I either liked more the new message 👍

@camilamacedo86 camilamacedo86 requested a review from bentito June 3, 2025 20:00
@anik120 anik120 force-pushed the improve-preflight-check-error-message branch from 1513098 to 1fc3d52 Compare June 3, 2025 20:07
Copy link

codecov bot commented Jun 3, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.26%. Comparing base (8f81c23) to head (a9f2af6).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
internal/operator-controller/applier/helm.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2006      +/-   ##
==========================================
+ Coverage   69.17%   69.26%   +0.08%     
==========================================
  Files          79       79              
  Lines        7037     7051      +14     
==========================================
+ Hits         4868     4884      +16     
+ Misses       1887     1885       -2     
  Partials      282      282              
Flag Coverage Δ
e2e 42.94% <0.00%> (-0.06%) ⬇️
unit 60.17% <0.00%> (+0.12%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

👍

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 10, 2025
Copy link

openshift-ci bot commented Jun 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 10, 2025
@@ -91,7 +91,7 @@ func shouldSkipPreflight(ctx context.Context, preflight Preflight, ext *ocv1.Clu
func (h *Helm) runPreAuthorizationChecks(ctx context.Context, ext *ocv1.ClusterExtension, chart *chart.Chart, values chartutil.Values, post postrender.PostRenderer) error {
tmplRel, err := h.renderClientOnlyRelease(ctx, ext, chart, values, post)
if err != nil {
return fmt.Errorf("failed to get release state using client-only dry-run: %w", err)
return fmt.Errorf("error rendering bundle for pre-authorization checks: %w", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return fmt.Errorf("error rendering bundle for pre-authorization checks: %w", err)
return fmt.Errorf("error rendering content for pre-authorization checks: %w", err)

Maybe content for when we have more types like Helm and Bundle regestry/v1
WDYT?

Otherwise, LGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure that works too 👍🏽

The line "failed to get release state using client-only dry-run" is too
jargon heavy, and meaningless for the end user.
This PR replaces the error message with a more user friendly text.
@anik120 anik120 force-pushed the improve-preflight-check-error-message branch from 1fc3d52 to a9f2af6 Compare June 11, 2025 19:33
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 11, 2025
Copy link

openshift-ci bot commented Jun 11, 2025

New changes are detected. LGTM label has been removed.

@anik120 anik120 merged commit 0c9f0b5 into operator-framework:main Jun 11, 2025
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants