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(lambda): wrong dimension for metrics on lambda versions #20836

Closed
wants to merge 2 commits into from

Conversation

varju
Copy link
Contributor

@varju varju commented Jun 22, 2022

This is a partial fix for #14248, addressing the incorrect dimension used when building metrics for Lambda Version resources.

This does not address the second issue in that ticket, where the Lambda version is always being used, even when working with aliases. Presumably fixing that would reintroduce the circular dependency issue with CodeDeploy that's mentioned in the comments.


All Submissions:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

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 Jun 22, 2022

@github-actions github-actions bot added the p2 label Jun 22, 2022
@aws-cdk-automation aws-cdk-automation requested a review from a team June 22, 2022 18:44
@varju varju marked this pull request as ready for review June 22, 2022 20:52
@mrgrain mrgrain self-assigned this Jul 22, 2022
@mrgrain
Copy link
Contributor

mrgrain commented Jul 22, 2022

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Jul 22, 2022

update

✅ Branch has been successfully updated

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@@ -231,12 +231,12 @@ export class Version extends QualifiedFunctionBase implements IVersion {
public metric(metricName: string, props: cloudwatch.MetricOptions = {}): cloudwatch.Metric {
// Metrics on Aliases need the "bare" function name, and the alias' ARN, this differs from the base behavior.
return super.metric(metricName, {
dimensions: {
dimensionsMap: {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I understand why the name of this was changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed this to fix a deprecation warning, because MetricProps now prefers dimensionMap instead of the older parameter.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, good catch.

@TheRealAmazonKendra TheRealAmazonKendra changed the title fix(aws-lambda): wrong dimension for metrics on lambda versions fix(lambda): wrong dimension for metrics on lambda versions Jul 30, 2022
Copy link
Contributor

@TheRealAmazonKendra TheRealAmazonKendra left a comment

Choose a reason for hiding this comment

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

OK, so I think that the code in this change is good, however, I have a couple of concerns here:

  1. This change should have broken an integration test somewhere, which means we're either missing integration test coverage here or that the output isn't correct. I suspect the former. Please update/add an integration test to make sure this functionality is covered.
  2. Our changelog is automatically generated from the PR title. Can you please make the title more specific to what is wrong so that it's more helpful to those reading the changelog?

Thanks for fixing this bug, we appreciate your work on this!

@@ -231,12 +231,12 @@ export class Version extends QualifiedFunctionBase implements IVersion {
public metric(metricName: string, props: cloudwatch.MetricOptions = {}): cloudwatch.Metric {
// Metrics on Aliases need the "bare" function name, and the alias' ARN, this differs from the base behavior.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment line is now incorrect with this change. Please make sure it gets updated.

@aws-cdk-automation
Copy link
Collaborator

This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

@mrgrain mrgrain removed their assignment Aug 23, 2022
@aws-cdk-automation
Copy link
Collaborator

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

@aws-cdk-automation aws-cdk-automation added the closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. label Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants