-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch databaseId for repos and users when initializing streams #112
Conversation
@edgarrmondragon is there a way to disable sonarcloud notifications? It's particularly annoying to get a github notification + email each time we're pushing a commit, to tell me it's green. I've looked around sonarcloud and their user forum, but I suspect this is configurable at admin level, from what I'm reading. |
@laurentS I don't think it's possible at the moment to disable the PR comments without uninstalling SonarCloud completely: https://community.sonarsource.com/t/disable-github-merge-request-comments/18520 |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This PR aims to resolve a number of issues by adding the numeric repo id to the context of all streams in the tap.
We have been having issues with repos changing names, incorrect case in the config file, etc... leading to problems with joins downstream. We are using
org/repo
to connect the various streams together, but since those values are not stable (for instance if a repo is renamed), this can lead to issues.To remedy this, we fetch the github
id
(ordatabaseId
in their graphql API lingo) and add it to all streams via the child context. Thisid
is stable across renames, which should help match records over time.The PR adds a "preflight" request to the graphql API which fetches said
id
for all the repos in the config file (ifrepositories
is indeed in the config). At the same time, it:meltanolabs/tap-github
is corrected toMeltanoLabs/tap-github
, see Tap-github allows inputting buggy data into its output #110)myorg/oldname
will return an HTTP 301, but we save this step here)These changes should help increase the resilience of the tap to invalid manual input, as well as repo renames. If this logic seems ok to everyone, we can also apply it to the user streams, as username are likely to change more often than repo names.