simplesteph / kafka-connect-github-source

Get a stream of issues and pull requests for your chosen GitHub repository
https://links.datacumulus.com/kafka-connect-coupon
MIT License
445 stars 190 forks source link

GitHubAPIHttpClient http response headers have wrong case #13

Closed kieronedwards closed 4 years ago

kieronedwards commented 4 years ago

Problem

Currently GitHubSourceTaskTest fails when attempting to assert headers in the response from GitHub. This prevents the connector from being built. This seems due to change of the github api from v3 to v4 which now uses graphql and has a different strategy for rate limiting

Solution

Need to change "RateLimit" to "Ratelimit" in the headers. The test needs to be updated to take account of these ideally using constants. Further more the "Etag" property in the test is also now lower case and perhaps can be removed as is not used in the code (?)

Longer Term Solution

Upgrade to use the graphql version of the github api (ratelimits are specified in an object).

simplesteph commented 4 years ago

fixed by #14