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

Cleaning up leftover runners for org/repo #149

Merged

Conversation

mihaelabalutoiu
Copy link
Contributor

@mihaelabalutoiu mihaelabalutoiu commented Aug 7, 2023

  • This PR implements cleanup of the orphan runners for org/repo.
  • I updated the PR with the following changes:
    • I replaced the log.Fatalf with panic to prevent the exit 1 from interrupting the defer statement.
    • I put graceful cleanup functions in a function called GracefulCleanup and deferred it first.
    • Make sure that the graceful cleanup functions are idempotent.
    • I also added two functions: (GhOrgRunnersCleanup and GhRepoRunnersCleanup) to forcefully delete the runners via GitHub API and deferred them after the GracefulCleanup function.

@gabriel-samfira gabriel-samfira merged commit 63d2764 into cloudbase:main Aug 9, 2023
4 checks passed
@mihaelabalutoiu mihaelabalutoiu deleted the add-cleanup-runners branch August 9, 2023 14:27
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