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(cloudwatch): expose dashboardName property on the L2 Dashboard construct #17721

Merged
merged 8 commits into from
Apr 27, 2022

Conversation

pedrosola
Copy link
Contributor

Exposes dashboardName property on Dashboard construct.

closes issue #17648

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

@gitpod-io
Copy link

gitpod-io bot commented Nov 25, 2021

@github-actions github-actions bot added the @aws-cdk/aws-cloudwatch Related to Amazon CloudWatch label Nov 25, 2021
@NetaNir NetaNir added pr-linter/exempt-readme The PR linter will not require README changes pr-linter/exempt-test The PR linter will not require test changes labels Nov 27, 2021
@@ -108,6 +113,8 @@ export class Dashboard extends Resource {
}),
});

this.dashboardName = dashboard.dashboardName;
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the dashboard name is the resource physicalName you need to use getResourceNameAttribute .
This will ensure that if a name is not passed the Ref value will be used (and resolved at deploy time).

Take a look at examples such as S3 bucketName, autoscaling autoScalingGroupName

@@ -161,6 +161,21 @@ describe('Dashboard', () => {

});

test('DashboardName is exposed correctly when provided', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This tests is redundant, If this member visibility change it will be caught by the API compatibility check.

I have marked the PR as no test required so it will pass the linter, lets remove this test

@mergify mergify bot dismissed NetaNir’s stale review November 29, 2021 22:38

Pull request has been modified.

@pedrosola
Copy link
Contributor Author

Updated on fa90485:

  • Fix queue typo
  • Change dashboardName type to string
  • Use getResourceNameAttribute
  • Remove unnecessary tests

@pedrosola
Copy link
Contributor Author

@NetaNir any updates here?

@@ -108,6 +113,9 @@ export class Dashboard extends Resource {
}),
});

this.dashboardName = this.getResourceNameAttribute(dashboard.ref);
// dashboard.dashboardName;
Copy link
Contributor

Choose a reason for hiding this comment

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

?

@rix0rrr rix0rrr added feature-request A feature should be added or improved. p2 and removed @aws-cdk/aws-cloudwatch Related to Amazon CloudWatch pr-linter/exempt-readme The PR linter will not require README changes pr-linter/exempt-test The PR linter will not require test changes labels Mar 4, 2022
madeline-k
madeline-k previously approved these changes Mar 23, 2022
@mergify mergify bot dismissed madeline-k’s stale review March 23, 2022 22:21

Pull request has been modified.

@madeline-k madeline-k added pr-linter/exempt-readme The PR linter will not require README changes pr-linter/exempt-test The PR linter will not require test changes labels Mar 23, 2022
madeline-k
madeline-k previously approved these changes Mar 23, 2022
@TheRealAmazonKendra TheRealAmazonKendra added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Apr 27, 2022
@mergify mergify bot dismissed madeline-k’s stale review April 27, 2022 05:38

Pull request has been modified.

@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2022

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: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 77a69cd
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit 8cb5dff into aws:master Apr 27, 2022
@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2022

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes pr-linter/exempt-readme The PR linter will not require README changes pr-linter/exempt-test The PR linter will not require test changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants