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

Have getLatestPipelineID return branch pipeline ID if no merge request pipeline was found #36

Merged
merged 3 commits into from
Aug 16, 2023

Conversation

ahinh43
Copy link
Collaborator

@ahinh43 ahinh43 commented Aug 16, 2023

Closes #33

Proposed Changes

  • Adds a fallback behavior to getLatestPipelineID to return a non merge_request_event CI pipeline ID if no merge request pipelines were found, rather than just returning nil if no MR pipelines were found

Testing Information

Tested this via localdev environment

Before behavior

After change

Other information

While I still haven't found the root cause of why the full polling task retries multiple times when getLatestPipelineID always returns nil due to a repo not having an MR pipeline configured, this will at least stop the retry behavior which should save us from spending unnecessary compute cycles waiting to get a non existant pipeline ID, and spamming an MR with the same comment over and over again.

Note that this issue and logic only appears on Gitlab. Github does not have this issue.

…o no merge request pipelines configured

Signed-off-by: Alec Hinh <alec.hinh@zapier.com>
Signed-off-by: Alec Hinh <alec.hinh@zapier.com>
@djeebus
Copy link
Collaborator

djeebus commented Aug 16, 2023

seems like a reasonable fall back to me, I'm on board

@ahinh43 ahinh43 merged commit af18e5c into zapier:main Aug 16, 2023
4 checks passed
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.

Duplicate MR comments posted when running tfc plan or tfc apply
2 participants