Something went wrong while executing your query. Please include 4400:1AED5B:579CADD:14D3A4BD:6A0E5CC5 when reporting this issue.
#196478
Replies: 3 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
This Terraform diff for GitHub github_branch_protection usually fails for a few very specific API behavior reasons, even though the change looks small. ⸻ Root cause summary Your CI is failing not because the change is big, but because:
What is actually changing in your plan You have two important updates:
github_app → removed from list
strict: true → false ⸻ Why this keeps failing in CI
The pull_request_bypassers field is not stable in API responses.
So Terraform thinks: “you removed github_app” But GitHub may still be enforcing it internally. ⸻
This setting controls whether:
Even if you change it once, GitHub may:
⸻
Branch protection rules often have:
So CI runs repeatedly see: drift → re-apply → drift again → failure loop ⸻ How to fix it (practical solutions) Option 1 — Force stable config in Terraform Add explicit full values: required_pull_request_reviews { Don’t let Terraform “guess differences”. ⸻ Option 2 — Split the change Apply in two steps:
This avoids API conflict locking. ⸻ Option 3 — Ignore unstable fields (recommended for CI stability) lifecycle { Use carefully — only if Terraform is constantly fighting GitHub. ⸻ Option 4 — Confirm real API state Use: gh api repos/:owner/:repo/branches/:branch/protection Check what GitHub actually thinks the values are. |
Beta Was this translation helpful? Give feedback.
-
|
That The risky part is not pull_request_bypassers = [
- "github_app",
]In Terraform's Provider docs: https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection GitHub's REST branch protection API also models bypass permissions as concrete users, teams, or apps, not as a generic actor type string. REST docs: https://docs.github.com/en/rest/branches/branch-protection What I would try:
TF_LOG=DEBUG terraform apply
That will tell you which field triggers the GitHub query failure.
The request ID is useful for GitHub staff, but provider maintainers will need the minimized Terraform config to determine whether the provider is sending an invalid actor value or GitHub's API is failing on a valid one. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
API
Body
This is part of a Terraform project, and the resource is
github_branch_protection, looking at the change, it doesn't seem difficult or huge. We have a daily CI and particular change has been failing for weeks now.Beta Was this translation helpful? Give feedback.
All reactions