Closed jumanjiman closed 2 years ago
Hi,
Thanks for the feedback. #959 is an attempt to mitigate the issue you raised. However I don't have such Github appliance to validate it.
However I don't have such Github appliance to validate it.
Thank you! i'm attempting to build and test locally, and commented on the PR, as well.
Running the local build exposes what I believe is a secondary bug. Should I open a separate issue for it?
Specifically, the last couple lines of crawler log output shown in https://github.com/change-metrics/monocle/pull/959#issuecomment-1262471178 include this:
crawler_1 | 2022-09-29 15:02:36 INFO Macroscope.Worker:156: Processing {"index":"monocle-test","crawler":"GHE","stream":"TaskDatas","entity":{"contents":"internalorg/IMPORTANT_REPO","tag":"TaskDataEntity"},"age":"2021-01-01T00:00:00Z"}
crawler_1 | 2022-09-29 15:02:38 WARNING Macroscope.Main:300: Skipping due to an unexpected exception {"index":"monocle-test","crawler":"GHE","err":"Invalid response: GetLinkedIssues {rateLimit = Nothing, search = SearchSearchResultItemConnection {issueCount = 0, pageInfo = SearchPageInfoPageInfo {hasNextPage = False, endCursor = Nothing}, nodes = Just []}}\nCallStack (from HasCallStack):\n error, called at src/Relude/Debug.hs:289:11 in relude-1.1.0.0-5JycKJkJeebDcuDsd66BY7:Relude.Debug\n error, called at src/Lentille/GitHub/Issues.hs:116:18 in monocle-0.1.7.0-5C5VzWDrxK4JM5qtcn0kfv:Lentille.GitHub.Issues"}
For the repo internalorg/IMPORTANT_REPO
(as well as others), the repo does not have GH issues.
GH issues are disabled for the repo.
@jumanjiman thank you for the feedback. Glad to hear you were able to test #959 . No need to open another issue, it's the same bug that needs to be fixed for the two other requests (GetProjects and GetIssues). I'll add a new commit for that on top of #959 shortly.
@TristanCacqueray TY!
Thank you for this project!
I used the Docker image to test it against a private GHE (GitHub Enterprise) instance and discovered a bug and opportunity for enhancement.
Expected
https://github.com/change-metrics/monocle/blob/master/src/Lentille/GitHub/RateLimit.hs should handle the case where GHE admins have disabled rate limits on a GHE instance.
Actual
When GHE ratelimit is disabled (i.e., unlimited ratelimit), GitHub crawler treats
null
ratelimit as an error and therefore fails to crawl org data.log output
This was the relevant line in
docker-compose logs
, and I inserted line breaks here for readability:config
Reproducer
I wrote a trivial bash script to demonstrate actual responses from our GHE instance.
reproducer script output
reproducer script
GraphiQL screenshot
as a confirmation of the reproducer script and output:
Possible related issues
/api/graphql
in URL: https://github.com/change-metrics/monocle/issues/876