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(modules/gitlab_runners): pass paused to gitlab #8648

Merged

Conversation

ap-wtioit
Copy link
Contributor

@ap-wtioit ap-wtioit commented Jul 16, 2024

SUMMARY

The paused module parameter needs to passed to the create_or_update method to work.

As of now (gitlab 17.1.0) active: False is still working. But the gitlab_runner module silently ignored paused: True and always responded with No need to update the runner ... if a runner was updated with a changed paused attribute. Creating a runner with paused: True also did not create a runner in paused state.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

gitlab_runner

ADDITIONAL INFORMATION
  • Create a runner with paused: True has the runner not paused in gitlab after creation

Or

  • Create a runner
  • Updated the runner with paused: True states: No need to update the runner ...
  • The runner is not paused in gitlab

Info @wt-io-it

@ap-wtioit ap-wtioit force-pushed the fix/gitlab-runner-paused branch from 02aa8ee to 8f20094 Compare July 16, 2024 14:51
@ansibullbot ansibullbot added WIP Work in progress bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type) labels Jul 16, 2024
@ap-wtioit
Copy link
Contributor Author

ap-wtioit commented Jul 16, 2024

TODOs (for me):

  • check if we can pass paused to all supported gitlab versions or if we need to handle this differently (tested on our instance v17.1.2)

    update: added version switch (provide pause only for gitlab>=14.8)

  • note: active and paused are not exclusive on our instance

    update: the module only passes one of those attributes to the gitlab instance (prefering paused), i guess starting with gitlab 17 active is no longer working (i only noticed it after our update to 17)

@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-8 Automatically create a backport for the stable-8 branch backport-9 Automatically create a backport for the stable-9 branch labels Jul 16, 2024
@ap-wtioit ap-wtioit force-pushed the fix/gitlab-runner-paused branch from 8f20094 to 7022cdc Compare July 18, 2024 08:36
@ap-wtioit ap-wtioit marked this pull request as ready for review July 18, 2024 08:52
@ansibullbot ansibullbot removed the WIP Work in progress label Jul 18, 2024
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

changelogs/fragments/8648-fix-gitlab-runner-paused.yaml Outdated Show resolved Hide resolved
@ap-wtioit ap-wtioit force-pushed the fix/gitlab-runner-paused branch from 7022cdc to d4df47e Compare July 22, 2024 06:07
@felixfontein
Copy link
Collaborator

If nobody objects, I'll merge this in 1-2 weeks.

Copy link
Contributor

@nejch nejch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Aug 1, 2024
@felixfontein felixfontein merged commit b6c6253 into ansible-collections:main Aug 1, 2024
147 checks passed
Copy link

patchback bot commented Aug 1, 2024

Backport to stable-8: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-8/b6c6253bfc8bd34e3f45ece1d3cb5df57d965214/pr-8648

Backported as #8700

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Copy link

patchback bot commented Aug 1, 2024

Backport to stable-9: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-9/b6c6253bfc8bd34e3f45ece1d3cb5df57d965214/pr-8648

Backported as #8701

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator

@ap-wtioit thanks for your contribution!
@nejch thanks for reviewing!

patchback bot pushed a commit that referenced this pull request Aug 1, 2024
felixfontein pushed a commit that referenced this pull request Aug 1, 2024
…ass paused to gitlab (#8701)

fix(modules/gitlab_runners): pass paused to gitlab (#8648)

(cherry picked from commit b6c6253)

Co-authored-by: Andreas Perhab <a.perhab@wtioit.at>
felixfontein pushed a commit that referenced this pull request Aug 1, 2024
…ass paused to gitlab (#8700)

fix(modules/gitlab_runners): pass paused to gitlab (#8648)

(cherry picked from commit b6c6253)

Co-authored-by: Andreas Perhab <a.perhab@wtioit.at>
aioue pushed a commit to aioue/community.general that referenced this pull request Oct 1, 2024
TobiasZeuch181 pushed a commit to TobiasZeuch181/zypper_repository_add_list that referenced this pull request Oct 2, 2024
Massl123 pushed a commit to Massl123/community.general that referenced this pull request Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8 Automatically create a backport for the stable-8 branch backport-9 Automatically create a backport for the stable-9 branch bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants