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

TTLschedule Resource can't be deleted when TTL schedule runs #451

Closed
MitchellGerdisch opened this issue Dec 3, 2024 · 2 comments
Closed
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Milestone

Comments

@MitchellGerdisch
Copy link

What happened?

If you deploy a stack that manages it's own TTL schedule, when deployments runs the schedule, the TTL schedule is removed from the service, and pulumi's attempt to delete the TTL schedule as part of the destroy that occurs fails with an error like:
error: failed to delete schedule with scheduleId 354e68ed-1f04-4565-bff9-1f4da1703e26 : 404 API error: Not Found: ScheduledAction '354e68ed-1f04-4565-bff9-1f4da1703e26' not found

This may be due to a change in Pulumi Cloud itself since this did not happen as recently as 10 days ago.

Example

Set up a stack with a deployment configured.
Then use code like the following to manage it's TTL schedule such that the schedule runs and see it fail.

import pulumi_pulumiservice as pulumiservice

ttlsched = pulumiservice.TtlSchedule("ttlsched", pulumiservice.TtlScheduleArgs(
    organization=pulumi.get_organization(),
    project=pulumi.get_project(),
    stack=pulumi.get_stack(),
    timestamp="2025-01-01T00:00:00Z"),
    opts=pulumi.ResourceOptions(retain_on_delete=True)
)

Output of pulumi about

CLI
Version 3.139.0
Go Version go1.23.3
Go Compiler gc

Plugins
KIND NAME VERSION
resource pulumiservice 0.27.1
language python unknown

Host
OS darwin
Version 15.1
Arch x86_64

Backend
Name pulumi.com

Dependencies:
NAME VERSION
netaddr 1.3.0
pip 24.0
pulumi_aws 6.61.0
setuptools 65.5.0

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@MitchellGerdisch MitchellGerdisch added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Dec 3, 2024
@MitchellGerdisch
Copy link
Author

Maybe related to #449

@MitchellGerdisch
Copy link
Author

MitchellGerdisch commented Dec 3, 2024

This can be worked around by using the retainOnDelete resource option.
But, it does cause issues if the stack is destroyed and updated before the TTL schedule runs since it'll create additional TTL schedules.

@nyobe nyobe self-assigned this Dec 3, 2024
@komalali komalali removed the needs-triage Needs attention from the triage team label Dec 4, 2024
@komalali komalali added this to the 0.114 milestone Dec 4, 2024
@nyobe nyobe closed this as completed Dec 6, 2024
@nyobe nyobe closed this as completed Dec 6, 2024
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

4 participants