Skip to content
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

Extract Merge Requests that will close an issue #18

Open
pnadolny13 opened this issue Oct 13, 2021 · 5 comments
Open

Extract Merge Requests that will close an issue #18

pnadolny13 opened this issue Oct 13, 2021 · 5 comments

Comments

@pnadolny13
Copy link
Collaborator

In GitLab by @iroussos on Nov 12, 2019, 07:13

We currently export both the Issues and the Merge Requests for a Project.

We are not extracting the relation between Issues and Merge Requests that will close it.

That relation is important because it ties MRs to Issues and is also useful for tracking Cycle Analytics: From the moment an issue is created, to planning the issue, working on an issue in an MR, reviewing the MR and finally merging the MR and closing the issue.

This relation can be fetched in two ways:

  1. API call to list merge requests that will close issue on merge
  2. API call to List issues that will close on merge of an MR

We can use either one, but we have to be careful:

Similarly to fetching the Commits for a Merge Request, this operation requires one API call per Merge Request (or Issue), so going through that flow can slow down considerably the end-to-end extraction time. For example, in a project like gitlab-org/gitlab-foss, this would result to 15x more API calls than required for fetching all the other Entities supported by tap-gitlab.

The approach should be similar to what we did with fetching the Commits for a Merge Request, with a configuration parameter similar to fetch_merge_request_commits that will allow users to manually set this option for projects they know can handle that type of N+1 querying.

Useful Resources when working with Gitlab's API:

  1. Gitlab API Documentation
  2. Gitlab API entities
  3. Entity Schemas
@pnadolny13
Copy link
Collaborator Author

In GitLab by @iroussos on Nov 12, 2019, 07:14

removed milestone

@pnadolny13
Copy link
Collaborator Author

In GitLab by @iroussos on Nov 12, 2019, 07:17

changed title from Ex{-port and create table for-} Merge Requests that will close an issue to Ex{+tract+} Merge Requests that will close an issue

@pnadolny13
Copy link
Collaborator Author

In GitLab by @iroussos on Nov 12, 2019, 07:27

changed the description

@pnadolny13
Copy link
Collaborator Author

In GitLab by @iroussos on Nov 12, 2019, 08:18

changed the description

@pnadolny13
Copy link
Collaborator Author

In GitLab by @iroussos on Nov 12, 2019, 08:21

A followup when this issue is completed can be to add the Transformations necessary for this new relation table.

This can be done in the dbt package with the Transformations for gitlab data in a similar way as described in meltano/dbt-tap-gitlab#5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant