aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github/import_mediator.go
Commit message (Collapse)AuthorAgeFilesLines
* github: fix data race when closing event channelMichael Muré2022-06-051-78/+56
| | | | | | | | | | I believe the issue was twofold: When done importing, the calling context is likely still valid, so if the output channel is not read enough and reach capacity, some event producer down the line can be blocked trying to send in that channel. When closing it, this send is still trying to proceed, which is illegal in go. In rateLimitHandlerClient, there was a need to 2 different type of output channel: core.ExportResult and ImportEvent. To do so, the previous code was using a single channel type RateLimitingEvent and a series of goroutines to read/cast/send to the final channel. This could result in more async goroutine being stuck trying to send in an at-capacity channel. Instead, the code now use a simple synchronous callback to directly push to the final output channel. No concurrency needed anymore and the code is simpler. Any of those fixes could have resolved the data race, but both fixes is more correct.
* feature: Github bridge mutation rate limit (#694)rng-dynamics2021-09-141-108/+8
| | | Unified handling of rate limiting of github graphql api
* github: minor cleanupsMichael Muré2021-04-091-15/+15
|
* Improve feedback for user when Github rate limitingAlexander Scharinger2021-04-081-4/+4
| | | | | | | | The Github bridge itself should not write anything. This commit removes code writing to stdout and itroduces an event `ImportEventRateLimiting` to `core.ImportResult` in order to inform about a rate limiting situation of the Github GraphQL API. Now the communication with the user is delegated to the various user interfaces.
* Github bridge: stop sleep-timer on SIGINTAlexander Scharinger2021-03-271-2/+8
|
* Github bridge: RefactorAlexander Scharinger2021-03-221-218/+113
|
* Github bridge: send message to user when waitingAlexander Scharinger2021-03-181-47/+144
| | | | | | When the Github GraphQL API rate limit is exhausted print a message at the bottom of the terminal so the user knows why the import has been paused.
* Github bridge: try again in case of web API errorAlexander Scharinger2021-03-151-1/+23
|
* Remove maps containing channels.Alexander Scharinger2021-03-151-78/+42
| | | | | | | | | The old implementation of the github bridge used maps to store several channels holding data obtained from the Github API. Removing the maps and simply packing data and channels together in a struct and passing it through one single channel makes the program simpler in terms of concurrency and, additionally, enables the garbage collector to free the memory gradually without any additional provisions.
* Fix errors: deadlock and empty titlesAlexander Scharinger2021-03-151-156/+214
|
* Deal with github bridge import rate limitAlexander Scharinger2021-02-281-0/+394