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

(aws-ecs-patterns): allow ScheduledTaskBase be created in a DISABLED state #12836

Closed
1 of 2 tasks
ScottWalkerAU opened this issue Feb 2, 2021 · 1 comment · Fixed by #12837
Closed
1 of 2 tasks

(aws-ecs-patterns): allow ScheduledTaskBase be created in a DISABLED state #12836

ScottWalkerAU opened this issue Feb 2, 2021 · 1 comment · Fixed by #12837
Assignees
Labels
@aws-cdk/aws-ecs-patterns Related to ecs-patterns library effort/small Small work item – less than a day of effort feature-request A feature should be added or improved.

Comments

@ScottWalkerAU
Copy link
Contributor

ScottWalkerAU commented Feb 2, 2021

Allow ScheduledTaskBase and thus ScheduledFargateTask to set the eventRule's state to DISABLED, by passing in enabled: false

Use Case

I have multiple test branches for a given application. I only want the primary branch (master) to execute on a schedule.
However, I want the scheduled tasks to still exist for the other test branches for QA and testing purposes:

  • To mimic production as close as possible.
  • To assert that the eventRule is still being created after changes on the branches.
  • To be able to turn off the master test rule and enable a development branch's rule.

Proposed Solution

Change the constructor for ScheduledTaskBase
from:

    this.eventRule = new Rule(this, 'ScheduledEventRule', {
      schedule: props.schedule,
      ruleName: props.ruleName,
    });

to

    this.eventRule = new Rule(this, 'ScheduledEventRule', {
      schedule: props.schedule,
      ruleName: props.ruleName,
      enabled: props.enabled,
    });

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@ScottWalkerAU ScottWalkerAU added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 2, 2021
@peterwoodworth peterwoodworth added the @aws-cdk/aws-ecs-patterns Related to ecs-patterns library label Feb 3, 2021
@SoManyHs SoManyHs added effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 15, 2021
@mergify mergify bot closed this as completed in #12837 Feb 15, 2021
mergify bot pushed a commit that referenced this issue Feb 15, 2021
…LED state (#12837)

fixes #12836

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

NovakGu pushed a commit to NovakGu/aws-cdk that referenced this issue Feb 18, 2021
…LED state (aws#12837)

fixes aws#12836

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
eladb pushed a commit that referenced this issue Feb 22, 2021
…LED state (#12837)

fixes #12836

----

*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
@aws-cdk/aws-ecs-patterns Related to ecs-patterns library effort/small Small work item – less than a day of effort feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants