microsoft / microsoft/go

Add error handling/retries to Go -> Docker auto-update infra

Open
#209 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Docker
Dominant language
Go
Stars
431
Forks
44
Avg merge
21h 18m
Merged PRs (30d)
30

Description

The go-docker auto-update infra has some potential for races: it first checks to see if a PR exists, and based on that, decides whether to fetch from an existing branch or create a new branch, and whether to ff push or force push to the branch. Even within a single decision, there is a short window for a race between the fetch and the push where other auto-updates could race.

We might be more likely to hit this than it seems: the branch sync runs on a schedule, so microsoft/main and microsoft/go.release-branch.* builds (and therefore Docker updates) will probably run around the same time, and eventually could happen to line up.

Mitigations:

  • The Docker auto-update is quick (10s).
  • I haven't thought of a condition where this problem will cause a bad change to get merged. I think we just might miss a particular update (which we can retry manually if we care about that update in particular).

We should adjust the auto-update code to account for this.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Go-to-Docker auto-update code and the path that checks for an existing PR before fetching, creating branches, or pushing. Review how scheduled updates can overlap; done means race-related fetch or push failures are handled with retries or clear errors without losing an update.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.