aws / aws/eks-anywhere

GitOps: review up-to-date error after pull behavior

Open
#2,092 0 comments 0 reactions 0 assignees View on GitHub
area/gitops team/cli
Dominant language
Go
Stars
2.1k
Forks
328
Avg merge
1d 4h
Merged PRs (30d)
9

Description

When a remote repository is 'up to date' and we pull, go-git returns an error, which they intentionally call [`NoErrAlreadyUpToDate`
](https://github.com/go-git/go-git/blob/f0b111ab70e4e90013658b0835929b2083902017/remote.go#L32).

In our code, we mimic that, and return our own up-to-date error if we pull and the repo is up-to-date.

We need to re-visit this and simplify it; there's a place in the FluxAddonClient where we use a retrier to Pull, and it retries on this up-to-date error, creating noisy logs; we do this because in our original testing if we pulled from the remote too quickly after pushing to github we would sometimes get up-to-date one or twice before the pull changes were reflected (eventual consistency?). However, this is not apparent in the code and should be addressed and simplified/documented.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the FluxAddonClient pull retry and its handling of go-git's NoErrAlreadyUpToDate behavior. Review the original eventual-consistency rationale in the issue; done means the retry behavior is simplified and the up-to-date handling is documented without noisy unnecessary retries.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go
Domain
devops
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.