Skip to content

Conversation

@abailly-akamai
Copy link
Contributor

@abailly-akamai abailly-akamai commented Aug 13, 2025

Description 📝

The front-end validation was missing from the IAM CreateUser drawer, resulting on waiting for an API response and getting a rather unhelpful generic response ("Invalid username or email address").

I added the missing yup resolver (which is also used in the legacy /account/users CreateUser drawer). In addition I improved the error messaging and validation schema based on what the API does, see:
ApiNext > validators > username_validator.py

Changes 🔄

  • Add missing resolver in IAM CreateUser drawer
  • Improve username validation schema based on API Next
  • Implement test suite to validate error handling

Scope 🚢

Upon production release, changes in this PR will be visible to:

  • All customers
  • Some customers (e.g. in Beta or Limited Availability)
  • No customers / Not applicable

Target release date 🗓️

8/26/2025

Preview 📷

Screenshot 2025-08-13 at 14 02 15

How to test 🧪

Prerequisites

IAM enabled account

Reproduction steps

  • go to /iam/users
  • click on "Add a User"
  • add a wrong username (for instance): foo$bar
  • submit form
  • notice the form submit and API returns an error

Verification steps

  • go to /iam/users
  • click on "Add a User"
  • add a wrong username (for instance): foo$bar
  • submit form
  • confirm front-end error handling

💡 in addition:

  • try various usernames to check field validation
  • try the create user form at /account/users to confirm no regression
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support

  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@abailly-akamai abailly-akamai marked this pull request as ready for review August 13, 2025 12:24
@abailly-akamai abailly-akamai requested a review from a team as a code owner August 13, 2025 12:24
@abailly-akamai abailly-akamai requested review from hana-akamai and hasyed-akamai and removed request for a team August 13, 2025 12:24
onClick={() => setIsCreateDrawerOpen(true)}
sx={{
maxWidth: '120px',
}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was really bothering me!

Before After
Image Image

@jaalah-akamai jaalah-akamai added the Add'tl Approval Needed Waiting on another approval! label Aug 13, 2025
Copy link
Contributor

@hana-akamai hana-akamai left a comment

Choose a reason for hiding this comment

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

It looks like devcloud has some issues right now so I wasn't able to create an actual user but validation looks good

Unrelated, I noticed an issue with bad grant calls for each user so I created M3-10478 to look into that

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Aug 13, 2025
@hana-akamai hana-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Aug 13, 2025
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 1 failing test on test run #5 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
1 Failing717 Passing4 Skipped129m 7s

Details

Failing Tests
SpecTest
linode-storage.spec.tsCloud Manager Cypress Tests→linode storage tab » delete disk

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/linodes/linode-storage.spec.ts"

@abailly-akamai abailly-akamai merged commit 00a4dac into linode:develop Aug 14, 2025
34 of 35 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Multiple approvals and ready to merge! IAM (Identity & Access Management)

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants