-
Notifications
You must be signed in to change notification settings - Fork 4k
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(scheduler): ScheduleGroup #26196
Conversation
There was a problem hiding this 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.
/** | ||
* Grant list and get schedule permissions for schedules in this group to the given principal | ||
*/ | ||
grantReadSchedules(identity: iam.IGrantable): iam.Grant; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compared to RFC I have updated the method names for granting permissions. From grantRead
to grantReadSchedules
- to be more precise that the method grants permissions to manage schedules in the group, not the permissions for the group itself.
There are IAM permissions for the schedules and for the groups.
resourceName: this.physicalName, | ||
}); | ||
this.groupName = this.physicalName; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a call to applyRemovalPolicy is missing here? This means the removalPolicy from the props will not be emitted to CloudFormation. (+ that needs a test)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I have actually missed that.
@default RemovalPolicy.RETAIN
Are we sure that we want the default to be RETAIN
?
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Plus this commit fixes access modifiers for methods in group.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @filletofish and @Jacco for the great start. have a few api questions but nothing major
- Remove addSchedules method - Update readme - Apply removal policy
TODO: Group is not yet implemented. See section in [L2 Event Bridge Scheduler RFC](https://github.com/aws/aws-cdk-rfcs/blob/master/text/0474-event-bridge-scheduler-l2.md) | ||
Your AWS account comes with a default scheduler group. You can access default group in CDK with: | ||
|
||
```text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these examples can be in ts
now? Since they should be fully implemented right. Then you will also have to double check with yarn rosetta:extract --strict
or else the PR build may fail :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated now, good catch
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). |
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 CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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). |
This PR contains implementation of ScheduleGroup. A Schedule is the main resource in Amazon EventBridge Scheduler, this PR adds ScheduleGroup which can be used to group Schedules and on which Schedule depends. Every AWS account comes with a default group for schedules. Customers can also create a custom groups to organise schedules that share a common purpose or belong to the same environment. Schedule has a property `group` that determines what group is the schedule associated with. To be able to test adding schedules to the group I have added property `group` to private class `Schedule` and used `Lazy` functionality to be able to update `group` of the schedule dynamically. Implementation is based on RFC: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0474-event-bridge-scheduler-l2.md Advances aws#23394 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This PR contains implementation of ScheduleGroup.
A Schedule is the main resource in Amazon EventBridge Scheduler, this PR adds ScheduleGroup which can be used to group Schedules and on which Schedule depends.
Every AWS account comes with a default group for schedules. Customers can also create a custom groups to organise schedules that share a common purpose or belong to the same environment.
Schedule has a property
group
that determines what group is the schedule associated with.To be able to test adding schedules to the group I have added property
group
to private classSchedule
and usedLazy
functionality to be able to updategroup
of the schedule dynamically.Implementation is based on RFC: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0474-event-bridge-scheduler-l2.md
Advances #23394
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license