Skip to content

Conversation

@peterdeme
Copy link
Contributor

@peterdeme peterdeme commented Aug 14, 2025

Description of the change

I have looked into our launcher/worker code recently and I have noticed that it'd quite easy to detect Spot Instance interruption signals, so I implemented a graceful shutdown behavior in our code.

I thought I'll explicitly mention some details in our TF module as well. If it functions as I expect it to, I'll extend our official documentation as well.

edit: I was able to test it and it works :)

Screenshot 2025-08-14 at 19 29 46

Type of change

  • Bug fix (non-breaking change that fixes an issue);
  • New feature (non-breaking change that adds functionality);
  • Breaking change (fix or feature that would cause existing functionality to not work as expected);
  • Documentation (a documentation or example fix not affecting the infrastructure managed by this module);

Checklists

Development

  • All necessary variables have been defined, with defaults if applicable;
  • The code is formatted properly;

Code review

  • The module version is bumped accordingly;
  • Spacelift tests are passing;
  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached;
  • This pull request is no longer marked as "draft";
  • Reviewers have been assigned;
  • Changes have been reviewed by at least one other engineer;

@peterdeme peterdeme force-pushed the spot-instance-capabality branch from 4fb4c28 to 58bb5de Compare August 14, 2025 10:22

### Graceful Spot Instance Interruption Handling

The Spacelift worker includes built-in spot instance interruption detection to minimize job disruption:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a recent development in the worker code that I did last night. I'm still testing it.

Copy link
Contributor Author

@peterdeme peterdeme Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just tested it and it works :)

Image

@peterdeme peterdeme force-pushed the spot-instance-capabality branch from 58bb5de to 2ea3b0b Compare August 14, 2025 12:57
@peterdeme peterdeme marked this pull request as ready for review August 14, 2025 18:08
@peterdeme peterdeme requested a review from a team as a code owner August 14, 2025 18:08
Copy link
Member

@TheOutdoorProgrammer TheOutdoorProgrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this just the example and docs? where is the rest?

@peterdeme
Copy link
Contributor Author

@Apollorion there is no rest, this is just documentation. we were always compatible with spot, we just never really recommended them.

Copy link
Member

@TheOutdoorProgrammer TheOutdoorProgrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I read this on my phone earlier and it looked like a variable was being added and not used. But now that Im looking at it on the computer this makes more sense.

@peterdeme peterdeme merged commit 1267942 into main Aug 15, 2025
14 checks passed
@peterdeme peterdeme deleted the spot-instance-capabality branch August 15, 2025 15:09
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.

3 participants