-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: removing mr.Headpipeline.Source log when mr.HeadPipeline is missing #3996
Conversation
@X-Guardian FYI |
@@ -387,12 +387,12 @@ func (g *GitlabClient) UpdateStatus(repo models.Repo, pull models.PullRequest, s | |||
break | |||
} | |||
if i != retries { | |||
g.logger.Debug("Head pipeline not found for merge request %d, source '%s'. Retrying in %s", | |||
pull.Num, mr.HeadPipeline.Source, delay) | |||
g.logger.Debug("Head pipeline not found for merge request %d. Retrying in %s", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there another var that contains the source repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.gitlab.com/ee/api/merge_requests.html#response
from the merge request API this is just the type of event that triggered the pipeline which doesn't seem important to log when there is no pipeline yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine
LGTM |
thanks for your contribution @fitz7 |
…ing (runatlantis#3996) * fix: removing mr.Headpipeline.Source log when mr.HeadPipeline is missing * fix: remove mr.HeadPipeline.Source from other log
…ing (runatlantis#3996) * fix: removing mr.Headpipeline.Source log when mr.HeadPipeline is missing * fix: remove mr.HeadPipeline.Source from other log
what
when mr.HeadPipeline is missing and the gitlab client retries, it logs mr.HeadPipeline.Source which causes a panic:
why
Should fix the panic