Web: Require S3 fields when creating/editing AWS OIDC Integration#39285
Web: Require S3 fields when creating/editing AWS OIDC Integration#39285
Conversation
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
2 similar comments
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
5882a8d to
027fe43
Compare
|
friendly ping 🙏 @ryanclark @ibeckermayer |
| <Box | ||
| requiresS3={requiresS3} | ||
| px={3} | ||
| pt={2} | ||
| css={` | ||
| border-radius: ${p => p.theme.space[1]}px; | ||
| border: 2px solid | ||
| ${p => { | ||
| if (p.requiresS3) { | ||
| return p.theme.colors.warning.main; | ||
| } | ||
| return p.theme.colors.spotBackground[1]; | ||
| }}; | ||
| background-color: ${p => { | ||
| if (p.requiresS3) { | ||
| return p.theme.colors.interactive.tonal.alert[0]; | ||
| } | ||
| return p.theme.colors.spotBackground[0]; | ||
| }}; | ||
| `} | ||
| > |
There was a problem hiding this comment.
At this point, why not use const Whatever = styled(Box)``;
|
|
||
| import { requiredBucketName, requiredPrefixName } from './Shared/utils'; | ||
|
|
||
| export function S3Bucket({ |
There was a problem hiding this comment.
S3Bucket is a bit ambiguous. Maybe S3BucketConfiguration or S3BucketForm?
| expect(screen.queryByText(script)).not.toBeInTheDocument(); | ||
| expect(screen.queryByText(checkbox)).not.toBeInTheDocument(); |
There was a problem hiding this comment.
Is there a better way to match these elements vs text? Even resorting to data-testid will ensure these tests don't break if any copy changes
| if (inputVal.length < 3 || inputVal.length > 63) { | ||
| return { | ||
| valid: false, | ||
| message: 'only 3-63 characters long', |
There was a problem hiding this comment.
How does this read in the UI? Should it be Field should be 3-63 characters?
| if (!bucketNameRegex.test(inputVal)) { | ||
| return { | ||
| valid: false, | ||
| message: 'only - (in between words), a-z, and 0-9', |
There was a problem hiding this comment.
This could do with rewording also
9bad88b to
3b49cb2
Compare
There was a problem hiding this comment.
Is it really arbitrary or some cap for something? hurts my heart seeing 63 instead of 64
There was a problem hiding this comment.
Yeah, I was wondering about all these random checks and it's all real
https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html
bdefe93 to
af8e4f5
Compare
…9285) * Add s3 fields to URL param * Add s3 fields to integration awsoidc type * Create S3Bucket component, utils, fixtures * Allow s3 fields to be editable * Give warning status if s3 fields are not defined * Require s3 fields when creating * Update types, story, language, address CRs
…on (#39513) * Web: Require S3 fields when creating/editing AWS OIDC Integration (#39285) * Add s3 fields to URL param * Add s3 fields to integration awsoidc type * Create S3Bucket component, utils, fixtures * Allow s3 fields to be editable * Give warning status if s3 fields are not defined * Require s3 fields when creating * Update types, story, language, address CRs * Fix import


part of #38782 (a bug fix)
recommend reviewing by commit
Before merge:
Require filling out S3 fields when creating:

http://192.168.0.103:9002/?path=/story/teleport-integrations-enroll-awsoidc--flow&globals=theme:Light%20Theme
Render warning with tooltip if integration is missing s3 fields:

Require missing s3 fields if editing integration:

Give user ability to edit s3 fields if editing:

Stories under
Teleport/Integrationschangelog: Require AWS S3 bucket fields when creating/editing AWS OIDC integration in the web UI