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(rds): unable to create cluster with per-instance parameters (under feature flag) #27040

Merged

Conversation

go-to-k
Copy link
Contributor

@go-to-k go-to-k commented Sep 7, 2023

This PR fixes that DatabaseCluster cannot create multiple readers with each parameters.

Closes #27035.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p1 labels Sep 7, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team September 7, 2023 06:01
@github-actions github-actions bot added the admired-contributor [Pilot] contributed between 13-24 PRs to the CDK label Sep 7, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@go-to-k go-to-k marked this pull request as draft September 7, 2023 06:03
@go-to-k go-to-k marked this pull request as ready for review September 7, 2023 06:07
@go-to-k
Copy link
Contributor Author

go-to-k commented Sep 7, 2023

Exemption Request because I think this bug can be covered in an unit test.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Sep 7, 2023
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Sep 7, 2023
Copy link
Contributor

@mrgrain mrgrain left a comment

Choose a reason for hiding this comment

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

Thanks @go-to-k for this change!

I think we should just put this behind a feature flag. That makes it the default for new apps and opt-in for existing apps.

@@ -456,7 +456,7 @@ class AuroraClusterInstance extends Resource implements IAuroraClusterInstance {

const instanceParameterGroup = props.parameterGroup ?? (
props.parameters
? new ParameterGroup(props.cluster, 'InstanceParameterGroup', {
? new ParameterGroup(props.cluster, `${id}InstanceParameterGroup`, {
Copy link
Contributor

Choose a reason for hiding this comment

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

I reckon this would be better:

Suggested change
? new ParameterGroup(props.cluster, `${id}InstanceParameterGroup`, {
? new ParameterGroup(this, `InstanceParameterGroup`, {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I changed!

Copy link
Contributor Author

@go-to-k go-to-k Sep 19, 2023

Choose a reason for hiding this comment

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

I missed to change tests for this changes. I will apply...

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Sep 19, 2023
@go-to-k
Copy link
Contributor Author

go-to-k commented Sep 19, 2023

@mrgrain

Thanks for your review!

I think we should just put this behind a feature flag. That makes it the default for new apps and opt-in for existing apps.

I have never had a modification that required a feature flag. Is there anything I should do with this PR?

@mrgrain
Copy link
Contributor

mrgrain commented Sep 19, 2023

I have never had a modification that required a feature flag. Is there anything I should do with this PR?

Exciting! The required steps are described in the contributing guide. LMK if you run into any issues.

@mrgrain mrgrain changed the title fix(rds): Cannot create multiple readers with each parameters fix(rds): unable to use per-instance parameters Sep 19, 2023
@mrgrain mrgrain changed the title fix(rds): unable to use per-instance parameters fix(rds): unable to create cluster with per-instance parameters Sep 19, 2023
@mrgrain mrgrain removed the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Sep 19, 2023
@mrgrain
Copy link
Contributor

mrgrain commented Sep 19, 2023

Exemption Request because I think this bug can be covered in an unit test.

@go-to-k I would like to see this deploying though. You should be able to do a small adjustment to an existing integ test.
I can execute the test for you then.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Sep 19, 2023
@go-to-k go-to-k changed the title fix(rds): unable to create cluster with per-instance parameters fix(rds): unable to create cluster with per-instance parameters (under feature flag) Sep 20, 2023
@go-to-k
Copy link
Contributor Author

go-to-k commented Sep 20, 2023

@mrgrain

I tried to respond to the feature flag and an integ test. Please check if there is anything wrong.

@aws-cdk-automation aws-cdk-automation dismissed their stale review September 20, 2023 14:05

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

rix0rrr
rix0rrr previously approved these changes Sep 22, 2023
@mergify mergify bot dismissed stale reviews from rix0rrr and mrgrain September 22, 2023 12:53

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 138b3eb
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Sep 22, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 1be9894 into aws:main Sep 22, 2023
12 checks passed
@go-to-k go-to-k deleted the fix/with-multiple-readers-with-each-parameters branch September 22, 2023 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admired-contributor [Pilot] contributed between 13-24 PRs to the CDK bug This issue is a bug. effort/small Small work item – less than a day of effort p1 pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_rds: unable to use per-instance parameters
4 participants