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

Add support for setting check_interval #315

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

fkleon
Copy link
Contributor

@fkleon fkleon commented Feb 19, 2024

Add support to set check_interval in the global config section.

check_interval: Defines the interval length, in seconds, between the runner checking for new jobs.
The default value is 3. If set to 0 or lower, the default value is used.

See https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-global-section

This defaults to 0 which matches the default auto-generated config, and simply causes GitLab runner to use its default value (see above). So this shouldn't cause any change in behaviour for existing users of this role.

@fkleon fkleon force-pushed the feature-check-interval branch from 2e29f5e to 62ec42f Compare February 27, 2024 02:56
@fkleon fkleon requested a review from guenhter March 13, 2024 21:35
@fkleon
Copy link
Contributor Author

fkleon commented Mar 13, 2024

@guenhter just wondering if you can have another look at this?

@guenhter guenhter merged commit 1a6e8d7 into riemers:master Mar 14, 2024
1 check failed
@guenhter
Copy link
Collaborator

@fkleon Thx for this contribution

maybe you can keep your eyes open for incoming issues which might be caused by a this change.

@nvzkupu
Copy link
Contributor

nvzkupu commented Aug 10, 2024

This seems to break windows gitlab-runner deploys.

Even without adding gitlab_runner_check_interval: to my vars file and/or inventory, I get the following error when attempting to deploy a windows runner:

TASK [gitlab-runner : (Windows) Set check_interval option] *********************
fatal: [rmx-win-nv-01]: FAILED! => {"msg": "The powershell shell family is incompatible with the sudo become plugin"}

I tried explicitly setting the variable as gitlab_runner_check_interval: 30, but still get the same output.

Everything up until this point in my ansible run with this role completes normally.

Please see the included file for the run log:
ansible_output.txt

Reverting to v2.0.3 fixed this problem, so it does seem to be related to this change.

@fkleon
Copy link
Contributor Author

fkleon commented Aug 10, 2024

@nvzkupu I indeed had no way to test this on Windows, sorry!

Looks like the Windows tasks may not need to change user with become. Can you try removing the following line:

become: "{{ gitlab_runner_system_mode }}"

If that works, I'm happy to provide another pull request.

@nvzkupu
Copy link
Contributor

nvzkupu commented Aug 10, 2024

No worries at all!

Thank you for responding so quickly. 😄

I will give this a shot when I am back at work.

@shock0572
Copy link

@fkleon I can confirm for my colleague @nvzkupu
removing that line works like a charm

@fkleon
Copy link
Contributor Author

fkleon commented Aug 16, 2024

@nvzkupu @shock0572 Thanks for confirming! I submitted a PR with the fix here: #345

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.

4 participants