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

Resource not accessible by integration #47

Closed
cevich opened this issue Mar 25, 2024 · 7 comments
Closed

Resource not accessible by integration #47

cevich opened this issue Mar 25, 2024 · 7 comments

Comments

@cevich
Copy link

cevich commented Mar 25, 2024

Periodically (and I have no idea why yet) I'm getting this error message:

Run dessant/lock-threads@v5
  with:
    issue-inactive-days: 90
    pr-inactive-days: 90
    add-issue-labels: locked - please file new issue/PR
    add-pr-labels: locked - please file new issue/PR
    pr-lock-reason: resolved
    log-output: true
    github-token: ***
    issue-lock-reason: resolved
    discussion-inactive-days: 365
  env:
    CLOSED_DAYS: 90
    LOCKED_LABEL: locked - please file new issue/PR
Error: Request failed due to following response errors:
 - Resource not accessible by integration

Example workflow: https://github.com/containers/podman/actions/runs/8413040871/job/23034670057

This is happening on several repos where this (same) workflow is re-used. Again, some times it runs fine, no problem. Other times it gives this error. No repository settings are changing between success/failure. Any idea what might be going on or where to look further?

@twpayne
Copy link

twpayne commented Mar 29, 2024

I've also just recently started seeing this, for example on this run. Presumably this is due to a change or bug at GitHub?

@cevich
Copy link
Author

cevich commented Mar 29, 2024

oh good, I'm happy to hear it's not just me.

Presumably this is due to a change or bug at GitHub?

Yes, that would be my guess as well. However I don't work with the APIs that much, so really don't know what sort of bug to report (and if they'll even care). It doesn't help that the problem seems to be intermittent.

In any case, any help debugging this, or insight into how it can be debugged would be greatly appreciated. I'm really simply out of my depth here.

@kevinpapst
Copy link

kevinpapst commented Apr 6, 2024

Never had the issue before, but on the first run after switching from dessant/lock-threads@v4 to dessant/lock-threads@v5 I experienced this issue multiple times.

Tried changing the access token, but didn't help.

Reverted back to @v4 and stopped failing immediately.

@dessant
Copy link
Owner

dessant commented Apr 6, 2024

The error could be caused by a missing permission, v5 also processes discussions by default. Please try declaring the new permission in your workflow file, or disable the processing of discussions.

Add the new permission to process discussions:

permissions:
  issues: write
  pull-requests: write
  discussions: write

Alternatively you could disable the processing of discussions, in that case the new permission will not be needed:

    steps:
      - uses: dessant/lock-threads@v5
        with:
          process-only: 'issues, prs'

@dessant dessant pinned this issue Apr 6, 2024
@kevinpapst
Copy link

@dessant thanks, that was an important hint. fixed my failing runs 👍

Sorry for not reading better, I missed the BC in the Changelog:
https://github.com/dessant/lock-threads/blob/main/CHANGELOG.md#-breaking-changes

@twpayne
Copy link

twpayne commented Apr 6, 2024

Thank you, this was also the problem for me. Apologies for missing this in the release notes.

I would have found it easier to debug if the "Resource not accessible by integration" error message included which resource was not accessible? Maybe a bit of extra logging in the case of an error here would help?

Thank you again for your work and the fast response!

@cevich
Copy link
Author

cevich commented Apr 8, 2024

Thanks guys, I'll give the permissions addition a try. I also agree, it would be really helpful to know what the "resource" referred to in the error.

cevich added a commit to cevich/podman that referenced this issue Apr 8, 2024
Periodically, the discussion-lock workflow throws the error: `Resource
not accessible by integration`

This was identified in the [upstream
issue](dessant/lock-threads#47) as caused by a
version-5 change that requires additional permissions to be set on the
action.  Add the necessary permission.

Signed-off-by: Chris Evich <cevich@redhat.com>
cevich added a commit to cevich/podman that referenced this issue Apr 8, 2024
Periodically, the discussion-lock workflow throws the error: `Resource
not accessible by integration`

This was identified in the [upstream
issue](dessant/lock-threads#47) as caused by a
version-5 change that requires additional permissions to be set on the
action.  Add the necessary permission.

Signed-off-by: Chris Evich <cevich@redhat.com>
@cevich cevich closed this as completed Apr 11, 2024
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

4 participants