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

surface conflicting env var names as warnings and errors #3124

Merged

Conversation

christianvogt
Copy link
Contributor

https://issues.redhat.com/browse/RHOAIENG-11538

Description

Provides user with feedback when creating fields which have conflicting env var values.
Note that microcopy is not finalized.

image

image

cc @simrandhaliw

How Has This Been Tested?

  • Go to Settings -> Connection types as an admin with the connection type feature flag enabled.
  • Create a new connection type.
  • Add two fields with the same env var name.
  • Observe the error in the table and fields modal and that the form save button is disabled
  • Edit a conflicting field to have a unique env var
  • Observe the form save button is no longer disabled (providing the rest of the form is valid)

Test Impact

Added unit tests.

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)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

@emilys314
Copy link
Contributor

I tested this on my cluster and it looks like it's all working to me

@christianvogt
Copy link
Contributor Author

@emilys314 updated with useMemo where env vars array is computed

@emilys314
Copy link
Contributor

/lgtm

@christianvogt
Copy link
Contributor Author

christianvogt commented Aug 26, 2024

rebased to fix all the conflicts with main

Copy link

codecov bot commented Aug 26, 2024

Codecov Report

Attention: Patch coverage is 92.85714% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.85%. Comparing base (4a0626e) to head (bf5e8dd).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ctionTypes/manage/ConnectionTypeDataFieldModal.tsx 90.00% 1 Missing ⚠️
...onnectionTypes/manage/ManageConnectionTypePage.tsx 83.33% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3124      +/-   ##
==========================================
+ Coverage   80.84%   80.85%   +0.01%     
==========================================
  Files        1243     1244       +1     
  Lines       27099    27117      +18     
  Branches     7144     7152       +8     
==========================================
+ Hits        21907    21926      +19     
+ Misses       5192     5191       -1     
Files with missing lines Coverage Δ
frontend/src/concepts/connectionTypes/types.ts 100.00% <100.00%> (ø)
...onnectionTypes/manage/ConnectionTypeFieldModal.tsx 25.00% <ø> (ø)
...onTypes/manage/ManageConnectionTypeFieldsTable.tsx 38.88% <ø> (-1.12%) ⬇️
...ypes/manage/ManageConnectionTypeFieldsTableRow.tsx 82.22% <100.00%> (+3.27%) ⬆️
.../pages/connectionTypes/manage/fieldTableColumns.ts 100.00% <100.00%> (ø)
...ctionTypes/manage/ConnectionTypeDataFieldModal.tsx 81.08% <90.00%> (+0.79%) ⬆️
...onnectionTypes/manage/ManageConnectionTypePage.tsx 77.77% <83.33%> (+0.27%) ⬆️

... and 2 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 4a0626e...bf5e8dd. Read the comment docs.

@christianvogt
Copy link
Contributor Author

rebased

@jeff-phillips-18
Copy link
Contributor

/lgtm

Copy link
Contributor

openshift-ci bot commented Aug 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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-merge-bot openshift-merge-bot bot merged commit bccd89c into opendatahub-io:main Aug 28, 2024
8 checks passed
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