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

Fix pods and runner api not in sync and other improvments #496

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hybner
Copy link
Contributor

@hybner hybner commented Oct 3, 2022

Fix reconcilation when pods was deleted.

When pods are deleted then podRunnerPairs should be reloaded, so it's
better to requeue reconcilation immediately.

When new pods are scale up then it takes some time usually a few seconds
to sync between pods and runner API and so there is no need to wait
whole period (default 1m) to sync.

Better scale up and down runners

We use ephemeral runners which shutdown after pipeline ends and after
this new runners starts. So I change behaviour to scale up new runners
when idle runners change to busy. This is change meaning minRunners
property to mininum idle Runners. This change respect maxRunners
property.

Lukas Hybner added 3 commits October 3, 2022 15:46
When pods are deleted then podRunnerPairs should be reloaded, so it's
better to requeue reconcilation immediately.

When new pods are scale up then it takes some time usually a few seconds
to sync between pods and runner API and so there is no need to wait
whole period (default 1m) to sync.

Signed-off-by: Lukas Hybner <git@hybner.net>
We use ephemeral runners which shutdown after pipeline ends and after
this new runners starts. So I change behaviour to scale up new runners
when idle runners change to busy. This is change meaning minRunners
property to mininum idle Runners. This change respect maxRunners
property.

Signed-off-by: Lukas Hybner <git@hybner.net>
Signed-off-by: Lukas Hybner <git@hybner.net>
@hybner hybner force-pushed the fix/podsAndRunnerApiNotInSync branch from 57d5dd6 to 5f7beae Compare October 3, 2022 13:47
@codecov
Copy link

codecov bot commented Oct 3, 2022

Codecov Report

Merging #496 (5f7beae) into master (5ba542c) will decrease coverage by 1.10%.
The diff coverage is 44.45%.

@@            Coverage Diff             @@
##           master     #496      +/-   ##
==========================================
- Coverage   64.22%   63.13%   -1.09%     
==========================================
  Files           3        3              
  Lines         313      320       +7     
==========================================
+ Hits          201      202       +1     
- Misses         86       91       +5     
- Partials       26       27       +1     
Impacted Files Coverage Δ
controllers/githubactionrunner_controller.go 56.40% <44.45%> (-0.36%) ⬇️
controllers/podrunner_types.go 96.00% <0.00%> (-4.00%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@lukashybner-ext90548
Copy link
Contributor

@davidkarlsen Is it possible to merge this PR?

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.

None yet

2 participants