-
Notifications
You must be signed in to change notification settings - Fork 16.5k
[WIP] Track and enforce git version #1692
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
Conversation
|
What is this? Are you assuming that the DAGs dir is going to be a git repo? |
Yes, as stated in the first entry in "changes". |
|
Is that a valid assumption? Thus far, I think Airflow has worked if the |
|
I see this, though: |
Yeah, the idea I'm working towards is for the user to be able to choose their method of version control via the config file, with the default being no version control (ie same behaviour as current master). Sorry if this was not clear. I'm trying to isolate the git-specific logic to 2-3 functions, as in https://github.com/zodiac/incubator-airflow/blob/3e3715d5a15d09351e1944bdb56b5fe91bec16cf/airflow/version_control/__init__.py#L11-L12, so a new version control system (eg mercurial) can be implemented by writing those 2-3 functions. It is not completely backwards-compatible, though, because I need to add a column to task_instance. |
Should be fine, since we have |
|
@artwr If you have a moment to take a look at this, that would be great! |
| subdir = os.path.abspath(os.path.expanduser(subdir)) | ||
| return subdir | ||
|
|
||
| if "DAGS_FOLDER" in subdir: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens here if subdir is None?
|
@zodiac Please rebase this commit and let me know your intention on whether you plan to get this across the line. I will wait 5 days to hear back on next steps. |
|
Pls reopen when ready for review, test, and merge. Also, pls create a JIRA at that time. |
Dear Airflow Maintainers,
Please accept this PR that addresses the following issues:
Testing Done:
Changes
DAG_FOLDERis a git repository, on dag parsing, the created dag objects will have the git revision (sha) ofDAG_FOLDERas a propertyDAG_FOLDERout at the revision of the task instanceTODO: