Skip to content

Improvement - Operability - Logging - At least one permission expected from permissions map #992

Closed

Description

@njgibbon

Hello,

I've recently had a problem where a terraform plan could not complete (failing with errors - see logs / output).

(When increasing log verbosity)

Logs

2021/11/24 15:31:41 [ERROR] eval: *terraform.EvalRefresh, err: At least one permission expected from permissions map.
2021/11/24 15:31:41 [ERROR] eval: *terraform.EvalSequence, err: At least one permission expected from permissions map.

CLI Output

Error: At least one permission expected from permissions map.

# x6

Root cause

The root cause of the problem is where terraform is managing the team permissions on a repository and a permission that should exist has been removed outside of terraform.

I managed to look around with API calls and scripts and so on to ultimately find where the issue lay.

So the error is a valid error. No complaints about that.

Minor Ops feature request

But I think that it would be good if you could somehow log the affected repository as well as the above output. This would massively help operators who are debugging this problem. It is currently very difficult to find where to fix when this error is output.

The error occurs here in util_permissions.go:

getRepoPermission seems to be a pure function that find if all permissions given are false.

But it would be good if somewhere up the stack that another log could be made with the repo name where this function has returned an error further down.

Somewhat related issue

Activity

  1. augustingombault commented on Dec 3, 2021

    @augustingombault

    👋 I have the same issue when refreshing on ~250 github_team_repository items without any changes on my code.

  2. augustingombault commented on Dec 17, 2021

    @augustingombault

    🥳 I don't have the error anymore since today. I think it must have been an error in the API on the Github side since I haven't changed the github provider version since. What do you think about it?

  3. vin01 commented on Jan 4, 2022

    @vin01

    I am also no longer encountering this error. It was occurring pretty consistently towards end of November and first couple of weeks in December. Most likely an API issue on Github's end.

  4. github-actions commented on Nov 30, 2022

    @github-actions

    👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

  5. added
    Status: Stale
    and removed on Nov 30, 2022
  6. kfcampbell commented on Dec 1, 2022

    @kfcampbell
    Contributor

    Closing for now with the understanding that it was an API error. If it crops up again, we can open a new issue and link it to this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Stale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions