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(applicationautoscaling): timezone for ScheduledAction #29116

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

robertd
Copy link
Contributor

@robertd robertd commented Feb 15, 2024

Closes #22645
Closes #27754

Spiritual successor of #27052

Somewhat related to #21181 but that might be another PR down the road.

@pahud ✋ Please review. I'm not particularly fond of how aws-autoscaling module (here) is not using cdk.TimeZone class, hence why used it in this PR instead. I think we should we change aws-autoscaling implementation to do the same? It would be a breaking change... and most likely a brand new PR. LMK what you think. ✌️

Also, I may be slightly OCD but I kinda like better timezone vs timeZone, but I went with latter one to follow what aws-autoscaling did.

cc-ing @kaizencc for his input too 🙌 ... possibly related to #27105

Reason for this change

Timezones have been supported in AWS::ApplicationAutoScaling::ScalableTarget ScheduledAction for a while now.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scheduledaction.html#cfn-applicationautoscaling-scalabletarget-scheduledaction-timezone

Description of changes

Just added the support for timezones in scalableTarget.scaleOnSchedule

Description of how you validated changes

Added unit tests for this feature.

Checklist


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

@aws-cdk-automation aws-cdk-automation requested a review from a team February 15, 2024 00:20
@github-actions github-actions bot added distinguished-contributor [Pilot] contributed 50+ PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 labels Feb 15, 2024
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.

@robertd robertd force-pushed the appscaling-scaling-schedule-timezone branch from 6787f82 to ec75169 Compare February 15, 2024 00:42
@robertd robertd force-pushed the appscaling-scaling-schedule-timezone branch from ec75169 to 91d94e5 Compare February 15, 2024 01:38
@robertd
Copy link
Contributor Author

robertd commented Feb 15, 2024

Features must contain a change to an integration test file and the resulting snapshot.

This module doesn't have any integ tests.

Exemption Request

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Feb 15, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 15, 2024
@kaizencc
Copy link
Contributor

My biggest regret is getting my schedule -> core PR reverted 😭

@robertd
Copy link
Contributor Author

robertd commented Feb 15, 2024 via email

@kaizencc kaizencc added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Feb 15, 2024
@kaizencc kaizencc changed the title feat(applicationautoscaling): add timezone support for ScheduledAction feat(applicationautoscaling): timezone support for ScheduledAction Feb 15, 2024
@kaizencc kaizencc changed the title feat(applicationautoscaling): timezone support for ScheduledAction feat(applicationautoscaling): timezone for ScheduledAction Feb 15, 2024
@aws-cdk-automation aws-cdk-automation dismissed their stale review February 15, 2024 18:01

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

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 15, 2024
Copy link
Contributor

mergify bot commented Feb 15, 2024

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 8694125 into aws:main Feb 15, 2024
28 of 31 checks passed
@robertd robertd deleted the appscaling-scaling-schedule-timezone branch February 15, 2024 18:07
GavinZZ pushed a commit that referenced this pull request Feb 22, 2024
Closes #22645
Closes #27754

Spiritual successor of #27052

Somewhat related to #21181 but that might be another PR down the road.

@pahud ✋ Please review. I'm not particularly fond of how `aws-autoscaling` module ([here](https://github.com/aws/aws-cdk/blob/256cca4017a80f8643c5f5a5999a2ce0383eebf0/packages/aws-cdk-lib/aws-autoscaling/lib/scheduled-action.ts#L21)) is not using `cdk.TimeZone` class, hence why used it in this PR instead. I think we should we change `aws-autoscaling` implementation to do the same? It would be a breaking change... and most likely a brand new PR. LMK what you think. ✌️ 

Also, I may be slightly OCD but I kinda like better `timezone` vs `timeZone`, but I went with latter one to follow what `aws-autoscaling` did.

cc-ing @kaizencc for his input too 🙌  ... possibly related to #27105

### Reason for this change



Timezones have been supported in `AWS::ApplicationAutoScaling::ScalableTarget ScheduledAction` for a while now.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scheduledaction.html#cfn-applicationautoscaling-scalabletarget-scheduledaction-timezone


### Description of changes

Just added the support for `timezones` in `scalableTarget.scaleOnSchedule`

### Description of how you validated changes

Added unit tests for this feature.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*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
distinguished-contributor [Pilot] contributed 50+ PRs to the CDK effort/medium Medium work item – several days of effort 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/exemption-requested The contributor has requested an exemption to the PR Linter feedback.
Projects
None yet
3 participants