Skip to content

bug: reopen fail to identify runners when count >30 #238

@gchappel

Description

@gchappel

Summary

#197 appears to have returned; I can't confirm but I suspect that since the original bug report and PR, GitHub's API servers have stopped handling GET requests which contain a request body as this is not well-defined behaviour in the HTTP RFCs I could find (such as RFC9110):

Although request message framing is independent of the method used, content received in a GET request has no generally defined semantics, cannot alter the meaning or target of the request, and might lead some implementations to reject the request and close the connection because of its potential as a request smuggling attack (Section 11.2 of [HTTP/1.1])

My suggested fix is to use GET query parameters instead, I have a proposed fix which I am testing internally and if successful, I'll open a pull request to change the behaviour.

Issue Type

Bug Report

Ansible Version

ansible [core 2.15.13]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.9.22 (main, Apr 28 2025, 22:07:13) [GCC 12.2.0] (/usr/local/bin/python)
  jinja version = 3.1.6
  libyaml = True

Steps to Reproduce

- name: Install GitHub Actions Runner package for an org with more than 30 runners
  hosts: all
  gather_facts: true
  become: true
  become_user: root
  vars:
    access_token: "{{ lookup('env', 'GIT_TOKEN') }}"
    github_account: MyOrg
    runner_org: true
    runner_dir: "{{ data_disk_path }}/actions-runner/myorg"
    runner_user: "{{ actions_user }}"
    runner_labels: "{{ var.runner_labels }}"
    hide_sensitive_logs: true
  roles:
    - role: monolithprojects.github_actions_runner

Run this playbook against an org where there are > 30 runners, and only the first 30 will be returned meaning that some will fail to provision because this role does not recognise them as existing runners and will try to register them as new instead of skipping/replacing them.

Expected Results

All runners should be registered/skipped/replaced correctly as per their existing status

Actual Results

Runners which fall outside of the default `per_page` limit of `30` fail because this role tries to register them as new runners since they are not contained in the (truncated) list of existing runners

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions