Skip to content

Conversation

felixlut
Copy link
Contributor

While trying to make the github_organization datasource faster I noticed that each call to the GraphQL API was heavily throttled, with the provider sleeping exactly 1s in between each call. Doing some digging I've come to the conclusion that the write_delay_ms setting in the provider is the cause, which I've also confirmed by simply changing its value and testing. After some digging it turns out that GraphQL API:s usually use POST requests under the hood. The GitHub GraphQL client is no different.

There probably is a case to be made for separating the settings for the REST and CodeQL API:s, as they are currently both using the value from write_delay_ms. I'll leave that as future work though, as both of these are using the same HTTP client under the hood, and I have no idea if breaking that apart could have some unforeseen consequences. Documenting the behavior is a step forward at least!


Before the change?

  • No change in functionality, only docs

After the change?

  • No change in functionality, only docs

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

Copy link
Contributor

@nickfloyd nickfloyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the research and docs on this ❤️

@nickfloyd nickfloyd merged commit 70599a6 into integrations:main Sep 17, 2024
4 checks passed
@nickfloyd nickfloyd added the Type: Documentation Improvements or additions to documentation label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants