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

feat: add get_pipeline endpoint #354

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Conversation

giovanni-guidini
Copy link
Contributor

related to codecov/engineering-team#2076

Apparently there are situations in which we want to post the commit checks to more than one commit, for GitLab (when merge result pipelines are enabled).

In order to do this we have basicaly 2 options:

  1. Get the extra commit SHAs, or
  2. Save the extra commit SHAs.

I don't think this is such a common situation for us, so that the cost of some extra
requests to GitLab are less than the cost of making changes to the database to save the
extra info (CLI sends extra SHA and it's saved in the Upload).

So these changes introduce the endpoint that let's us get the pipeline details to see
if we need to send commit statuses to multiple SHAs.
The project ID is Repository.service_id and the job ID is ReportSession.job_code.

related to codecov/engineering-team#2076

Apparently there are situations in which we want to post the commit checks to more than one commit, for GitLab (when merge result pipelines are enabled).

In order to do this we have basicaly 2 options:
1. Get the extra commit SHAs, or
2. Save the extra commit SHAs.

I don't think this is such a common situation for us, so that the cost of some extra
requests to GitLab are less than the cost of making changes to the database to save the
extra info (CLI sends extra SHA and it's saved in the Upload).

So these changes introduce the endpoint that let's us get the pipeline details to see
if we need to send commit statuses to multiple SHAs.
The project ID is `Repository.service_id` and the job ID is `ReportSession.job_code`.
@giovanni-guidini giovanni-guidini requested a review from a team September 10, 2024 17:12
giovanni-guidini added a commit to codecov/worker that referenced this pull request Sep 10, 2024
depends on codecov/shared#354

These changes collect extra SHAs that we need to (potentially) notify for GitLab users
that use "merge request result" pipelines and the "merge train" feature.

These changes only _collect_ the extra SHAs. The actual notification will happen later.
@giovanni-guidini giovanni-guidini added this pull request to the merge queue Sep 11, 2024
Merged via the queue into main with commit cdf263f Sep 11, 2024
6 checks passed
@giovanni-guidini giovanni-guidini deleted the gio/fetch-pipeline branch September 11, 2024 12:22
giovanni-guidini added a commit to codecov/worker that referenced this pull request Sep 16, 2024
depends on codecov/shared#354

These changes collect extra SHAs that we need to (potentially) notify for GitLab users
that use "merge request result" pipelines and the "merge train" feature.

These changes only _collect_ the extra SHAs. The actual notification will happen later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants