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: return proper error message when moving a project with a matching names #9795

Merged
merged 4 commits into from
Aug 6, 2024

Conversation

AmanuelAaron
Copy link
Contributor

@AmanuelAaron AmanuelAaron commented Aug 5, 2024

Ticket

ET-626

Description

Display message for matching name error when moving projects

Test Plan

Create two projects with the same name in separate workspaces. Move one project to the workspace of the other and confirm that the error message is Project with name '{project_name}' already exists in target workspace

Checklist

  • Changes have been manually QA'd
  • New features have been approved by the corresponding PM
  • User-facing API changes have the "User-facing API Change" label
  • Release notes have been added as a separate file under docs/release-notes/
    See Release Note for details.
  • Licenses have been included for new code which was copied and/or modified from any external code

@cla-bot cla-bot bot added the cla-signed label Aug 5, 2024
Copy link

netlify bot commented Aug 5, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit 644c8c6
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66b12eccedb12300076a0094
😎 Deploy Preview https://deploy-preview-9795--determined-ui.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.

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 7.69231% with 12 lines in your changes missing coverage. Please review.

Project coverage is 54.04%. Comparing base (786f258) to head (644c8c6).
Report is 9 commits behind head on main.

Files Patch % Lines
master/internal/api_project.go 0.00% 8 Missing ⚠️
webui/react/src/components/ProjectMoveModal.tsx 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9795      +/-   ##
==========================================
- Coverage   54.07%   54.04%   -0.03%     
==========================================
  Files        1260     1260              
  Lines      155574   155585      +11     
  Branches     3503     3503              
==========================================
- Hits        84120    84090      -30     
- Misses      71308    71349      +41     
  Partials      146      146              
Flag Coverage Δ
backend 44.90% <0.00%> (-0.07%) ⬇️
harness 72.62% <ø> (ø)
web 53.23% <20.00%> (-0.01%) ⬇️

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

Files Coverage Δ
webui/react/src/components/ProjectMoveModal.tsx 57.89% <20.00%> (-1.57%) ⬇️
master/internal/api_project.go 38.66% <0.00%> (-0.47%) ⬇️

... and 5 files with indirect coverage changes

@AmanuelAaron AmanuelAaron marked this pull request as ready for review August 5, 2024 18:23
@AmanuelAaron AmanuelAaron requested review from a team as code owners August 5, 2024 18:23
Copy link
Contributor

@keita-determined keita-determined left a comment

Choose a reason for hiding this comment

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

the PR title is truncated

silent: false,
type: ErrorType.Server,
});
if (e instanceof DetError && e.type === ErrorType.Server) {
Copy link
Contributor

Choose a reason for hiding this comment

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

only difference here is publicMessage, so i think we can use ternary operator.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@AmanuelAaron AmanuelAaron changed the title fix: return proper error message when moving a project with a matchin… fix: return proper error message when moving a project with a matching names Aug 5, 2024
@AmanuelAaron AmanuelAaron merged commit 1f7473c into main Aug 6, 2024
81 of 95 checks passed
@AmanuelAaron AmanuelAaron deleted the aaron_amanuel/fix-move-project-error-message branch August 6, 2024 18:47
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