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

Show connection type creation error message on failure #3158

Conversation

jeff-phillips-18
Copy link
Contributor

Closes RHOAIENG-12439

Description

Fix handling of the error response when creating a connection type.

How Has This Been Tested?

Tested manually

Test Impact

Added e2e test to verify response error text is shown on the page after an error.

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

Copy link

codecov bot commented Sep 5, 2024

Codecov Report

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

Project coverage is 85.25%. Comparing base (7856a84) to head (323fc9f).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
.../connectionTypes/manage/EditConnectionTypePage.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3158      +/-   ##
==========================================
+ Coverage   85.18%   85.25%   +0.07%     
==========================================
  Files        1252     1253       +1     
  Lines       27511    27544      +33     
  Branches     7320     7336      +16     
==========================================
+ Hits        23434    23482      +48     
+ Misses       4077     4062      -15     
Files with missing lines Coverage Δ
...onnectionTypes/manage/CreateConnectionTypePage.tsx 100.00% <100.00%> (+50.00%) ⬆️
...nectionTypes/manage/ManageConnectionTypeFooter.tsx 100.00% <ø> (+45.00%) ⬆️
.../connectionTypes/manage/EditConnectionTypePage.tsx 80.00% <0.00%> (ø)

... and 19 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@emilys314
Copy link
Contributor

I think it wouldn't hurt to also update frontend/src/pages/connectionTypes/manage/EditConnectionTypePage.tsx

But I tested the create connection type and it looked good
image

@jeff-phillips-18
Copy link
Contributor Author

jeff-phillips-18 commented Sep 5, 2024

I think it wouldn't hurt to also update frontend/src/pages/connectionTypes/manage/EditConnectionTypePage.tsx

Good point. I tried this and you can edit the name of the resource to be the same name as another connection type.

image

I think we probably want to prevent this. Leading back to the other discussion of checking for duplicate names before attempting to save. @christianvogt Thoughts?

@christianvogt
Copy link
Contributor

@jeff-phillips-18 let's start a conversation about showing the k8s resource name in the UI. No need to handle duplicates as part of this work.

@christianvogt
Copy link
Contributor

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Sep 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt

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 label Sep 5, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit a6ec43c into opendatahub-io:main Sep 5, 2024
8 checks passed
@jeff-phillips-18 jeff-phillips-18 deleted the create-connection-error branch September 9, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants