You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tl;dr: what about a resource type that describes a lot of resources all at once, permitting a single GraphQL API call to set them all.
For instance, we have > 2K repositories, and then branch protection rules. Even with a tuned ratelimit, refreshing takes a long time, and applies that are changing things broadly have a nasty habit of timing out.
This seems to be because every protection rule in every repo is being configured separately - something that makes sense in a REST world, but makes no sense in a GraphQL world: the points system for GitHub's GraphQL API penalises queries that start at the root, find a repo, find one protection rule, and are then repeated in a loop for the next rule, then for the next repo etc - because all the traversals are dead weight, and could be avoided if the query was broader.
e.g. refresh could read the first 100 repos, and all the protection rules; then the next 100 after the first 100, etc.
But - sorry to handwave, only loose understanding of the innards right now - terraform probably isn't passing enough context to let the provider do that seamlessly, so what about a resource type in terraform that represents many {type} instances in many repos, all at once?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Tl;dr: what about a resource type that describes a lot of resources all at once, permitting a single GraphQL API call to set them all.
For instance, we have > 2K repositories, and then branch protection rules. Even with a tuned ratelimit, refreshing takes a long time, and applies that are changing things broadly have a nasty habit of timing out.
This seems to be because every protection rule in every repo is being configured separately - something that makes sense in a REST world, but makes no sense in a GraphQL world: the points system for GitHub's GraphQL API penalises queries that start at the root, find a repo, find one protection rule, and are then repeated in a loop for the next rule, then for the next repo etc - because all the traversals are dead weight, and could be avoided if the query was broader.
e.g. refresh could read the first 100 repos, and all the protection rules; then the next 100 after the first 100, etc.
But - sorry to handwave, only loose understanding of the innards right now - terraform probably isn't passing enough context to let the provider do that seamlessly, so what about a resource type in terraform that represents many {type} instances in many repos, all at once?
Beta Was this translation helpful? Give feedback.
All reactions