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

feat(rds): Validate log types for clusters #9797

Merged
merged 6 commits into from Aug 19, 2020

Conversation

njlynch
Copy link
Contributor

@njlynch njlynch commented Aug 18, 2020

This builds on #9772 to add validation for the types of logs that are available
on each cluster type (by engine).

Notes:


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

Enables exporting database cluster logs to CloudWatch logs.

fixes #7810
This builds on #9772 to add validation for the types of logs that are available
on each cluster type (by engine).

Notes:
* Currently a draft: I want feedback on this approach before either adding some
  constants for ease-of-use and porting a similar approach to instances.
* This is built off of #9772, so includes the changes from #9772 while it is
  pending a push/merge.
@njlynch njlynch added the pr-linter/exempt-readme The PR linter will not require README changes label Aug 18, 2020
@njlynch njlynch requested a review from a team August 18, 2020 13:52
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 18, 2020
Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

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

Love it! 2 small comments/suggestions.

@@ -61,6 +61,9 @@ export interface IClusterEngine extends IEngine {
/** The application used by this engine to perform rotation for a multi-user scenario. */
readonly multiUserRotationApplication: secretsmanager.SecretRotationApplication;

/** The log types that are available with this engine type */
readonly logTypes: string[];
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Should this be optional? With the understanding that undefined means "no validation will happen"?
  2. I feel like this name is a little too terse 🙂. supportedLogTypes perhaps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. Should this be optional?

My take on this is that we know the defined values for the existing clusters, so there's (currently) no reason to make this optional. Would the motivation just be future-proofing?

  1. I feel like this name is a little too terse 🙂. supportedLogTypes perhaps?

Sure.

packages/@aws-cdk/aws-rds/lib/cluster.ts Outdated Show resolved Hide resolved
@mergify
Copy link
Contributor

mergify bot commented Aug 18, 2020

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

@njlynch njlynch marked this pull request as ready for review August 19, 2020 12:50
@mergify
Copy link
Contributor

mergify bot commented Aug 19, 2020

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

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 07890e8
  • 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 Aug 19, 2020

Thank you for contributing! Your pull request will be updated from master 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 85fdeb5 into master Aug 19, 2020
@mergify mergify bot deleted the njlynch/rds-cluster-cwlogs-validation branch August 19, 2020 13:36
misterjoshua pushed a commit to misterjoshua/aws-cdk that referenced this pull request Aug 19, 2020
This builds on aws#9772 to add validation for the types of logs that are available
on each cluster type (by engine).

Notes:
* Currently a draft: I want feedback on this approach before either adding some
  constants for ease-of-use and porting a similar approach to instances.
* This is built off of aws#9772, so includes the changes from aws#9772 while it is
  pending a push/merge.
* Added pr-linter/exempt-readme label (for now) as the current change is validation only.
  Will add README changes if/when this includes some usable constants.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. pr-linter/exempt-readme The PR linter will not require README changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants