Skip to content

TagBot is unable to release multiple versions in one job run #304

@thazhemadam

Description

@thazhemadam

TagBot seems to be unable to create GitHub releases when there are multiple releases that need to be made.

Noticed in SciMLSensitivity.
SciMLSensitivity's TagBot setup was broken for a while, due to which a few git tags were not automatically created, and the subsequent GitHub Releases were not published.

Running the TagBot workflow, with a lookback from (approximately) the last time a GitHub release was made1, throws an error while trying to create the GitHub release. The corresponding git tag, however, gets created.

Error stacktrace
Processing version v7.49.0 (aa07de7ffad1000011b83204f7054b2eb6113a8c)
Generating changelog for version v7.49.0 (aa07de7ffad1000011b83204f7054b2eb6113a8c)
Creating release v7.49.0 at aa07de7ffad1000011b83204f7054b2eb6113a8c
{'server': 'GitHub.com', 'date': 'Thu, 18 Jan 2024 10:59:59 GMT', 'content-type': 'application/json; charset=utf-8', 'transfer-encoding': 'chunked', 'x-github-media-type': 'github.v3; format=json', 'x-accepted-github-permissions': 'contents=write; contents=write,workflows=write', 'x-github-api-version-selected': '2022-11-28', 'x-ratelimit-limit': '1000', 'x-ratelimit-remaining': '196', 'x-ratelimit-reset': '1705576468', 'x-ratelimit-used': '804', 'x-ratelimit-resource': 'core', 'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset', 'access-control-allow-origin': '*', 'strict-transport-security': 'max-age=31536000; includeSubdomains; preload', 'x-frame-options': 'deny', 'x-content-type-options': 'nosniff', 'x-xss-protection': '0', 'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin', 'content-security-policy': "default-src 'none'", 'vary': 'Accept-Encoding, Accept, X-Requested-With', 'content-encoding': 'gzip', 'x-github-request-id': '5000:137E:C1BAE3:19273D6:65A904AF'}
Error: GitHub returned a 403 permissions-related error.
                    Please check that your ssh key and TagBot permissions are up to date
                    https://github.com/JuliaRegistries/TagBot#setup
                    
Traceback (most recent call last):
  File "/root/tagbot/action/__main__.py", line 96, in <module>
    repo.create_release(version, sha)
  File "/root/tagbot/action/repo.py", line 607, in create_release
    self._repo.create_git_release(
  File "/usr/local/lib/python3.8/site-packages/github/Repository.py", line 1112, in create_git_release
    headers, data = self._requester.requestJsonAndCheck(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 398, in requestJsonAndCheck
    return self.__check(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 423, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 403 {"message": "Resource not accessible by integration", "documentation_url": "https://docs.github.com/rest/releases/releases#create-a-release"}

Traceback (most recent call last):
  File "/root/tagbot/action/__main__.py", line 96, in <module>
    repo.create_release(version, sha)
  File "/root/tagbot/action/repo.py", line 607, in create_release
    self._repo.create_git_release(
  File "/usr/local/lib/python3.8/site-packages/github/Repository.py", line 1112, in create_git_release
    headers, data = self._requester.requestJsonAndCheck(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 398, in requestJsonAndCheck
    return self.__check(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 423, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 403 {"message": "Resource not accessible by integration", "documentation_url": "https://docs.github.com/rest/releases/releases#create-a-release"}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/root/tagbot/action/__main__.py", line 99, in <module>
    repo.handle_error(e)
  File "/root/tagbot/action/repo.py", line 645, in handle_error
    raise Abort("Cannot continue due to internal failure")
tagbot.action.Abort: Cannot continue due to internal failure
Error: Issue reporting failed
Traceback (most recent call last):
  File "/root/tagbot/action/__main__.py", line 96, in <module>
    repo.create_release(version, sha)
  File "/root/tagbot/action/repo.py", line 607, in create_release
    self._repo.create_git_release(
  File "/usr/local/lib/python3.8/site-packages/github/Repository.py", line 1112, in create_git_release
    headers, data = self._requester.requestJsonAndCheck(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 398, in requestJsonAndCheck
    return self.__check(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 423, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 403 {"message": "Resource not accessible by integration", "documentation_url": "https://docs.github.com/rest/releases/releases#create-a-release"}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
  File "/usr/local/lib/python3.8/site-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
  File "/usr/local/lib/python3.8/site-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 791, in urlopen
    response = self._make_request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 497, in _make_request
    conn.request(
TypeError: request() got an unexpected keyword argument 'chunked'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/tagbot/action/repo.py", line 640, in handle_error
    self._report_error(trace)
  File "/root/tagbot/action/repo.py", line 442, in _report_error
    "image": self._image_id(),
  File "/root/tagbot/action/repo.py", line [43](https://github.com/SciML/SciMLSensitivity.jl/actions/runs/7568969251/job/20611271359#step:3:44)1, in _image_id
    client = docker.from_env()
  File "/usr/local/lib/python3.8/site-packages/docker/client.py", line 96, in from_env
    return cls(
  File "/usr/local/lib/python3.8/site-packages/docker/client.py", line [45](https://github.com/SciML/SciMLSensitivity.jl/actions/runs/7568969251/job/20611271359#step:3:46), in __init__
    self.api = APIClient(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/docker/api/client.py", line 1[97](https://github.com/SciML/SciMLSensitivity.jl/actions/runs/7568969251/job/20611271359#step:3:98), in __init__
    self._version = self._retrieve_server_version()
  File "/usr/local/lib/python3.8/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: request() got an unexpected keyword argument 'chunked'

0s

However, triggering the same workflow, with the lookback adjusted to include only the latest release v7.52.0, runs successfully2, with the tag and release being created as expected.

Footnotes

  1. https://github.com/SciML/SciMLSensitivity.jl/actions/runs/7568969251/job/20611271359#step:3:47

  2. https://github.com/SciML/SciMLSensitivity.jl/actions/runs/7568953034/job/20611326603#step:3:43

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions