googleapis / releasetool

A utility for release Google client libraries across a variety of languages.
Apache License 2.0
30 stars 27 forks source link

Reporting back fails when commenting on the PR #538

Closed sofisl closed 9 months ago

sofisl commented 9 months ago

see: https://fusion2.corp.google.com/invocations/af637563-b15e-4db0-99e8-068f5a53151e/targets/cloud-devrel%2Fclient-libraries%2Fnodejs%2Frelease%2Fgoogleapis%2Fgaxios%2Fpublish/log

Traceback (most recent call last):
  File "/home/node/.pyenv/versions/3.7.4/lib/python3.7/site-packages/releasetool/commands/publish_reporter.py", line 161, in finish
    gh.create_pull_request_comment(f"{owner}/{repo}", number, message)
  File "/home/node/.pyenv/versions/3.7.4/lib/python3.7/site-packages/releasetool/github.py", line 264, in create_pull_request_comment
    response.raise_for_status()
  File "/home/node/.pyenv/versions/3.7.4/lib/python3.7/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: [https://api.github.com/repos/googleapis/gaxios/issues/599/comments](https://www.google.com/url?q=https://api.github.com/repos/googleapis/gaxios/issues/599/comments&sa=D)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/node/.pyenv/versions/3.7.4/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/node/.pyenv/versions/3.7.4/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/node/.pyenv/versions/3.7.4/lib/python3.7/site-packages/releasetool/__main__.py", line 213, in <module>
    main()
  File "/home/node/.pyenv/versions/3.7.4/lib/python3.7/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/node/.pyenv/versions/3.7.4/lib/python3.7/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/node/.pyenv/versions/3.7.4/lib/python3.7/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/node/.pyenv/versions/3.7.4/lib/python3.7/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/node/.pyenv/versions/3.7.4/lib/python3.7/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/node/.pyenv/versions/3.7.4/lib/python3.7/site-packages/releasetool/__main__.py", line 193, in publish_reporter_finish
    releasetool.commands.publish_reporter.finish(github_token, pr, status, details)
  File "/home/node/.pyenv/versions/3.7.4/lib/python3.7/site-packages/releasetool/commands/publish_reporter.py", line 164, in finish
    raise Exception(f"Error commenting on PR: {e.response.status_code}")
Exception: Error commenting on PR: 500
Release status reported.
chingor13 commented 9 months ago

What version of releasetool are you using? In the googleapis/gaxios repo, it does not appear you are installing releasetool during the release process and it is baked into the image. Also, that repository is releasing from node 14 which is likely a very old image.

Also, this appears to be a random 500 server error, not any authentication or invalid request issue. Is this happening across several builds?

sofisl commented 9 months ago

You're right, I thought it might have something to do with the recent releasetool release, but it seems like the Docker image gaxios is using to publish has the releasetool version pinned at 1.8.6 which is pre Node-18. I'll just take this as a transient error and look out for any other similar errors. Thanks!