You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/03/20 09:55:38 UTC
[airflow] branch main updated: Add description on the vendoring process we use (#22204)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 9372aab Add description on the vendoring process we use (#22204)
9372aab is described below
commit 9372aabbed28b97a963fe0ffe1fec107f6c9391a
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sun Mar 20 10:54:46 2022 +0100
Add description on the vendoring process we use (#22204)
We need to vendor in cgroupspy library in order to make Airflow
compatible with Python 3.10 (see #22050) so this is the right time
to make our vendoring process more organized.
I based in parts on the readme described by `bleach` package.
---
airflow/_vendor/README.md | 37 +++++++++++++++++++++++++++++++++++++
airflow/_vendor/vendor.md | 0
2 files changed, 37 insertions(+)
diff --git a/airflow/_vendor/README.md b/airflow/_vendor/README.md
new file mode 100644
index 0000000..e708f1e
--- /dev/null
+++ b/airflow/_vendor/README.md
@@ -0,0 +1,37 @@
+# Vendor package
+
+## What vendored packages are for
+
+The `airflow._vendor` package is foreseen for vendoring in packages, that we have to modify ourselves
+because authors of the packages do not have time to modify them themselves. This is often temporary
+and once the packages implement fixes that we need, and then we remove the packages from
+the `_vendor` package.
+
+All Vendored libraries must follow these rules:
+
+1. Vendored libraries must be pure Python--no compiling (so that we do not have to release multi-platform airflow packages on PyPI).
+2. Source code for the libary is included in this directory.
+3. License must be included in this repo and in the [LICENSE](../../LICENSE) file and in the
+ [licenses](../../licenses) folder.
+4. Requirements of the library become requirements of airflow core.
+5. Version of the library should be included in the [vendor.md](vendor.md) file.
+6. No modifications to the library may be made in the initial commit.
+7. Apply the fixes necessary to use the vendored library as separate commits - each package separately,
+ so that they can be cherry-picked later if we upgrade the vendored package. Changes to airflow code to
+ use the vendored packages should be applied as separate commits/PRs.
+8. The `_vendor` packages should be excluded from any refactorings, static checks and automated fixes.
+
+## Adding and upgrading a vendored package
+
+Way to vendor a library or update a version:
+
+1. Update ``vendor.txt`` with the library, version, and SHA256 (`pypi` provides hashes as of recently)
+2. Remove all old files and directories of the old version.
+3. Replace them with new files (only replace relevant python packages:move LICENSE )
+ * move licence files to [licenses](../../licenses) folder
+ * remove README and any other supporting files (they can be found in PyPI)
+ * make sure to add requirements from setup.py to airflow's setup.py with appropriate comment stating
+ why the requirements are added and when they should be removed
+4. If you replace previous version, re-apply historical fixes from the "package" folder by
+ cherry-picking them.
+
diff --git a/airflow/_vendor/vendor.md b/airflow/_vendor/vendor.md
new file mode 100644
index 0000000..e69de29