Граф коммитов

164 Коммитов

Автор SHA1 Сообщение Дата
Jarek Potiuk e25a8b09c5 Synchronize Provider templates with master 2021-04-15 14:00:31 +01:00
Jarek Potiuk 12ad529a3a Remove Backport Providers (#14886)
We are removing support for Backport Providers now.

The last release was sent yesterday- as planned, on 17 March 2021 - the
last release of the Backport Providers.

As agreed before, and documented here:
https://github.com/apache/airflow/blob/master/dev/PROJECT_GUIDELINES.md#support-for-backport-providers

> Backport providers within 1.10.x, will be supported for critical fixes
for three months (March 17, 2021) from Airflow 2.0.0 release date (Dec
17, 2020).

For the future reference, if anyone would like to build backport
providers with cherry-picking any fixes, the branch to start from is
`legacy-backport-cutoff-point`. The documentation and tools to build the
backports are there, but there will be no more community releases for
backports.

Good Bye Backport Providers.

(cherry picked from commit 68e4c4dcb0)
2021-04-15 14:00:31 +01:00
John Bampton 22509d2c2a Fix grammar and remove duplicate words (#14647)
* chore: fix grammar and remove duplicate words

(cherry picked from commit 6dc24c95e3)
2021-04-15 14:00:30 +01:00
Ash Berlin-Taylor f5fb9c4e96 Use libyaml C library when available. (#14577)
This makes loading local providers 1/3 quicker -- from 2s down from 3s
on my local SSD.

The `airflow.utils.yaml` module can be used in place of the normal yaml
module, with the bonus that `safe_load` will use libyaml where available
instead of always using the pure python version.

This shaves 3 minutes off the "WWW" tests - down to 8 minutes from
11 minutes.

I have not used this module in tests/docs code etc, as I don't want to
force importing `airflow` (and everything in currently brings in) in to
those contexts.

(cherry picked from commit 7daebefd15)
2021-04-15 14:00:30 +01:00
Tobiasz Kędzierski 87e747fa41 Add Apache Beam operators (#12814)
(cherry picked from commit 1872d8719d)
2021-03-03 11:04:31 +01:00
Jarek Potiuk 07d924d506 Implement provider versioning tools (#13767)
This change implements per-provider versioning tools. Version of the
providers is retrieved from provider.yaml file (top-level verion).
Documentation is generated in the documentation folder rather than
in sources and embedded in provider's index. Backport providers
remain as they were until we delete all the backport references in
April 2021 nd then the code can be simplified and the
backport functionality can be removed then.

When generating multiple providers, only those that have version
that has no corresponding `providers-<PROVIDER>/<VERSION>` are
generated. Other providers are skipped with warnings.

Old documentation is removed and new CHANGELOG.rst have been
prepared for all providers to accomodate to the new process
(which is comming as a follow-up commit)

Fixes: #13272, #13271, #13274, #13276, #13277, #13275, #13273
(cherry picked from commit ac2f72c98d)
2021-03-03 11:04:31 +01:00
Jarek Potiuk b0d1411e07 Introduces separate runtime provider schema (#13488)
The provider.yaml contains more information that required at
runtime (specifically about documentation building). Those
fields are not needed at runtime and their presence is optional.
Also the runtime check for provider information should be more
relexed and allow for future compatibility (with
additional properties set to false). This way we can add new,
optional fields to provider.yaml without worrying about breaking
future-compatibility of providers with future airflow versions.

This changei restores 'additionalProperties': false in the
main, development-focused provider.yaml schema and introduced
new runtime schema that is used to verify the provider info when
providers are discovered by airflow.

This 'runtime' version should change very rarely as change to
add a new required property in it breaks compatibility of
providers with already released versions of Airflow.

We also trim-down the provider.yaml file when preparing provider
packages to only contain those fields that are required in the
runtime schema.

(cherry picked from commit ad2a030b9e)
2021-01-21 19:30:23 +00:00
Kamil Breguła 1390a86cb8 Reduce the number of variables in Bash scripts (#13572)
(cherry picked from commit 9d6c7487dd)
2021-01-21 19:24:37 +00:00
Debodirno Chandra 2ada1e0128 Rewrite handwritten argument parser in prepare_provider_packages.py (#13234)
* Rewrite handwritten argument parser in prepare_provider_packages.py

- Replaced sys.argv manipulation with argparse.
- Replaced positional argument for PACKAGE with optional argument.

Issue : 13069

To be reviewed by : Kamil, Jarek.

* Modified help text for prepare_provider_packages as suggested by Kamil.

Signed-off-by: Debodirno Chandra <debodirnochandra@gmail.com>

* Moved each CLI subcommand in prepare_provider_packages.py to a separate function for modularity and code cleanup.

Signed-off-by: Debodirno Chandra <debodirnochandra@gmail.com>
(cherry picked from commit 1500083ca1)
2021-01-21 19:00:57 +00:00
Jarek Potiuk ec55140853 Additional properties should be allowed in provider schema (#13440)
The additional properties should be allowed in provider schema,
otherwise future version of providers will not be compatible with
older versions of Airflow.

Specifying 'additionalProperties' as allowed we are opening up to
adding more properties to provider.yaml.

This change fixes this is for now by removing extra fields
added since the Airlow 2.0.0 schema and verifying that the 2.0.0
schema correctly validates such modified dictionary.

In the future we might deprecate 2.0.0 and add >=2.0.1 limitation
to the provider packages in which case we will be able to remove
this modification of the provider_info dict.

Also added additional test for provider packages whether they
install on Airflow 2.0.0. This tests might remain even after the
deprecation of 2.0.0 - we can just move it to 2.0.1. However this
will give us much bigger confidence that the providers will
continue work even for older versions of Airflow 2.0.

We might have to modify that test and only include the providers
that are backwards-compatible, in case we have some providers
that depend on future Airflow versions. For now we assume
all providers should be installable from master on 2.0.0.

(cherry picked from commit 523e2f48ca)
2021-01-21 18:58:27 +00:00
Kamil Breguła 4c4b475d8d fixup! Adds timeout to all curl commands (#13431) (#13435)
(cherry picked from commit abcb0874a4)
2021-01-21 18:51:49 +00:00
Jarek Potiuk 94fb61382a Adds timeout to all curl commands (#13431)
Curl has a sophisticated back-off mechanism when trying to connect
and it causes sometimes that it hangs for a very long time
when first few attempts to connect failed with a 'soft' error.
Similarly, when curl starts transfer after connecting but the
other party hanged, the client curl call might hang as well.

This causes various problems for example sometimes waitig for
images in the ci build gets cancelled because curl command
to check for image fails - example:

https://github.com/apache/airflow/pull/13413/checks?check_run_id=1635401914

This change adds appropriate timeouts to all curl commands we
use in CI/manual operations. In many cases we implemented
retry so the effect will be that those cases will stop happening
but even in no-retry case, failing curl is better than hangs.

(cherry picked from commit 0909ddfd24)
2021-01-21 18:51:10 +00:00
Kaxil Naik 4b1da369bb Fix Grammar in PIP warning (#13380)
`might leads to errors` -> `might lead to errors`

(cherry picked from commit 295d66f914)
2021-01-21 18:36:26 +00:00
Jarek Potiuk 803a064479 Refactored setup.py to better reflect changes in providers (#13314)
This is a complete refactor of the setup.py providers/dependencies.

It much better reflects the current setup where we have most of
the extras 1-1 reflecting providers but also some extras that do
not have their own providers.

The pre-commits that were verifying setup versus documentation
can now be vastly simplified (no more need to parse the
comments so we can import setup.py variables directly rather
than parse it via regexps. Also we can better categorize the
extras - separate out (and verify) whether we correctly
described deprecated extras and to mark extras that install
additional providers as such.

Fixes: #13309
(cherry picked from commit 0d214575a1)
2021-01-21 18:35:37 +00:00
Jarek Potiuk 42ec1e262c Vastly improves usability of CI logs (#13323)
This change introduces improvements in the way logs are displayed
in CI jobs and in amount of logs produced in general for CI jobs
due to much smarter cache usage.

Logs in all CI jobs are now grouped in groups which are folded
by default when there is no error generated in such group. Similar
solution has been already used in docs job and it improved
both readability and speed of loading of the logs in CI after
recent improvements in Github UI (previously the speed of loading
the logs was not improved by groups).

Also cache usage has been reviewed and fixed in a number of places
which will result in much shorted setup times for static checks
and kubernetes virtualenv but also far shorter logs generated by
cache setup (we are using restore-keys feature that implements
incremental approach for cache building even if cache keys in
GitHub Actions are immutable.

(cherry picked from commit d41c6a46b1)
2021-01-21 18:29:52 +00:00
Jarek Potiuk a3e5e3fce9 Fix typo in pip upgrade command :( (#13148)
(cherry picked from commit 6cf76d7ac0)
2021-01-21 17:50:29 +00:00
John Bampton ed4926fa3f
🔒 Fix missing HTTPS on airflow site links (#13043) 2020-12-13 14:33:50 +01:00
Jarek Potiuk 825e9cb984
Fix gpg verification command (#13035) 2020-12-12 18:30:09 +00:00
Jarek Potiuk db027735a7
Changes release image preparation to use PyPI packages (#12990)
* Changes release image preparation to use PyPI packages

Since we released all teh provider packages to PyPI now in
RC version, we can now change the mechanism to prepare the
production to use released packages in case of tagged builds.

The "branch" production images are still prepared using the
CI images and .whl packages built from sources, but the
release packages are built from officially released PyPI
packages.

Also some corrections and updates were made to the release process:

* the constraint tags when RC candidate is sent should contain
  rcn suffix.

* there was missing step about pushing the release tag once the
  release is out

* pushing tag to GitHub should be done after the PyPI packages
  are uploaded, so that automated image building in DockerHub
  can use those packages.

* added a note that in case we will release some provider
  packages that depend on the just released airflow version
  they shoudl be released after airflow is in PyPI but before
  the tag is pushed to GitHub (also to allow the image to be
  build automatically from the released packages)

Fixes: #12970

* Update dev/README_RELEASE_AIRFLOW.md

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>

* Update dev/README_RELEASE_AIRFLOW.md

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
2020-12-12 12:01:58 +01:00
Jarek Potiuk 15fd1bc890
Switching to standard --tag-build flag in setuptools in providers (#13021)
Following #13020 provider packages are also switching to
--tag-build flag.
2020-12-12 07:28:51 +01:00
Ash Berlin-Taylor ab250ec1ca
Simplify release process for PyPI snapshots (#13020)
Setuptools has a built in mechanism for adding a `suffix` to a version,
so we don't have to edit a file and then remember to delete it!

It's a little bit messy to get the suffix like this -- using sed to
strip out any leading digits or periods, but it's copy-pasteable this
way.
2020-12-11 18:52:58 +01:00
Kaxil Naik a8ded09038
Remove trailing back-tick from docs (#12986) 2020-12-10 17:02:37 +01:00
Kaxil Naik 056fe81ec2
Fix command to filter package provider when building docs (#12984) 2020-12-10 15:57:21 +00:00
Jarek Potiuk 32971a1a2d
Updates providers versions to 1.0.0 (#12955)
Please enter the commit message for your changes. Lines starting
2020-12-09 20:25:41 +01:00
Ash Berlin-Taylor 0bf386fdf2
Rename airflow.operators.dagrun_operator to airflow.operators.trigger_dagrun (#12933)
Part of AIP-21

Co-authored-by: Kishore Vancheeshwaran <24776049+kishvanchee@users.noreply.github.com>
2020-12-09 14:00:51 +00:00
Kaxil Naik a075b6df99
Rename remaining Sensors to match AIP-21 (#12927)
As discussed in AIP-21

* Rename airflow.sensors.external_task_sensor to airflow.sensors.external_task
* Rename airflow.sensors.sql_sensor to airflow.sensors.sql
* Rename airflow.contrib.sensors.weekday_sensor to airflow.sensors.weekday
2020-12-09 00:09:08 +00:00
Kamil Breguła e595d35bf4
Simplify publishing of documentation (#12892)
Close: #11423
Close: #11152
2020-12-09 00:03:22 +00:00
Kishore Vancheeshwaran d5589673a9
Move dummy_operator.py to dummy.py (#11178) (#11293)
Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
2020-12-08 19:19:46 +00:00
Ash Berlin-Taylor b40dffa085
Rename remaing modules to match AIP-21 (#12917)
As discussed in AIP-21

* Rename airflow.hooks.base_hook to airflow.hooks.base
* Rename airflow.hooks.dbapi_hook to airflow.hooks.dbapi
* Rename airflow.sensors.base_sensor_operator to airflow.sensors.base
* Rename airflow.sensors.date_time_sensor to airflow.sensors.date_time
* Rename airflow.sensors.time_delta_sensor to airflow.sensors.time_delta

Co-authored-by: Kaxil Naik <kaxilnaik@apache.org>
2020-12-08 18:01:58 +00:00
Kaxil Naik ef523b4c2b
Move branch_operator.py to branch.py (#12900)
Part of #11178 for the branch_operator
2020-12-08 08:41:16 +00:00
Kaxil Naik 2c70ac41af
Update commands to verify singature and shasum for Providers (#12886)
This commit ports changes from https://github.com/apache/airflow/pull/12869 & https://github.com/apache/airflow/pull/12867 to Providers doc
2020-12-07 16:40:12 +01:00
Kaxil Naik a00f25011f
Change the format for sha512 sum for releases (#12867)
closes https://github.com/apache/airflow/issues/12832

This format is popular and supported by tools like Ansible.

```
❯ sha512sum ../airflow-dev/1.10.14rc3/apache-airflow-1.10.14rc3-bin.tar.gz
953d3c04ee6fd2fa96e126750e642fc0872add96d180901440a91bd61c494a711b48836c634d93dcb181006935772556d5b4426671bf1a638f0a0698b51b119f  ../airflow-dev/1.10.14rc3/apache-airflow-1.10.14rc3-bin.tar.gz
```

vs

```
❯ gpg --print-md SHA512 ../airflow-dev/1.10.14rc3/apache-airflow-1.10.14rc3-bin.tar.gz
../airflow-dev/1.10.14rc3/apache-airflow-1.10.14rc3-bin.tar.gz:
953D3C04 EE6FD2FA 96E12675 0E642FC0 872ADD96 D1809014 40A91BD6 1C494A71 1B48836C
 634D93DC B1810069 35772556 D5B44266 71BF1A63 8F0A0698 B51B119F
```
2020-12-06 23:46:06 +00:00
Kaxil Naik 298c88a434
Fix command for verifying signature (#12869) 2020-12-07 00:43:14 +01:00
Jarek Potiuk ed1825c026
Production images on CI are now built from packages (#12685)
So far, the production images of Airflow were using sources
when they were built on CI. This PR changes that, to build
airflow + providers packages first and install them
rather than use sources as installation mechanism.

Part of #12261
2020-12-06 23:36:33 +01:00
Kaxil Naik c960a9fd86
Fix Commands for Publishing constraints (#12800) 2020-12-06 11:39:48 +01:00
Jarek Potiuk e9b2ff57b8
Add notes about PIP 20.3 breaking Airflow installation (#12840)
Part of #12838
2020-12-05 19:53:09 +01:00
Ash Berlin-Taylor 2936c13a44
Get airflow version from importlib.metadata rather than hard-coding (#12786)
One less thing to change, and one less pre-commit step needed :)
2020-12-04 16:42:25 +00:00
Jarek Potiuk a02e0f746f
User-friendly output of Breeze and CI scripts (#12735) 2020-12-01 17:44:05 +01:00
Jarek Potiuk 41a699a7bd
Implement reading provider information from packages/sources (#12512)
This PR implements discovering and readin provider information from
packages (using entry_points) and - if found - from local
provider yaml files for the built-in airflow providers,
when they are found in the airflow.provider packages.
The provider.yaml files - if found - take precedence over the
package-provided ones.

Add displaying provider information in CLI

Closes: #12470
2020-11-27 18:42:32 +01:00
Tomek Urbaszek 456a1c5dc9
Restructure the extras in setup.py and described them (#12548)
Closes: #12544

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
2020-11-27 15:34:47 +01:00
Kaxil Naik 0f102079ae
Add docs about tagging and pushing constraints file (#12625)
We push constraints files for each airflow release:

```
❯ git tag --list | grep constraints
constraints-1.10.1
constraints-1.10.10
constraints-1.10.11
constraints-1.10.13
constraints-1.10.2
constraints-1.10.3
constraints-1.10.4
constraints-1.10.5
constraints-1.10.6
constraints-1.10.7
constraints-1.10.8
constraints-1.10.9
```
2020-11-25 18:04:42 +00:00
Kamil Breguła de15aa30d4
Deprecate Read the Docs (#12541) 2020-11-22 19:45:12 +01:00
Kaxil Naik 287ed4926b
Fix git archive command in Release Management guide (#12526)
There was a trailing back-tick which I found when cutting 1.10.13rc1
2020-11-21 09:48:27 +00:00
Kamil Breguła c34ef853c8
Separate out documentation building per provider (#12444)
* POC

* fixup! POC
2020-11-20 15:35:56 +01:00
Jarek Potiuk 7ca0b6f121
Enable Markdownlint rule MD003/heading-style/header-style (#12427) (#12438)
Co-authored-by: John Bampton <jbampton@users.noreply.github.com>
2020-11-18 15:37:51 +01:00
Kaxil Naik fd36f96e0c
Enable Markdownlint rule MD014/commands-show-output (#12430)
https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md014---dollar-signs-used-before-commands-without-showing-output
2020-11-18 07:29:52 +01:00
Daniel Imberman cab86d80d4
Make K8sPodOperator backwards compatible (#12384)
* Make the KubernetesPodOperator backwards compatible

This PR significantly reduces the pain of upgrading to Airflow 2.0
for users of the KubernetesPodOperator. Users will be allowed to
    continue using the airflow.kubernetes custom classes

* spellcheck

* spelling

* clean up unecessary files in 1.10

* clean up unecessary files in 1.10

* clean up unecessary files in 1.10
2020-11-17 13:47:18 -08:00
Jarek Potiuk 2c0920fba5
Adds mechanism for provider package discovery. (#12383)
This is a simple mechanism that will allow us to dynamically
discover and register all provider packages in the Airflow core.

Closes: #11422
2020-11-17 18:48:57 +01:00
Kamil Breguła 6889a333cf
Improvements for operators and hooks ref docs (#12366) 2020-11-15 00:50:30 +01:00
Kaxil Naik 6cb8e5c2ae
Fix case for PyPI in docs (#12364)
`PyPi` -> `PyPI`
2020-11-14 04:08:08 +00:00