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

Use default labels when deploying service into ECS and allow overwriting existing DB (web) #45180

Merged
merged 5 commits into from
Aug 21, 2024

Conversation

kimlisa
Copy link
Contributor

@kimlisa kimlisa commented Aug 6, 2024

part of #41004

required by #45179

@kimlisa kimlisa requested a review from GavinFrazar August 6, 2024 23:41
@github-actions github-actions bot requested review from Joerger and tigrato August 6, 2024 23:41
@kimlisa kimlisa requested review from greedy52 and removed request for tigrato and Joerger August 6, 2024 23:41
Copy link

github-actions bot commented Aug 6, 2024

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 changelog: followed by the changelog entries for the PR.

@kimlisa kimlisa added the no-changelog Indicates that a PR does not require a changelog entry label Aug 6, 2024
@kimlisa kimlisa mentioned this pull request Aug 6, 2024
Copy link
Contributor

@greedy52 greedy52 left a comment

Choose a reason for hiding this comment

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

any test update?

lib/web/databases.go Outdated Show resolved Hide resolved
lib/web/integrations_awsoidc.go Outdated Show resolved Hide resolved
lib/web/ui/integration.go Show resolved Hide resolved
@kimlisa kimlisa requested a review from greedy52 August 9, 2024 04:22
Comment on lines 117 to 119
databaseAgentMatcherLabels[types.DiscoveryLabelVPCID] = []string{req.VPCID}
databaseAgentMatcherLabels[types.DiscoveryLabelRegion] = []string{req.Region}
databaseAgentMatcherLabels[types.DiscoveryLabelAccountID] = []string{req.AccountID}
Copy link
Contributor

Choose a reason for hiding this comment

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

We are not checking this variables.
Does the UI always send them?

Copy link
Contributor Author

@kimlisa kimlisa Aug 20, 2024

Choose a reason for hiding this comment

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

thanks for catching this. here is the change

i left the merging of labels as is, just in case we want to bring back custom labels back in the future (probably not likely since we want to keep things as simple as possible), but atm the UI will no longer allow any custom labels

@kimlisa kimlisa force-pushed the lisa/web-rds-backend-fields branch from 0beb819 to 678f00b Compare August 20, 2024 22:19
Comment on lines 124 to 133
if len(req.VPCID) == 0 {
return nil, trace.BadParameter("vpc ID is required")
}
if len(req.Region) == 0 {
return nil, trace.BadParameter("AWS region is required")
}
if len(req.AccountID) == 0 {
return nil, trace.BadParameter("AWS account ID is required")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

💅
Checking for empty strings is usually done with == "" instead of using len.
I had to double check if those variables were string or lists 😅

@kimlisa kimlisa force-pushed the lisa/web-rds-backend-fields branch from 678f00b to d56d28f Compare August 21, 2024 15:31
@kimlisa kimlisa enabled auto-merge August 21, 2024 15:33
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from GavinFrazar August 21, 2024 17:18
@kimlisa kimlisa added this pull request to the merge queue Aug 21, 2024
github-merge-queue bot pushed a commit that referenced this pull request Aug 21, 2024
…ing existing DB (web) (#45180)

* Allow overwriting an existing database

* Default to pre-defined labels when deploying service into ecs

* Address CRs

* Reuse create database endpoint to support overwrite

Revert database update logic

* Add checks for required fields for default labels
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 21, 2024
@kimlisa kimlisa added this pull request to the merge queue Aug 21, 2024
Merged via the queue into master with commit f92ee2b Aug 21, 2024
39 checks passed
@kimlisa kimlisa deleted the lisa/web-rds-backend-fields branch August 21, 2024 18:16
@public-teleport-github-review-bot

@kimlisa See the table below for backport results.

Branch Result
branch/v16 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v16 no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants