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

Unexpected internal error: "Resource not accessible by integration" #242

Closed
juliohm opened this issue Jul 20, 2022 · 43 comments
Closed

Unexpected internal error: "Resource not accessible by integration" #242

juliohm opened this issue Jul 20, 2022 · 43 comments

Comments

@juliohm
Copy link

juliohm commented Jul 20, 2022

I am getting the following unexpected internal error with CDSAPI.jl:

image

The package has two releases that are still not tagged in the repository. Any way to fix this?

@mortenpi
Copy link

I was running into the same error in MarkdownAST, but I believe in my case the issue was that I was missing the permissions: part in TagBot.yml:

permissions:
  contents: write

I think I had some old version of TagBot.yml. The tags, it seems, got pushed, but it wasn't able to generate the releases.

@jishnub
Copy link

jishnub commented Oct 15, 2022

I'm encountering this issue here even with the write permission in the tagbot script

@PTWaade
Copy link

PTWaade commented Oct 31, 2022

I am encountering the same issue here, also with the version of the tagbot script taken from tagbot's documentation

@ancapdev
Copy link

ancapdev commented Nov 4, 2022

Seeing the same here

@ViralBShah
Copy link
Contributor

@DilumAluthge
Copy link
Member

Looks like some people are seeing 4xx errors, and other people are seeing 5xx errors. I think that these are two separate problems.

I'm hoping (fingers crossed) that the 4xx errors will be fixed by #245. So if you're seeing 4xx errors, upgrade your TagBot.yml file to match the example.yml file on the latest master branch here: https://github.com/JuliaRegistries/TagBot/blob/master/example.yml

The 5xx errors are a different problem, and I'm still not sure what the cause is.

@ancapdev
Copy link

ancapdev commented Nov 6, 2022

I'm hoping (fingers crossed) that the 4xx errors will be fixed by #245. So if you're seeing 4xx errors, upgrade your TagBot.yml file to match the example.yml file on the latest master branch here: https://github.com/JuliaRegistries/TagBot/blob/master/example.yml

Did this, and same error https://github.com/ancapdev/NetworkProtocols.jl/actions/runs/3404968318/

github.GithubException.GithubException: 403 {"message": "Resource not accessible by integration", "documentation_url": "https://docs.github.com/rest/reference/git#create-a-reference"}

@DilumAluthge
Copy link
Member

That's really bizarre.

What happens if you remove the current permissions block and replace it with just: permissions: write-all

@ancapdev
Copy link

ancapdev commented Nov 6, 2022

What happens if you remove the current permissions block and replace it with just: permissions: write-all

Tried and it looks the same

@DilumAluthge
Copy link
Member

Could you go to https://github.com/YOURUSERNAMEORORG/YOURREPO/settings/actions and post a screenshot of what the "Workflow permissions" section looks like?

@DilumAluthge
Copy link
Member

Actually, can you just post a screenshot of the entire page?

@ancapdev
Copy link

ancapdev commented Nov 6, 2022

image

@DilumAluthge
Copy link
Member

Hmmm. Can you post a screenshot of the following pages:

  1. https://github.com/USERNAME/REPO/settings/branches
  2. https://github.com/USERNAME/REPO/settings/tag_protection

@ancapdev
Copy link

ancapdev commented Nov 6, 2022

image

@ancapdev
Copy link

ancapdev commented Nov 6, 2022

image

@DilumAluthge
Copy link
Member

This is bizarre. I can't think of a reason why TagBot wouldn't have the ability to push the tag in this situation.

@LilithHafner
Copy link
Member

I also get an "Error: TagBot experienced an unexpected internal failure" here. The problem could be on our end, but the error message alone makes me think it is worth reporting.

LilithHafner referenced this issue in JuliaCollections/SortingAlgorithms.jl Nov 15, 2022
maetshju added a commit to maetshju/Phonetics.jl that referenced this issue Nov 20, 2022
Using new version of TagBot.yml referened in JuliaRegistries/TagBot#242
@dlfivefifty
Copy link

I'm seeing this too in InfiniteArrays.jl here. The error I get is:

/usr/bin/docker run --name ghcriojuliaregistriestagbot1141_3e296f --label 290506 --workdir /github/workspace --rm -e "INPUT_TOKEN" -e "INPUT_SSH" -e "INPUT_REGISTRY" -e "INPUT_GITHUB" -e "INPUT_GITHUB_API" -e "INPUT_BRANCHES" -e "INPUT_DISPATCH" -e "INPUT_DISPATCH_DELAY" -e "INPUT_LOOKBACK" -e "INPUT_SSH_PASSWORD" -e "INPUT_GPG" -e "INPUT_GPG_PASSWORD" -e "INPUT_REGISTRY_SSH" -e "INPUT_DRAFT" -e "INPUT_USER" -e "INPUT_EMAIL" -e "INPUT_BRANCH" -e "INPUT_CHANGELOG" -e "INPUT_CHANGELOG_IGNORE" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/InfiniteArrays.jl/InfiniteArrays.jl":"/github/workspace" ghcr.io/juliaregistries/tagbot:1.14.1
[39](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:40)
Processing version v0.12.9 (6dd9ea1374d436074bac2af75c7e0f11ad72577c)
[40](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:41)
Generating changelog for version v0.12.9 (6dd9ea1374d436074bac2af75c7e0f11ad72577c)
[41](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:42)
Error: TagBot experienced an unexpected internal failure
[42](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:43)
Traceback (most recent call last):
[43](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:44)
  File "/root/tagbot/action/__main__.py", line 94, in <module>
[44](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:45)
    repo.create_release(version, sha)
[45](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:46)
  File "/root/tagbot/action/repo.py", line 543, in create_release
[46](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:47)
    self._repo.create_git_ref(f"refs/tags/{version}", tag.sha)
[47](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:48)
  File "/usr/local/lib/python3.8/site-packages/github/Repository.py", line 969, in create_git_ref
[48](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:49)
    headers, data = self._requester.requestJsonAndCheck(
[49](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:50)
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 315, in requestJsonAndCheck
[50](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:51)
    return self.__check(
[51](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:52)
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 340, in __check
[52](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:53)
    raise self.__createException(status, responseHeaders, output)
[53](https://github.com/JuliaArrays/InfiniteArrays.jl/actions/runs/3621975749/jobs/6106102711#step:3:54)
github.GithubException.GithubException: 403 {"message": "Resource not accessible by integration", "documentation_url": "https://docs.github.com/rest/reference/git#create-a-reference"}

@timholy
Copy link
Member

timholy commented Jan 3, 2023

One more 5xx error: https://github.com/timholy/PkgCacheInspector.jl/actions/runs/3825856095/jobs/6509149614#step:3:41. Note this is for a package with weakdeps.

@khosravipasha
Copy link

Similiar issue for our package https://github.com/Juice-jl/ProbabilisticCircuits.jl. TagBot fails with 5xx error but does not specify what it is.

/usr/bin/docker run --name ghcriojuliaregistriestagbot1141_193408 --label 290506 --workdir /github/workspace --rm -e "INPUT_TOKEN" -e "INPUT_SSH" -e "INPUT_REGISTRY" -e "INPUT_GITHUB" -e "INPUT_GITHUB_API" -e "INPUT_BRANCHES" -e "INPUT_DISPATCH" -e "INPUT_DISPATCH_DELAY" -e "INPUT_LOOKBACK" -e "INPUT_SSH_PASSWORD" -e "INPUT_GPG" -e "INPUT_GPG_PASSWORD" -e "INPUT_REGISTRY_SSH" -e "INPUT_DRAFT" -e "INPUT_USER" -e "INPUT_EMAIL" -e "INPUT_BRANCH" -e "INPUT_CHANGELOG" -e "INPUT_CHANGELOG_IGNORE" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_DEBUG" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/ProbabilisticCircuits.jl/ProbabilisticCircuits.jl":"/github/workspace" ghcr.io/juliaregistries/tagbot:1.14.1
##[debug]There are 12 total versions
##[debug]There are 1 new versions
##[debug]Looking for PR from branch registrator/probabilisticcircuits/2396afbe/v0.4.0
##[debug]Trying to find PR by registry owner first (JuliaRegistries)
##[debug]Did not find registry PR by registry owner
Warning: GitHub returned a 5xx error code
Traceback (most recent call last):
  File "/root/tagbot/action/__main__.py", line 74, in <module>
    versions = repo.new_versions()
  File "/root/tagbot/action/repo.py", line 432, in new_versions
    return self._filter_map_versions(versions)
  File "/root/tagbot/action/repo.py", line 271, in _filter_map_versions
    expected = self._commit_sha_from_registry_pr(version, tree)
  File "/root/tagbot/action/repo.py", line 205, in _commit_sha_from_registry_pr
    pr = self._registry_pr(version)
  File "/root/tagbot/action/repo.py", line 196, in _registry_pr
    for pr in prs:
  File "/usr/local/lib/python3.8/site-packages/github/PaginatedList.py", line 56, in __iter__
    newElements = self._grow()
  File "/usr/local/lib/python3.8/site-packages/github/PaginatedList.py", line [67](https://github.com/Juice-jl/ProbabilisticCircuits.jl/actions/runs/3859264986/jobs/6578676812#step:3:68), in _grow
    newElements = self._fetchNextPage()
  File "/usr/local/lib/python3.8/site-packages/github/PaginatedList.py", line 199, in _fetchNextPage
    headers, data = self.__requester.requestJsonAndCheck(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 315, in requestJsonAndCheck
    return self.__check(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 340, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 502 {"message": "Server Error"}

##[debug]Docker Action run completed with exit code 0
##[debug]Finishing: Run JuliaRegistries/TagBot@v1

Link to action for more logs
https://github.com/Juice-jl/ProbabilisticCircuits.jl/actions/runs/3859264986/jobs/6578676812

@neversakura
Copy link

Same issue here with both of my packages: OpenQuantumTools and OpenQuantumBase. It's been like this for a while.

Run JuliaRegistries/TagBot@v1
/usr/bin/docker run --name ghcriojuliaregistriestagbot1141_a4cfde --label 290506 --workdir /github/workspace --rm -e "INPUT_TOKEN" -e "INPUT_SSH" -e "INPUT_REGISTRY" -e "INPUT_GITHUB" -e "INPUT_GITHUB_API" -e "INPUT_BRANCHES" -e "INPUT_DISPATCH" -e "INPUT_DISPATCH_DELAY" -e "INPUT_LOOKBACK" -e "INPUT_SSH_PASSWORD" -e "INPUT_GPG" -e "INPUT_GPG_PASSWORD" -e "INPUT_REGISTRY_SSH" -e "INPUT_DRAFT" -e "INPUT_USER" -e "INPUT_EMAIL" -e "INPUT_BRANCH" -e "INPUT_CHANGELOG" -e "INPUT_CHANGELOG_IGNORE" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/OpenQuantumTools.jl/OpenQuantumTools.jl":"/github/workspace" ghcr.io/juliaregistries/tagbot:1.14.1
Warning: GitHub returned a 5xx error code
Traceback (most recent call last):
  File "/root/tagbot/action/__main__.py", line 74, in <module>
    versions = repo.new_versions()
  File "/root/tagbot/action/repo.py", line 432, in new_versions
    return self._filter_map_versions(versions)
  File "/root/tagbot/action/repo.py", line 271, in _filter_map_versions
    expected = self._commit_sha_from_registry_pr(version, tree)
  File "/root/tagbot/action/repo.py", line 205, in _commit_sha_from_registry_pr
    pr = self._registry_pr(version)
  File "/root/tagbot/action/repo.py", line 196, in _registry_pr
    for pr in prs:
  File "/usr/local/lib/python3.8/site-packages/github/PaginatedList.py", line 56, in __iter__
    newElements = self._grow()
  File "/usr/local/lib/python3.8/site-packages/github/PaginatedList.py", line 67, in _grow
    newElements = self._fetchNextPage()
  File "/usr/local/lib/python3.8/site-packages/github/PaginatedList.py", line 199, in _fetchNextPage
    headers, data = self.__requester.requestJsonAndCheck(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 315, in requestJsonAndCheck
    return self.__check(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 3[40](https://github.com/USCqserver/OpenQuantumTools.jl/actions/runs/3513153210/jobs/5885647346#step:3:41), in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: [50](https://github.com/USCqserver/OpenQuantumTools.jl/actions/runs/3513153210/jobs/5885647346#step:3:51)2 {"message": "Server Error"}

@neversakura
Copy link

I was trying to update OpenQuantumTools yesterday. Somehow the Tagbot was triggered twice. It failed at the first attempt but succeeded the second time. Here are the links for the logs:

The first attempt: https://github.com/USCqserver/OpenQuantumTools.jl/actions/runs/3917274681
The second attempt: https://github.com/USCqserver/OpenQuantumTools.jl/actions/runs/3917633483

I have no idea why this happened.

@jeremiedb
Copy link

jeremiedb commented Jan 15, 2023

Same here with EvoTrees.jl, I updated TagBot with write permission for contents in yaml but still failed each of the 3-4 manual launches.

Error log is the same as the in the two previous comments logs.

@kellertuer
Copy link

Same here https://github.com/JuliaManifolds/Manopt.jl/actions/runs/3922477050/jobs/6705440639 - let‘s hope there is a solution somewhen.

@ericphanson
Copy link
Member

Looking at the code, I think this happens when it iterates over all closed PRs in General— there’s a massive number of those. There is some kind of fast path here but I don’t understand when that gets triggered - and maybe it is somehow stale (eg if branch name formats changed in Registrator?).

thoughts:

  • I wonder if there’s a way to iterate the PRs from newest to oldest (if that’s not the default)- maybe we can early exit that loop and be less likely to hit server errors.
  • Or maybe we can understand the fast path and make it more reliable.
  • Or maybe the Tagbot trigger issue mechanism can be used to get the PR directly instead of having to iterate through everything?

@fredrikekre
Copy link
Member

Does the Python API not support pagination? I can't find it in the docs.

(I have also seen this issue frequently, and multiple restarts over the last two days have not helped.)

@t-bltg
Copy link

t-bltg commented Jan 15, 2023

I wonder if there’s a way to iterate the PRs from newest to oldest (if that’s not the default)- maybe we can early exit that loop and be less likely to hit server errors.

There seems to be sort and direction in repository.py, which defaults to sort=created and direction=desc according to these docs if I'm not mistaken, so the combination should already be the fastest I guess.

@fredrikekre
Copy link
Member

Seems to return a paginated list, but I see no settings for per-page https://github.com/PyGithub/PyGithub/blob/6c53e5442a80094025b390772d3e00a0d8443a75/github/Repository.py#L2857

@t-bltg
Copy link

t-bltg commented Jan 15, 2023

It could be useful to add some kind of TagBot option to call enable_console_debug_logging.

@DilumAluthge
Copy link
Member

  • Or maybe the Tagbot trigger issue mechanism can be used to get the PR directly instead of having to iterate through everything?

TagBot trigger issue comment already include the PR URL. So if we're not already using that info, we should do so.

That doesn't help us, however, in runs that weren't triggered by a TagBot trigger issue comment.

@DilumAluthge
Copy link
Member

Looking at the code, I think this happens when it iterates over all closed PRs in General— there’s a massive number of those. There is some kind of fast path here but I don’t understand when that gets triggered - and maybe it is somehow stale (eg if branch name formats changed in Registrator?).

thoughts:

  • I wonder if there’s a way to iterate the PRs from newest to oldest (if that’s not the default)- maybe we can early exit that loop and be less likely to hit server errors.
  • Or maybe we can understand the fast path and make it more reliable.
  • Or maybe the Tagbot trigger issue mechanism can be used to get the PR directly instead of having to iterate through everything?

Instead of iterating over all closed General PRs, I wonder if we can use the Search API? We'd pass repo:JuliaRegistries/General, and we'd search for PRs with title New version: $(name) v$(version). We'd then filter that list to include only PRs that are merged.

@kellertuer
Copy link

While my release just now reported something about not finding some PR in the General Registry, both things that I do need – the Tag and the Release – worked perfectly fine!

@nightlark
Copy link

I'm getting the same error when I try running TagBot using workflow_dispatch, even with the write-all permission set:

github.GithubException.GithubException: 403 {"message": "Resource not accessible by integration", "documentation_url": "https://docs.github.com/rest/reference/git#create-a-reference"}

Going to wait and see if the Julia bot comments on an issue again to trigger it; at the moment though it seems like the TagBot action is just plain broken.

https://github.com/GMLC-TDC/HELICS.jl/actions/runs/4199348093/jobs/7284099992

@cadojo
Copy link

cadojo commented Apr 27, 2023

I'm finding the same issue here. I thought it was related to this Registrator.jl issue. I think my TagBot actions have been failing because the commit I registered for one version no longer exists; I re-set the repo as a troubleshooting step.

@shayandavoodii
Copy link

shayandavoodii commented May 7, 2023

I have had the same issue. TagBot succeeded in creating a new release only once after updating the workflow's content to the latest in the documentation. Afterward, it has never been successful again. The following is the error that I got in the TagBot trigger issue in releasing v1.2.1 of the package:

The error
Run JuliaRegistries/TagBot@v1
  with:
    token: ***
    ssh: ***
    registry: JuliaRegistries/General
    github: github.com
    github_api: api.github.com
    branches: false
    dispatch: false
    dispatch_delay: 5
    lookback: 3
    draft: false
    user: github-actions[bot]
    email: 41898[2](https://github.com/shayandavoodii/OnlinePortfolioSelection.jl/actions/runs/4890477979/jobs/8732684306#step:3:2)82+github-actions[bot]@users.noreply.github.com
    changelog: ## {{ package }} {{ version }}
  
  {% if previous_release %}
  [Diff since {{ previous_release }}]({{ compare_url }})
  {% endif %}
  
  {% if custom %}
  {{ custom }}
  {% endif %}
  
  {% if issues %}
  **Closed issues:**
  {% for issue in issues %}
  - {{ issue.title }} (#{{ issue.number }})
  {% endfor %}
  {% endif %}
  
  {% if pulls %}
  **Merged pull requests:**
  {% for pull in pulls %}
  - {{ pull.title }} (#{{ pull.number }}) (@{{ pull.author.username }})
  {% endfor %}
  {% endif %}
/usr/bin/docker run --name ghcriojuliaregistriestagbot1141_7[3](https://github.com/shayandavoodii/OnlinePortfolioSelection.jl/actions/runs/4890477979/jobs/8732684306#step:3:3)b093 --label ed866e --workdir /github/workspace --rm -e "INPUT_TOKEN" -e "INPUT_SSH" -e "INPUT_REGISTRY" -e "INPUT_GITHUB" -e "INPUT_GITHUB_API" -e "INPUT_BRANCHES" -e "INPUT_DISPATCH" -e "INPUT_DISPATCH_DELAY" -e "INPUT_LOOKBACK" -e "INPUT_SSH_PASSWORD" -e "INPUT_GPG" -e "INPUT_GPG_PASSWORD" -e "INPUT_REGISTRY_SSH" -e "INPUT_DRAFT" -e "INPUT_USER" -e "INPUT_EMAIL" -e "INPUT_BRANCH" -e "INPUT_CHANGELOG" -e "INPUT_CHANGELOG_IGNORE" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/OnlinePortfolioSelection.jl/OnlinePortfolioSelection.jl":"/github/workspace" ghcr.io/juliaregistries/tagbot:1.1[4](https://github.com/shayandavoodii/OnlinePortfolioSelection.jl/actions/runs/4890477979/jobs/8732684306#step:3:4).1
Did not find registry PR
Tag v1.0.4 already exists
Did not find registry PR
Did not find registry PR
Error: TagBot experienced an unexpected internal failure
Traceback (most recent call last):
  File "/root/tagbot/action/__main__.py", line 74, in <module>
    versions = repo.new_versions()
  File "/root/tagbot/action/repo.py", line 432, in new_versions
    return self._filter_map_versions(versions)
  File "/root/tagbot/action/repo.py", line 271, in _filter_map_versions
    expected = self._commit_sha_from_registry_pr(version, tree)
  File "/root/tagbot/action/repo.py", line 20[5](https://github.com/shayandavoodii/OnlinePortfolioSelection.jl/actions/runs/4890477979/jobs/8732684306#step:3:5), in _commit_sha_from_registry_pr
    pr = self._registry_pr(version)
  File "/root/tagbot/action/repo.py", line 199, in _registry_pr
    if pr.merged and pr.head.ref == head:
  File "/usr/local/lib/python3.8/site-packages/github/PullRequest.py", line 259, in merged
    self._completeIfNotSet(self._merged)
  File "/usr/local/lib/python3.8/site-packages/github/GithubObject.py", line 294, in _completeIfNotSet
    self._completeIfNeeded()
  File "/usr/local/lib/python3.8/site-packages/github/GithubObject.py", line 298, in _completeIfNeeded
    self.__complete()
  File "/usr/local/lib/python3.8/site-packages/github/GithubObject.py", line 305, in __complete
    headers, data = self._requester.requestJsonAndCheck("GET", self._url.value)
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 315, in requestJsonAndCheck
    return self.__check(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 340, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.RateLimitExceededException: 403 {"message": "API rate limit exceeded for installation ID 3124852[7](https://github.com/shayandavoodii/OnlinePortfolioSelection.jl/actions/runs/4890477979/jobs/8732684306#step:3:7).", "documentation_url": "https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}

Response ([50](https://github.com/shayandavoodii/OnlinePortfolioSelection.jl/actions/runs/4890477979/jobs/8732684306#step:3:51)2): {
  "message": "Internal server error"
}

Can someone please specify the lookback variable in the TagBot.yml code? (Unfold above to see the variable)

@sylvaticus
Copy link

I also had the issue github.GithubException.GithubException: 403 {"message": "Resource not accessible by integration", "documentation_url": "https://docs.github.com/rest/releases/releases#create-a-release"} and getting tags but not releases, and in my case adding the permissions in TagBot.yml solved the issue.
The strange thing is that in other (older) packages I don't have the permissions, and TagBot works just fine (and the security settings in both case are on their defaults).

I do suspect that GitHub must have changed some security default for newer packages and hence the permissions part is now mandatory in the TagBot.yml file...

@LilithHafner
Copy link
Member

SortingAlgorithms.jl (started in 2013) has this issue, so not all old packages are immune.

@sylvaticus
Copy link

sylvaticus commented Jun 8, 2023

OK. For the 403 errors the solution seems to be to have either the permissions at the TagBot.yml level or have the option Workflow permissions (in the page https://github.com/[USER]/[REPO].jl/settings/actions) set to "read and write permissions".

@IanButterworth

This comment was marked as off-topic.

@IanButterworth IanButterworth changed the title Unexpected internal error Unexpected internal error: "Resource not accessible by integration" Aug 27, 2023
@IanButterworth
Copy link
Member

IanButterworth commented Aug 27, 2023

The slow search of all PRs here shouldn't be hit now that the General branch format is fixed #264 such that the earlier more efficient search by branch should now succeed again here

Note that both searches actually were failing before #264 because of head being the wrong format

It'll be interesting to see whether this issue changes with that fix out.

@JohannesNaegele
Copy link

I still get the same 403 error.

Action permissions are set to Allow all actions and reusable workflow and workflow permissions are set to Read and write permissions.

@Octogonapus
Copy link

I am also encountering this error all of a sudden https://github.com/Octogonapus/AWSCRT.jl/actions/runs/6472485281/job/17573240891 Note that workflow has all permissions explicitly granted. Also, the repository has default read/write permissions configured.

@IanButterworth
Copy link
Member

AFAICT this issue is fixed as of v1.18.1. It seems deps updates may have fixed it. Please report if not

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