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

[BUG] Sudden issue with Dependabot secrets #1801

Closed
nikolay opened this issue Jul 20, 2023 · 15 comments
Closed

[BUG] Sudden issue with Dependabot secrets #1801

nikolay opened this issue Jul 20, 2023 · 15 comments

Comments

@nikolay
Copy link
Contributor

nikolay commented Jul 20, 2023

The code has been working for years, but suddenly, I started getting this error:

Terraform v1.5.3
on linux_amd64
...
Error:  PUT https://api.github.com/orgs/gramLabs/dependabot/secrets/[REDACTED]: 422 Invalid request.
Invalid property /selected_repository_ids/0: `[REDACTED]` is not of type `string`.
Invalid property /selected_repository_ids/1: `[REDACTED]` is not of type `string`.
...
Invalid property /selected_repository_ids/30: `[REDACTED]` is not of type `string`. []

  with github_dependabot_organization_secret.secrets["[REDACTED]"],
  on secrets.tf line 23, in resource "github_dependabot_organization_secret" "secrets":
  23: resource "github_dependabot_organization_secret" "secrets"


Operation failed: failed running terraform apply (exit 1)
@kfcampbell
Copy link
Member

@nikolay what version of the provider are you using? Can we narrow it down to a specific pull request, or do you think it's an API-side change?

@nikolay
Copy link
Contributor Author

nikolay commented Jul 26, 2023

@kfcampbell Always the latest and greatest. I downgraded to v5.29, but it seems to be a GitHub API issue, I guess.

@nikolay
Copy link
Contributor Author

nikolay commented Jul 26, 2023

@kfcampbell Justed tested with v5.32 - it's even worse! On top of the old issue, now the "inconsistent results" error adds up.

@kfcampbell
Copy link
Member

Hmm...I'm not seeing any particularly suspicious PRs to this repo recently, are you?

@nikolay
Copy link
Contributor Author

nikolay commented Jul 26, 2023

As the ticket states, it just suddenly stopped working, i.e. something has changed on the GitHub's side, I guess.

@kfcampbell
Copy link
Member

In that case, perhaps the best thing to do would be report it to the API team here.

@nikolay
Copy link
Contributor Author

nikolay commented Jul 27, 2023

@kfcampbell The API is fine and works great - it's the provider you maintain or the Go library that's not using it correctly. The error message is pretty clear - you want a string to be a string, which it is, though you have a problem with strings being strings.

@kfcampbell
Copy link
Member

I wonder if it's related to google/go-github#2817. There hasn't been a new release cut since that PR went in, but we can update ASAP as soon as there is one.

@nikolay
Copy link
Contributor Author

nikolay commented Jul 27, 2023

@kfcampbell Most probably if Dependabot secrets are covered by that as the issue I'm getting is specifically with Dependabot secrets only - the rest work just fine.

@kfcampbell
Copy link
Member

That is indeed Dependabot-specific. Still waiting on the release, unfortunately. Perhaps we can request one if it doesn't happen soon.

@nikolay
Copy link
Contributor Author

nikolay commented Aug 16, 2023

@kfcampbell Any update? It's not fun to have the whole GitHub provisioning stuck because otherwise, I have to recreate all Dependabot secrets manually...

@kfcampbell
Copy link
Member

@nikolay the library has been updated in the provider and I'll be cutting a new release later today, which should hopefully resolve the issue. Please report back here if it does not.

@nikolay
Copy link
Contributor Author

nikolay commented Aug 24, 2023

Thank you very much, @kfcampbell! 🙇🏻

@kfcampbell
Copy link
Member

Do you mind trying v5.34.0 and reporting back?

@nikolay
Copy link
Contributor Author

nikolay commented Aug 25, 2023

@kfcampbell It worked! Thank you very much!

@nikolay nikolay closed this as completed Aug 25, 2023
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

2 participants