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

GitLab pipeline API change: detached pipeline refs changed - Marge fails to detect pipeline #185

Closed
veeg opened this issue May 10, 2019 · 2 comments · Fixed by #212
Closed

Comments

@veeg
Copy link

veeg commented May 10, 2019

Due to recent GitLab API Change, the refs slug received from list pipelines returns a ref changed to format refs/merge-requests/[MERGE_REQUEST_NUMBER]/head, instead of [BRANCH_NAME].

This is only applicable when the pipeline is ran on merge_requests, e.g., detached.

The following call needs to be augmented with a refs argument:

marge-bot/marge/job.py

Lines 138 to 142 in 183be28

pipelines = Pipeline.pipelines_by_branch(
merge_request.source_project_id,
merge_request.source_branch,
self._api,
)

@veeg
Copy link
Author

veeg commented Jun 10, 2019

This API change has renderes Margebot useless for our deployment.

Does anyone have a suggestion on how this scenario should be handled, and I can have a stab at implementing it.

@dbinderAtCP
Copy link

We are stymied by this too. One thought could be to get all of the pipelines associated with the project_id, by adding an all_pipelines() method to Pipeline, requiring the iterator in get_mr_ci_status() looking for the matching sha to deal with the longer list.

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 a pull request may close this issue.

2 participants