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 Github Actions build for pull requests #1498

Open
KamilDev opened this issue Dec 8, 2024 · 0 comments
Open

Fix Github Actions build for pull requests #1498

KamilDev opened this issue Dec 8, 2024 · 0 comments

Comments

@KamilDev
Copy link
Contributor

KamilDev commented Dec 8, 2024

image

Link to failing build: https://github.com/QL-Win/QuickLook/actions/runs/12219336937/job/34085901940?pr=1497

Looks like the script tries to clear previous versions, but does not have the permission to delete them.

· Get list of artifacts to be uploaded
  glob(QuickLook-*.*):
  - QuickLook-3.7.3-58-g619f16b.zip
  - QuickLook-3.7.3-58-g619f16b.msi
· Check SemVer compliance of the reference/tag
· Get GitHub API handler (authenticate)
· Get Repository handler
· Get Release handler
Request DELETE /repos/QL-Win/QuickLook/releases/assets/211792327 failed with 403: Forbidden
Traceback (most recent call last):
· RM set. All previous assets are being cleared...
  File "/releaser.py", line 179, in <module>
    asset.delete_asset()
  File "/usr/local/lib/python3.12/site-packages/github/GitReleaseAsset.py", line [14](https://github.com/QL-Win/QuickLook/actions/runs/12219336937/job/34085901940?pr=1497#step:4:15)1, in delete_asset
    headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
 - QuickLook-3.7.3-58-g619f[16](https://github.com/QL-Win/QuickLook/actions/runs/12219336937/job/34085901940?pr=1497#step:4:17)b.msi
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/github/Requester.py", line 586, in requestJsonAndCheck
    return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/github/Requester.py", line 856, in requestJson
    return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/github/Requester.py", line 977, in __requestEncode
    status, responseHeaders, output = self.__requestRaw(cnx, verb, url, requestHeaders, encoded_input)
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/github/Requester.py", line 1011, in __requestRaw
    response = cnx.getresponse()
               ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/github/Requester.py", line 202, in getresponse
    r = verb(
        ^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 671, in delete
    return self.request("DELETE", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 934, in urlopen
    retries = retries.increment(method, url, response=response, _pool=self)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/github/GithubRetry.py", line [18](https://github.com/QL-Win/QuickLook/actions/runs/12219336937/job/34085901940?pr=1497#step:4:19)7, in increment
    raise Requester.createException(response.status, response.headers, content)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
github.GithubException.GithubException: 403 {"message": "Resource not accessible by integration", "documentation_url": "https://docs.github.com/rest/releases/assets#delete-a-release-asset", "status": "403"}
emako added a commit that referenced this issue Dec 8, 2024
Need to verify later whether it is feasible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant