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(codedeploy): unable to remove alarms from deployment group #23308

Merged
merged 3 commits into from
Feb 14, 2023
Merged

fix(codedeploy): unable to remove alarms from deployment group #23308

merged 3 commits into from
Feb 14, 2023

Conversation

cecheta
Copy link
Contributor

@cecheta cecheta commented Dec 10, 2022


Closes #23307.

Disables CodeDeploy deployment group alarm configuration when alarms are removed from the deployment group. Also allows user to disable an alarm configuration even if alarms are associated with the group.

All Submissions:

Adding new Construct Runtime Dependencies:

  • This PR adds new construct runtime 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 Dec 10, 2022

@github-actions github-actions bot added repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK bug This issue is a bug. p2 labels Dec 10, 2022
@aws-cdk-automation aws-cdk-automation requested a review from a team December 10, 2022 18:42
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.

@cecheta cecheta changed the title wip (codedeploy): unable to remove alarms from deployment group Dec 10, 2022
@cecheta cecheta changed the title (codedeploy): unable to remove alarms from deployment group fix(codedeploy): unable to remove alarms from deployment group Dec 10, 2022
@aws-cdk-automation aws-cdk-automation dismissed their stale review December 10, 2022 18:56

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

@HBobertz HBobertz assigned HBobertz and unassigned HBobertz Dec 12, 2022
Copy link
Contributor

@comcalvi comcalvi left a comment

Choose a reason for hiding this comment

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

This PR adds an extra configuration property to solve a problem that's caused by the construct logic not automatically removing something that it should. Can we scope this back to remove the manual option, and just disable it as needed? If a user really needs to configure this by hand they can use escape hatches, unless there's a use case for manually configuring them.

Comment on lines 149 to 155
/**
* Whether to enable the alarm configuration.
*
* @default true if the deployment group is associated with alarms, otherwise false
*/
readonly alarmsEnabled?: boolean;

Copy link
Contributor

Choose a reason for hiding this comment

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

why does this need to be user-facing? The linked issue states that the alarms aren't being disabled when the alarms are finished. Can we just render alarms as disabled when there are no alarms?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

@comcalvi comcalvi self-assigned this Dec 23, 2022
@mergify mergify bot dismissed comcalvi’s stale review December 27, 2022 15:36

Pull request has been modified.

Copy link
Contributor

@comcalvi comcalvi left a comment

Choose a reason for hiding this comment

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

Nice work on this! Just an extra test and we can merge it.

Comment on lines +62 to +64
"AlarmConfiguration": {
"Enabled": false
},
Copy link
Contributor

Choose a reason for hiding this comment

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

A user upgrading to a new version will see this in their diff, which we try to avoid. I don't think there's a way around this here, and we can allow it for this change.

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

@cecheta cecheta requested a review from comcalvi January 18, 2023 17:40
@mergify mergify bot dismissed comcalvi’s stale review January 18, 2023 17:40

Pull request has been modified.

Copy link
Contributor

@comcalvi comcalvi left a comment

Choose a reason for hiding this comment

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

This is a breaking change (however minor) so we need a feature flag for it. Take a look at #20765 for an example of adding a feature flag.

@mergify mergify bot dismissed comcalvi’s stale review February 12, 2023 01:39

Pull request has been modified.

@cecheta
Copy link
Contributor Author

cecheta commented Feb 12, 2023

This is a breaking change (however minor) so we need a feature flag for it. Take a look at #20765 for an example of adding a feature flag.

Added

comcalvi
comcalvi previously approved these changes Feb 13, 2023
Copy link
Contributor

@comcalvi comcalvi left a comment

Choose a reason for hiding this comment

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

looks good granting provisional approval until the merge conflicts are fixed

@comcalvi comcalvi added the pr/do-not-merge This PR should not be merged at this time. label Feb 13, 2023
@mergify mergify bot dismissed comcalvi’s stale review February 14, 2023 07:54

Pull request has been modified.

@comcalvi comcalvi removed the pr/do-not-merge This PR should not be merged at this time. label Feb 14, 2023
@mergify
Copy link
Contributor

mergify bot commented Feb 14, 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).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 86cfa34
  • 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 eee005f into aws:main Feb 14, 2023
@mergify
Copy link
Contributor

mergify bot commented Feb 14, 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(codedeploy): unable to remove alarms from deployment group
4 participants