You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ArnasBalsys (via GitHub)" <gi...@apache.org> on 2023/09/04 13:51:56 UTC
[GitHub] [airflow] ArnasBalsys opened a new issue, #34078: git-sync subPath is not working
ArnasBalsys opened a new issue, #34078:
URL: https://github.com/apache/airflow/issues/34078
### Official Helm Chart version
1.10.0 (latest released)
### Apache Airflow version
2.7.0
### Kubernetes Version
1.26.7
### Helm Chart configuration
```
dags:
persistence:
enabled: false
gitSync:
enabled: true
repo: https://repo.link/Airflow.git
branch: main
subPath: "dags"
credentialsSecret: airflow-git-credentials
containerName: airflow-git-sync
```
### Docker Image customizations
Extended official airflow image with additional packages
### What happened
It seems that when using git-sync and specifying a dags folder it's being completely ignored. It instead copies the whole repository and no matter your folder name - subPath value is not taken into account for.
```
gitSync:
enabled: true
...
# subpath within the repo where dags are located
# should be "" if dags are at repo root
subPath: "dags"
```
The same issue was opened awhile back but unfortunately closed:
https://github.com/apache/airflow/issues/16622
### What you think should happen instead
_No response_
### How to reproduce
just specify a non-existant folder on the subPath value - it will be ignored
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on issue #34078: git-sync subPath is not working
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #34078:
URL: https://github.com/apache/airflow/issues/34078#issuecomment-1705312731
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #34078: git-sync subPath is not working
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #34078:
URL: https://github.com/apache/airflow/issues/34078#issuecomment-1705665455
It is going to be closed again (or rather moved to discussion).
With git-sync it is impossible to clone sub-directory of a repo. This is not how git and git-sync works. You always have to clone the whole repository.
How subPath works, is that it makes AIRFLOW_DAGS env variable point to the sub-directory of the cloned repo:
```
{{- define "airflow_dags" -}}
{{- if .Values.dags.gitSync.enabled }}
{{- printf "%s/dags/repo/%s" .Values.airflowHome .Values.dags.gitSync.subPath }}
{{- else }}
{{- printf "%s/dags" .Values.airflowHome }}
{{- end }}
{{- end }}
```
So when you use subPath, the whole repo is cloned, but Airflow looks for dags only in `subPath` of it.
Converting to discussion, but if you argue with it, you should argue with git and git-sync maintainers, not with Airflow ones.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk closed issue #34078: git-sync subPath is not working
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed issue #34078: git-sync subPath is not working
URL: https://github.com/apache/airflow/issues/34078
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org