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

If branch = label then new commits are only pulled when flux is started #1845

Closed
sebastianblunt opened this issue Mar 19, 2019 · 4 comments
Closed

Comments

@sebastianblunt
Copy link

Following option 2) https://github.com/weaveworks/flux/blob/master/site/faq.md#i-have-a-dedicated-kubernetes-cluster-per-environment-and-i-want-to-use-the-same-git-repo-for-all-how-can-i-do-that

If you happen to set the label to the same as the branch name, then the newest commit (abc...) on startup of flux is fetched and applied. But then from there on out every time it polls it will say that HEAD=abc... and not apply changes even if you've since pushed a new commit. Restarting flux will then cause it to fetch the actual newest commit and start over being stuck at that commit.

Changing the label to something else, doing git push --delete origin tags/<label> and then restarting flux fixes this.

@squaremo
Copy link
Member

We can

  1. make sure we fully qualify refs when asking which revisions they point to, and
  2. (if still necessary) warn if we detect that the tag has the same name as a branch.

@hiddeco
Copy link
Member

hiddeco commented Mar 27, 2019

@sebastianblunt may I ask you what version of Flux you are running? I tried to replicate the issue to start working on it but I am seeing different behavior from Flux than what you describe.

In my setup (running of a build from latest master, with --git-branch and --git-label set to something), new commits are applied but the actual tag never reaches git (which is nevertheless something that needs to be fixed).

@sebastianblunt
Copy link
Author

I'm still on 1.8.1.

@hiddeco
Copy link
Member

hiddeco commented Mar 27, 2019

Thanks for the speedy response!

This changes the issue to: if --git-branch and --git-label have the same name, Flux (silently) fails to create a sync tag.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants