2021-09-07 - CI pipelines are failing to find `master` branch.
Current Status
Manual and retried jobs for any runners on GitLab.com could experience an error fetching with a message like fatal: couldn't find remote ref refs/tags
, the bug was introduced in gitlab-org/gitlab!69537 (merged) and reverted with gitlab-org/gitlab!69812 (merged). To resolve the issue we initiated a rollback on GitLab.com.
In total, 9045 builds in 2366 projects were affected on GitLab.com.
Summary for CMOC notice / Exec summary:
- Customer Impact: Manual and retried jobs in CI
- Customer Impact Duration: 17:48 - 00:25
- Current state: IncidentResolved
- Root cause: RootCauseSoftware-Change
If you're still encountering failures after a retry
Please run a new pipeline, instead of retrying a failed build. There is a suspect that the retried build inhertis the same attributes from the previous problematic build, which marked as a build for git-tag (which is incorrect).
Running a new pipeline creates builds as a fresh state, that has collect attributes sets that the builds are for feature branches.
Root cause
The problematic builds are accidentally marked as a part of tag pipeline, meaning trying to checkout from refs/tags
instead of refs/heads
.
See gitlab-org/gitlab#340344 (comment 671694408) for more info.
Timeline
View recent production deployment and configuration events / gcp events (internal only)
All times UTC.
2021-09-07
-
17:48
- gitlab-org/gitlab!69537 (merged) deployed to production -
20:25
- @duncan_harris declares incident in Slack. -
21:20
- further dev escalation to help with investigation -
23:45
- problematic change has been identified and decision to rollback made
2021-09-08
-
00:25
- rollback completed.
Corrective Actions
Corrective actions should be put here as soon as an incident is mitigated, ensure that all corrective actions mentioned in the notes below are included.
- Validate the presenters (the ones inherited from Gitlab::View::Presenter::Delegated) do not override ActiveRecord defined methods, including the schema defined attributes
- Add integration/feature spec to check a retried build has the same attributes from the previous build
- Switch to
read_attribute
frompublic_send
inRetryBuildService
to avoid accidental miscopy
Note: In some cases we need to redact information from public view. We only do this in a limited number of documented cases. This might include the summary, timeline or any other bits of information, laid out in out handbook page. Any of this confidential data will be in a linked issue, only visible internally. By default, all information we can share, will be public, in accordance to our transparency value.
Click to expand or collapse the Incident Review section.
How to fix corrupted builds on a particular pipeline (Admin only)Please run the following scripts on rails-console. This will re-synchronize the ci_builds.tag
value and the ci_pipelines.tag
value.
pipeline = Ci::Pipeline.find(<pipeline-id-to-fix>)
pipeline.statuses.where(tag: true).update_all(tag: false) unless pipeline.tag
Incident Review
ci_builds.tag
value and the ci_pipelines.tag
value.pipeline = Ci::Pipeline.find(<pipeline-id-to-fix>)
pipeline.statuses.where(tag: true).update_all(tag: false) unless pipeline.tag
- Ensure that the exec summary is completed at the top of the incident issue, the timeline is updated and relevant graphs are included in the summary
- If there are any corrective action items mentioned in the notes on the incident, ensure they are listed in the "Corrective Action" section
- Fill out relevant sections below or link to the meeting review notes that cover these topics
Customer Impact
-
Who was impacted by this incident? (i.e. external customers, internal customers)
- All users who created or retried manual CI pipelines
-
What was the customer experience during the incident? (i.e. preventing them from doing X, incorrect display of Y, ...)
- This prevented customers from using CI in certain ways, potentially limiting deployments and code review.
-
How many customers were affected?
- @stanhu determined that 9045 builds were affected across 2366 projects
What were the root causes?
- ...
Incident Response Analysis
-
How was the incident detected?
- Support declared the incident due to several customers reaching out
-
How could detection time be improved?
- ...
-
How was the root cause diagnosed?
- ...
-
How could time to diagnosis be improved?
- ...
-
How did we reach the point where we knew how to mitigate the impact?
- ...
-
How could time to mitigation be improved?
- ...
-
What went well?
- ...
Post Incident Analysis
-
Did we have other events in the past with the same root cause?
- ...
-
Do we have existing backlog items that would've prevented or greatly reduced the impact of this incident?
- ...
-
Was this incident triggered by a change (deployment of code or change to infrastructure)? If yes, link the issue.
- ...
Lessons Learned
- ...
Guidelines
Resources
- If the Situation Zoom room was utilised, recording will be automatically uploaded to Incident room Google Drive folder (private)