airflow-helm / charts

The User-Community Airflow Helm Chart is the standard way to deploy Apache Airflow on Kubernetes with Helm. Originally created in 2017, it has since helped thousands of companies create production-ready deployments of Airflow on Kubernetes.
https://github.com/airflow-helm/charts/tree/main/charts/airflow
Apache License 2.0
630 stars 474 forks source link

git synch error #793

Closed bartolamey closed 8 months ago

bartolamey commented 9 months ago

Checks

Chart Version

8.8.0

Kubernetes Version

Client Version: v1.28.2
Server Version: v1.27.3

Helm Version

version.BuildInfo{Version:"v3.12.0", GitCommit:"c9f554d75773799f72ceef38c51210f1842a1dea", GitTreeState:"clean", GoVersion:"go1.20.4"}

Description

Good afternoon, I deployed the latest version of airflow. Enabled git-sync(sshSecret and httpSecret). The dougs appeared, everything works great. As soon as I make changes to the branch, under git-sync it gives an error exit status 128: { stdout: "", stderr: "fatal: git cat-file: could not get object info" }" "rev"="HEAD" "

Relevant Logs

I1009 07:00:53.517282      10 main.go:1112] "level"=0 "msg"="update required" "rev"="HEAD" "local"="1a17c49fead598d020850c293823a0f46fe8332e" "remote"="499938761a71891bcc299e3e39ec08c530135e0d"                                                                                                                                                                                                                                                  ││ I1009 07:00:53.517326      10 main.go:760] "level"=0 "msg"="syncing git" "rev"="HEAD" "hash"="499938761a71891bcc299e3e39ec08c530135e0d"                                                                                                                                                                                                                                                                                                            ││ E1009 07:00:56.132600      10 main.go:781] "msg"="can't resolve commit, will retry" "error"="Run(git cat-file -t 499938761a71891bcc299e3e39ec08c530135e0d): exit status 128: { stdout: "", stderr: "fatal: git cat-file: could not get object info" }" "rev"="HEAD" "hash"="499938761a71891bcc299e3e39ec08c530135e0d"

Custom Helm Values

gitSync:
  enabled: true
  image:
    repository: registry.k8s.io/git-sync/git-sync
    tag: v3.6.5
    pullPolicy: IfNotPresent
    uid: 65533
    gid: 65533

  resources: {}

  repo: "git@github.com:***/***.git"

  repoSubPath: "dags"

  branch: dev

  revision: HEAD

  depth: 1

  syncWait: 60

  syncTimeout: 120

  submodules: recursive

  httpSecret: ""

  httpSecretUsernameKey: username

  httpSecretPasswordKey: password

  sshSecret: "airflow-ssh-git-secret"

  sshSecretKey: id_rsa

  sshKnownHosts: ""

  maxFailures: 0
thesuperzapper commented 9 months ago

@bartolamey what kind of Kubernetes cluster are you using?

Also, test with a different dag git repo (with only one or two plain dag files) to check if its something about your git repo that is causing an issue.

bartolamey commented 9 months ago

We use https://cloud.yandex.com/en/services/managed-kubernetes I would like to note that the dags are added when you first turn it on. The problem appears after pushing into a branch with dugs.

thesuperzapper commented 9 months ago

@bartolamey can you try with a very simple git repo as stated, for example:

  1. Make a repo with a single single dag python file.
  2. Use that repo (and confirm it gets the initial version of the dag)
  3. Push a basic update commit to that repo (and confirm if the same error occurs)

This will help us nail down if the issue is caused by something special in your git repo, or if its a problem with your cluster.

bartolamey commented 8 months ago

yes, there was a problem in the repository. Creating a new one solved the problem.