Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Pseudo randomize push check tag #2684

Merged
merged 1 commit into from
Dec 11, 2019
Merged

Pseudo randomize push check tag #2684

merged 1 commit into from
Dec 11, 2019

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Dec 11, 2019

When multiple Flux instances are synchronizing with the same repository
but different branches, and the upstream has some latency, they get
confused about the write check they are performing due to the tag
being overwritten with a commit hash that does not belong to the branch
they are synchronzing with.

This commit pseudo randomizes the tag used to check if we can write to
the upstream repository and removes the --force options from the tag
and push commands so that the tag is never accidentally overwritten and
multiple instances no longer get in each other's way.

Fixes #2683

@hiddeco hiddeco added this to the 1.17.0 milestone Dec 11, 2019
@hiddeco hiddeco requested a review from 2opremio December 11, 2019 21:40
@2opremio
Copy link
Contributor

Is the e2e failure legitimate? It's hard to tell from the logs :S

pkg/git/operations.go Outdated Show resolved Hide resolved
When multiple Flux instances are synchronizing with the same repository
but different branches, and the upstream has some latency, they get
confused about the write check they are performing due to the tag
being overwritten with a commit hash that does not belong to the branch
they are synchronzing with.

This commit pseudo randomizes the tag used to check if we can write to
the upstream repository and removes the `--force` options from the tag
and push commands so that the tag is never accidentally overwritten and
multiple instances no longer get in each other's way.
@hiddeco hiddeco merged commit 3b5c66d into master Dec 11, 2019
@hiddeco hiddeco deleted the bug/pseudo-rand-push-tag branch December 11, 2019 23:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants