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

feat: clean up stale builds after potential crash #62

Merged
merged 3 commits into from
Aug 5, 2024

Conversation

williams-jack
Copy link
Collaborator

Feature/Problem Description

The build service may crash while building an image, where either the image will now have a .tgz file on the server after being build or may not have fully finished building, in which case we need to re-build the image.

Solution (Changes Made)

  • On init of the build service, checks to see if any ImageBuildInfo objects in the DB are marked inProgress. If so:
    • Check if the image built. If it did, release all of its jobs and clean up its Dockerfile if it exists.
    • If not, set inProgress to false for the build to be picked up again.

@williams-jack williams-jack merged commit ca7533e into main Aug 5, 2024
2 checks passed
@williams-jack williams-jack deleted the feat/clean-up-stale-data branch August 5, 2024 02:38
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.

1 participant