fix: active runner check - #1
Open
n3xt-cr wants to merge 42 commits into
Open
Conversation
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Fix deadline check logic
The k8s operator seems to want to define its own endpoint. This change allows the removal of the default gh endpoint if no credentials are tied to it. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
…-mutable Make the default github.com endpoint mutable
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Relax update endpoint validation
This change triggers tests for PRs created against release/* branches. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Trigger tests on release branches
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Add write lock for sqlite3
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Update dependencies.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Fix show webhooks.
This change sets the github client http transport options to mirror those of the default transport from Go, with the addition of the TLSClientConfig. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
…ptions Set http transport config
Update all dependencies. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
…cies Update dependencies
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Update docs to reflect new release
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Bump provider versions
This change moves the check for max runners within the CreateInstance function, which will check that the pool max runners is not yet reached within a transaction before creating a new instance. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
It seems that on some systems like k8s, rfc 1123 is a hard requirement and validation fails if hostnames have any uppercase letters, leading to nodes not being able to join. This change makes all runner names lowercase, hopefully fixing this. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Equinix metal is no longer available as a service. This change removes references to Qeuinix metal. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
Equinix metal is no longer available as a service. This change removes references to Qeuinix metal. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
… GitHub verification Addresses ticket #7530: Garm's cleanupOrphanedProviderRunners was deleting active runners because they were missing from the bulk GetGithubRunners() list (due to pagination, rate limiting, or API transients). This resulted in jobs being killed mid-execution. Changes: 1. Added GetEntityRunner() API method to github client interface and implementations - Allows targeted lookup of a single runner by GitHub runner ID - Implemented for repository, organization, and enterprise scopes - Adds comprehensive error handling and metrics 2. Enhanced cleanupOrphanedProviderRunners logic: - For active runners missing from bulk list, now performs targeted verification - If GetEntityRunner(agentID) succeeds, runner is retained (bulk list had gap) - If GitHub returns 404, runner is treated as true orphan - If API errors occur, cleanup is skipped (fail-safe on transient issues) - Fallback to name-based lookup for runners without AgentID 3. Updated test infrastructure: - Added stub implementation in stub_client.go - Generated mock implementations for testing frameworks This prevents both false-positive deletions (active runners killed) and resource leaks (missed webhooks keeping dead runners forever) by requiring external verification. Fixes: #7530
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.