-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: flux_bootstrap_git fails to push due to non-fast-forward update #662
Comments
We have implemented reties for Git operations but looks like they are implemented only on Are you getting the non-fast-forward error for newly provisioned clusters that don't have a directory in Git? |
oh yes, those clusters are getting their dir wiped during the destroy process, so on the following creation there is no directory. Thanks for the prompt reply 🙏🏻 |
This morning I've got a slightly different error message for the failed push but looks like is still the same issue as before.
|
@gionn, we would need to move all the Go logic from TF to the bootstrap pkg in flux2 and rewrite the TF provider. This is not something the team is considering spending time on this year. |
thanks for the update. Anyway I would leave this issue open as the reported bug is not solved and will impact users using the latest version. |
My TF code (using PAT token for this purpose) terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">=3.50.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = ">= 2.20.0"
}
kubectl = {
source = "gavinbunney/kubectl"
version = ">= 1.13.1"
}
flux = {
source = "fluxcd/flux"
version = "=1.2.2"
}
github = {
source = "integrations/github"
version = ">=5.26.0"
}
}
}
resource "flux_bootstrap_git" "this" {
secret_name = "kconfig"
path = "clusters/aks"
toleration_keys = ["CriticalAddonsOnly"]
version = "v2.3.0"
}
Getting error Planning failed. Terraform encountered an error while generating this plan. ╷ Withe the same change, my team member is able to run the TF Plan. I am also able to clone locally with the user and PAT token. How can i get the information what is wrong in my TF plan run? |
I've encountered the same issue: ╷
│ Error: Bootstrap run error
│
│ with flux_bootstrap_git.this,
│ on fluxcd.tf line 63, in resource "flux_bootstrap_git" "this":
│ 63: resource "flux_bootstrap_git" "this" {
│
│ failed to push manifests: failed to push to remote: non-fast-forward update: refs/heads/main
╵ |
Describe the bug
We have just completed the migration to v1.2.3 and using the new
flux_bootstrap_git
which works great except during a scheduled environments recreation we have setup every night. In this scenario multiple clusters (~5) are bootstrapping at the same time, and one terraform apply is failing withfailed to push manifests: failed to push to remote: non-fast-forward update: refs/heads/main
Steps to reproduce
flux_bootstrap_git
on multiple clusters concurrentlyExpected behavior
non-fast-forward push can happen anytime in a git workflow, provider should be smart enough to do a configurable number of retries internally before giving up.
Screenshots and recordings
Terraform and provider versions
Terraform v1.6.5 on linux_amd64
Terraform provider configurations
flux_bootstrap_git resource
Flux version
v2.2.3
Additional context
No response
Code of Conduct
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: