duckinator / bork

A Python build and release management tool.
https://bork.readthedocs.io
MIT License
12 stars 2 forks source link

Release of v6.0.0 failed #287

Closed duckinator closed 1 year ago

duckinator commented 1 year ago

https://cirrus-ci.com/task/5125023950700544

bork release
Traceback (most recent call last):
  File "/usr/local/bin/bork", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/bork/cli.py", line 134, in main
    cli()
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/bork/cli.py", line 81, in release
    api.release(pypi_repository, dry_run)
  File "/usr/local/lib/python3.10/site-packages/bork/api.py", line 123, in release
    github_release.prepare()
  File "/usr/local/lib/python3.10/site-packages/bork/github.py", line 85, in prepare
    self.release = self.github.create_release(
  File "/usr/local/lib/python3.10/site-packages/bork/github_api.py", line 72, in create_release
    format_dict['changelog'] = self.changelog()
  File "/usr/local/lib/python3.10/site-packages/bork/github_api.py", line 95, in changelog
    prs = self._api_get(f'/repos/{self.owner}/{self.repo}/pulls?state=closed')
  File "/usr/local/lib/python3.10/site-packages/bork/github_api.py", line 164, in _api_get
    return self._api_post(endpoint, None, headers, server, 'GET')
  File "/usr/local/lib/python3.10/site-packages/bork/github_api.py", line 158, in _api_post
    response = urllib.request.urlopen(req).read().decode()
  File "/usr/local/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/usr/local/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/usr/local/lib/python3.10/urllib/request.py", line 563, in error
    return self._call_chain(*args)
  File "/usr/local/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.10/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized
duckinator commented 1 year ago

I apparently fixed this in February and forgot to close this issue. I just had to restart the Release on Docker Hub task because it failed without me noticing. It worked fine — I should configure it to auto-retry a few times when it fails.

I also really need to figure out a more robust system for letting me know when CI tasks fail.