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

enable passed one-time scheduled actions to be rescheduled #455

Merged
merged 6 commits into from
Dec 9, 2024

Conversation

nyobe
Copy link
Contributor

@nyobe nyobe commented Dec 6, 2024

One-time schedules are soft-deleted after running, which means updating their schedule doesn't work because the action is never actually picked up again by the scheduler. (Prior to https://github.com/pulumi/pulumi-service/pull/24133 the update would appear to succeed, but the scheduled action would just silently never run. Now at least you get an error indicating the schedule was deleted.)

This PR enables rescheduling to work correctly by forcing the schedule to be replaced when its timestamp is updated.

Partially addresses #449

@nyobe nyobe force-pushed the claire/fix-rescheduling-after-run branch from a96cb2f to ec17b81 Compare December 6, 2024 18:44
Copy link

github-actions bot commented Dec 6, 2024

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

@nyobe nyobe marked this pull request as ready for review December 6, 2024 23:24
@nyobe nyobe marked this pull request as draft December 6, 2024 23:54
@nyobe nyobe force-pushed the claire/fix-rescheduling-after-run branch 3 times, most recently from 4022a4a to 6727bf2 Compare December 7, 2024 02:44
@nyobe nyobe force-pushed the claire/fix-rescheduling-after-run branch from 6727bf2 to 7c43fd7 Compare December 9, 2024 06:49
@nyobe nyobe marked this pull request as ready for review December 9, 2024 19:34
replaceOnChanges causes the generated sdks to apply an extra replaceOnChanges resource option that it passes through to the provider plugin.  However, the yaml language doesn't have a generated sdk, so it doesn't work properly there.

Instead, we now check for replacement in the provider plugin's Diff method instead, so it always works, and document this with `willReplaceOnChanges` (which is only used for documentation).
@nyobe nyobe force-pushed the claire/fix-rescheduling-after-run branch from c2c0bdb to b0ca860 Compare December 9, 2024 19:40
@nyobe nyobe enabled auto-merge (squash) December 9, 2024 20:01
@nyobe nyobe merged commit 70aebb0 into main Dec 9, 2024
22 of 23 checks passed
@nyobe nyobe deleted the claire/fix-rescheduling-after-run branch December 9, 2024 20:09
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (d8143d5) to head (eebf0f8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #455   +/-   ##
===========================
===========================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pulumi-bot
Copy link

This PR has been shipped in release v0.27.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants