Skip to content

Commit 16e7129

Browse files
authored
Added support for provider packages for Airflow 2.0 (#11487)
* Separate changes/readmes for backport and regular providers We have now separate release notes for backport provider packages and regular provider packages. They have different versioning - backport provider packages with CALVER, regular provider packages with semver. * Added support for provider packages for Airflow 2.0 This change consists of the following changes: * adds provider package support for 2.0 * adds generation of package readme and change notes * versions are for now hard-coded to 0.0.1 for first release * adds automated tests for installation of the packages * rename backport package readmes/changes to BACKPORT_* * adds regulaar packge readmes/changes * updates documentation on generating the provider packaes * adds CI tests for the packages * maintains backport packages generation with --backports flag Fixes #11421 Fixes #11424
1 parent 42b979d commit 16e7129

File tree

316 files changed

+13647
-2494
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

316 files changed

+13647
-2494
lines changed

β€Ž.github/workflows/ci.yml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,15 @@ jobs:
271271
- name: "Spell check docs"
272272
run: ./scripts/ci/docs/ci_docs.sh --spellcheck-only
273273

274-
prepare-provider-packages:
274+
prepare-backport-provider-packages:
275275
timeout-minutes: 30
276276
name: "Backport packages"
277277
runs-on: ubuntu-latest
278278
needs: [build-info, ci-images]
279279
env:
280280
INSTALL_AIRFLOW_VERSION: "1.10.12"
281281
PYTHON_MAJOR_MINOR_VERSION: ${{needs.build-info.outputs.defaultPythonVersion}}
282+
BACKPORT_PACKAGES: "true"
282283
if: github.repository == 'apache/airflow' || github.event_name != 'schedule'
283284
steps:
284285
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
@@ -304,7 +305,43 @@ jobs:
304305
if: always()
305306
with:
306307
name: airflow-backport-readmes
307-
path: "./files/airflow-backport-readme*"
308+
path: "./files/airflow-readme-*"
309+
310+
prepare-provider-packages:
311+
timeout-minutes: 30
312+
name: "Provider packages"
313+
runs-on: ubuntu-latest
314+
needs: [build-info, ci-images]
315+
env:
316+
INSTALL_AIRFLOW_VERSION: "2.0.0-dev" # Note that this causes local installation
317+
PYTHON_MAJOR_MINOR_VERSION: ${{needs.build-info.outputs.defaultPythonVersion}}
318+
if: github.repository == 'apache/airflow' || github.event_name != 'schedule'
319+
steps:
320+
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
321+
uses: actions/checkout@v2
322+
- name: "Setup python"
323+
uses: actions/setup-python@v2
324+
with:
325+
python-version: ${{ env.PYTHON_MAJOR_MINOR_VERSION }}
326+
- name: "Free space"
327+
run: ./scripts/ci/tools/ci_free_space_on_ci.sh
328+
- name: "Prepare CI image ${{env.PYTHON_MAJOR_MINOR_VERSION}}:${{ env.GITHUB_REGISTRY_PULL_IMAGE_TAG }}"
329+
run: ./scripts/ci/images/ci_prepare_ci_image_on_ci.sh
330+
- name: "Prepare & test provider packages"
331+
run: ./scripts/ci/provider_packages/ci_prepare_and_test_provider_packages.sh
332+
- name: "Upload provider package artifacts"
333+
uses: actions/upload-artifact@v2
334+
if: always()
335+
with:
336+
name: airflow-provider-packages
337+
path: "./files/airflow-packages-*"
338+
- name: "Upload readme artifacts"
339+
uses: actions/upload-artifact@v2
340+
if: always()
341+
with:
342+
name: airflow-provider-readmes
343+
path: "./files/airflow-readme-*"
344+
308345

309346
tests-postgres:
310347
timeout-minutes: 60
@@ -656,6 +693,7 @@ jobs:
656693
- tests-postgres
657694
- tests-mysql
658695
- tests-kubernetes
696+
- prepare-backport-provider-packages
659697
- prepare-provider-packages
660698
- prod-images
661699
- docs
@@ -695,7 +733,7 @@ jobs:
695733
- tests-postgres
696734
- tests-mysql
697735
- tests-kubernetes
698-
- prepare-provider-packages
736+
- prepare-backport-provider-packages
699737
- ci-images
700738
- docs
701739
- docs-spell-check

β€Ž.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ repos:
121121
- id: insert-license
122122
name: Add license for all md files
123123
files: \.md$
124-
exclude: ^\.github/.*$|PROVIDERS_CHANGES.*\.md
124+
exclude: ^\.github/.*$|BACKPORT_PROVIDERS_CHANGES.*\.md|PROVIDERS_CHANGES.*
125125
args:
126126
- --comment-style
127127
- "<!--|| -->"
@@ -293,8 +293,8 @@ repos:
293293
(?x)
294294
^airflow/providers/apache/cassandra/hooks/cassandra.py$|
295295
^airflow/providers/apache/hive/operators/hive_stats.py$|
296-
^airflow/providers/apache/hive/PROVIDERS_CHANGES_*|
297-
^airflow/providers/apache/hive/README.md$|
296+
^airflow/providers/apache/hive/.*PROVIDERS_CHANGES_*|
297+
^airflow/providers/apache/hive/.*README.md$|
298298
^tests/providers/apache/cassandra/hooks/test_cassandra.py$|
299299
^docs/howto/connection/cassandra.rst$|
300300
^CHANGELOG.txt$

β€Ž.rat-excludes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ rat-results.txt
7878
apache-airflow-.*\+source.tar.gz.*
7979
apache-airflow-.*\+bin.tar.gz.*
8080
PULL_REQUEST_TEMPLATE.md
81+
BACKPORT_PROVIDERS_CHANGES*.md
8182
PROVIDERS_CHANGES*.md
8283

8384
# Temporary list of files to make compatible with Pylint

β€ŽCI.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ You can use those variables when you try to reproduce the build locally.
6868
| | | | | the container. We mount only selected, |
6969
| | | | | important folders. We do not mount the whole |
7070
| | | | | project folder in order to avoid accidental |
71-
| | | | | use of artifacts (such ass ``.egginfo`` |
71+
| | | | | use of artifacts (such as ``egg-info`` |
7272
| | | | | directories) generated locally on the |
7373
| | | | | host during development. |
7474
+-----------------------------------------+-------------+-------------+------------+-------------------------------------------------+

β€ŽDockerfile.ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ COPY scripts/in_container/entrypoint_ci.sh /entrypoint
314314
RUN chmod a+x /entrypoint
315315

316316
# We can copy everything here. The Context is filtered by dockerignore. This makes sure we are not
317-
# copying over stuff that is accidentally generated or that we do not need (such as .egginfo)
317+
# copying over stuff that is accidentally generated or that we do not need (such as egg-info)
318318
# if you want to add something that is missing and you expect to see it in the image you can
319319
# add it with ! in .dockerignore next to the airflow, test etc. directories there
320320
COPY . ${AIRFLOW_SOURCES}/
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)