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

11268 Коммитов

Автор SHA1 Сообщение Дата
Jarek Potiuk 6e1a6ff3c8
Fixed failing pylint errors introduced in #13403 (#13429)
This fixes a failing pylint error introduced in #13403. This error
also trigger another pylint problem involved with c-extension
2021-01-02 11:32:42 +01:00
Adrián Matellanes f7a1334abe
Add 'mongo_collection' to template_fields in MongoToS3Operator (#13361) 2021-01-02 11:32:07 +01:00
Jarek Potiuk e436883583
Removes pip download when installing from local packages (#13422)
This PR improves building production image from local packages,
in preparation for moving provider requirements out of setup.cfg.

Previously `pip download` step was executed in the CI scripts
in order to download all the packages that were needed. However
this had two problems:

1) PIP download was executed outside of Dockerfile in CI scripts
   which means that any change to requirements there could not
   be executed in 'workflow_run' event - because main branch version
   of CI scripts is used there. We want to add extra requirements
   when installing airflow so in order to be able to change
   it, those requirements should be added in Dockerfile.
   This will be done in the follow-up #13409 PR.

2) Packages downloaded with PIP download have a "file" version
   rather than regular == version when you run pip freeze/check.
   This looks weird and while you can figure out the version
   from file name, when you `pip install` them, they look
   much more normal. The airflow package and provider package
   will still get the "file" form but this is ok because we are
   building those packages from sources and they are not yet
   available in PyPI.

Example:

  adal==1.2.5
  aiohttp==3.7.3
  alembic==1.4.3
  amqp==2.6.1
  apache-airflow @ file:///docker-context-files/apache_airflow-2.1.0.dev0-py3-none-any.whl
  apache-airflow-providers-amazon @ file:///docker-context-files/apache_airflow_providers_amazon-1.0.0-py3-none-any.whl
  apache-airflow-providers-celery @ file:///docker-context-files/apache_airflow_providers_celery-1.0.0-py3-none-any.whl
  ...

With this PR, we do not `pip download` all packages, but instead
we prepare airflow + providers packages as .whl files and
install them from there (all the dependencies are installed
from PyPI)
2021-01-02 11:16:51 +01:00
Kamil Breguła c674f81cb7
Add verbose flag to ./build_docs.py (#13403) 2021-01-02 02:17:14 +01:00
Jarek Potiuk ae625b4483
Change timeout s and disables reverse IP lookup for integrations (#13424)
Seems that we are hitting more often one of the most favourite
bugs by Ash: DNS. Quote: "It's always DNS".

It looks like there is a race condition with docker compose
that causes services that started fast enough (before DNS)
to get a different reverse-DNS IP lookup (usually it is
just `<SERVICE>` but sometimes it is
`<DOCKER_COMPOSE_APP>_<SERVICE>_1_<NETWORK>`).
This produces misleading messages in log that might
make analysis of such problems difficult, that's why
we chose to get rid of the reverse lookup and give
bigger time for each service to check if it is ready.

Netcat, unfortunately performs both forward and reverse
lookup when given a name - forward lookup to find the
IP address and reverse lookup to write information to the
log about the host it connected to - and if it sees
that the original and reverse-looked-up names do not match
even if it manages to connect, it retunrs an error:

`DNS fwd/rev mismatch` - which is very misleading.

This change performs the following:

1) We lookup the host name in python via gethostbyname
2) We set -n in netcat to disable ANY DNS use
3) We feed netcat with the IP address
4) We've standardized all waiting times to be up to 50 seconds

This way we should get rid of the DNS fwd/rev mismatch once
and for all.
2021-01-02 01:42:39 +01:00
Bijan Soltani 09a2413fe6
Improves documentation regarding providers and custom connections 2 (#13410) 2021-01-01 20:40:09 +01:00
Kamil Breguła 27c757d1ee
Fix environment checking for Apache Pinot (#13419) 2021-01-01 12:11:01 +01:00
Jarek Potiuk 43f150b7f8
Add last-commit example to static-check --help message. (#13411) 2021-01-01 17:48:38 +08:00
Kuba Tyszko abf34b8aba
Kuba openfaas sync call (#13356)
* adds invoke_function() - synchronous call in addition to existing asynchronous call

* adds invoke_function() - synchronous call in addition to existing asynchronous call

* airflow faas upgrade

* passing body consistently without json=body

* removing return() statement that must be causing static checks to fail

* removing return() statement that must be causing static checks to fail

* resolving static check issues

* resolving static check issues

* resolving static check issues

* resolving static check issues
2021-01-01 08:59:00 +01:00
Kamil Breguła 57143d6b79
Allow ./run_tmux.sh script to run standalone (#13420) 2021-01-01 07:39:12 +01:00
Vivek Bhojawala 181d8b66a9
Developers Quick Guide (#13417)
rebased and updated new tmux image as per new changes.
2021-01-01 06:08:59 +01:00
Kamil Breguła f6a3c822a3
Enable interpretation of backslash escapes for colored message (#13418) 2021-01-01 06:06:02 +01:00
Kuba Tyszko d202fd47fa
Adding documentation explaining "strange" URI required when using AWS… (#13355) 2020-12-31 21:23:42 +01:00
Jarek Potiuk 670056311a
Set minimum SQLite version supported. (#13412)
* Set minimum SQLite version supported.

Some users reported that some older versions of SQLite do not
work with Airflow 2.0. This happens for example with latest
sqlite available by default on RHEL7 (sqlite version available
in fully updated system there is 7 (!) years old)

Example of such issue: #13397.

Not sure which 'minimum' version is supported but
in the Breeze environment based on debian buster we have
3.27.2 version in fully updated system. This shoudl be our
baseline.

* Update README.md

Co-authored-by: Xiaodong DENG <xd.deng.r@gmail.com>

Co-authored-by: Xiaodong DENG <xd.deng.r@gmail.com>
2020-12-31 21:01:35 +01:00
Kamil Breguła 7e1d28b381
Warns politely, do not force run a long operation (#13313)
* Warns politely, do not force run a long operation
2020-12-31 18:08:43 +01:00
Kamil Breguła 9de7127083
Support google-cloud-bigquery-datatransfer>=3.0.0 (#13337) 2020-12-31 18:07:32 +01:00
William Tun d2964b0537
Add example DAG & how-to guide for sqlite (#13196) 2020-12-31 16:40:41 +00:00
Jarek Potiuk 07e751396c
Fixed broken aws test_batch_job tests introduced by #13396 (#13406) 2020-12-31 15:58:41 +01:00
dstandish 028d8e8efb
Remove reference to scheduler run_duration param in docs (#13346)
* links were old / dead
* run_duration was removed from scheduler
* clarify related notes on backward compat in helm chart values

Co-authored-by: Daniel Standish <dstandish@techstyle.com>
2020-12-31 13:50:51 +01:00
Kamil Breguła a1f4938ec5
Limit old versions of pinotdb to force update on CI (#13402) 2020-12-31 13:04:46 +01:00
Jarek Potiuk 85ac03f58c
Update persists-credentials (#13401)
Previous change to add persist-credentials #13389 wrongly added
persists-credentials to python-setup rather than checkout
action. Also one of the checkout actions used master rather than
v2 tag.
2020-12-31 12:01:02 +01:00
Derek Flionis bd74eb0ca0
Allow Tags on AWS Batch Job Submission (#13396)
Co-authored-by: Derek Flionis <dflionis@tenable.com>
2020-12-31 11:45:41 +01:00
I-Yang Chen cc9a19d2cd
Update celery.rst to fix broken links. (#13400) 2020-12-31 11:33:04 +01:00
Tuan Nguyen 406181d64a
Add Parquet data type to BaseSQLToGCSOperator (#13359) 2020-12-31 11:32:09 +01:00
dstandish 10be37513c
Simplify CeleryKubernetesExecutor tests (#13307)
* Simplify CeleryKubernetesExecutor tests

Co-authored-by: Daniel Standish <dstandish@techstyle.com>
2020-12-31 10:43:19 +01:00
Kamil Breguła dcedb813e4
Fix mallformed table in production-deployment.rst (#13395) 2020-12-31 02:00:00 +00:00
Bijan Soltani b52d39f047
Improves documentation regarding providers and custom connections (#13375)
Co-authored-by: Bijan <me+git@bijansoltani.com>
2020-12-30 18:26:08 +01:00
Jarek Potiuk d079b913d2
Disable persisting credentials in Github Action's checkout (#13389)
This PR disables persisting credentials in Github Actions checkout.

This is a result of discussion in builds@apache.org
https://lists.apache.org/thread.html/r435c45dfc28ec74e28314aa9db8a216a2b45ff7f27b15932035d3f65%40%3Cbuilds.apache.org%3E

It turns out that contrary to the documentation actios (specifically
checkout action) can use GITHUB_TOKEN without specifying it as
input in the yaml file and the GitHub checkout action
leaves the repository with credentials stored locally that
enable pushing to Github Repository by any step in the same
job. This was thought to be forbidden initially (and the
documentation clearly says that the action must have the
GITHUB_TOKEN passed to it in .yaml workflow in order to
use it). But apparently it behaves differently.

This leaves open an attack vector where for example
any PIP package installed in the following steps could push
any changes to GitHub Repository of Apache Airflow.

Security incidents have been reported to both GitHub and
Apache Security team, but in the meantime we add configuration
to remove credentials after checkout step.

https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow

> Using the GITHUB_TOKEN in a workflow

> To use the GITHUB_TOKEN secret, you *must* reference it in your workflow
  file. Using a token might include passing the token as an input to an
  action that requires it, or making authenticated GitHub API calls.
2020-12-30 14:25:29 +01:00
Kaxil Naik fe45f1bab5
Use 2.0.0 in Airflow docs & Breeze (#13379) 2020-12-30 13:24:21 +00:00
Kaxil Naik 8212247a8b
Bump version to 2.1.0dev0 (#13382) 2020-12-30 12:55:10 +00:00
Kaxil Naik 410ab8975a
Fix Apache Airflow icon link in Helm Chart (#13387)
Previous link (https://www.astronomer.io/static/airflowNewA.png) is broken.

This commit uses link from official docs too instead of Astronomer.
2020-12-30 13:38:53 +01:00
Kamil Breguła 98f097e542
Add integration tests for Apache Pinot (#13195)
* Add integration tests for Apache Pinot

* fixup! Add integration tests for Apache Pinot

* fixup! fixup! Add integration tests for Apache Pinot

* fixup! fixup! fixup! Add integration tests for Apache Pinot

* fixup! fixup! fixup! fixup! Add integration tests for Apache Pinot

* Update setup.cfg
2020-12-30 13:29:40 +01:00
Kaxil Naik 57cbcf6bbd
Fix broken link in PR Welcome message (#13386)
https://github.com/apache/airflow/blob/master/docs/howto/custom-operator.rst no longer exists

New link: https://github.com/apache/airflow/blob/master/docs/apache-airflow/howto/custom-operator.rst
2020-12-30 13:01:58 +01:00
Kaxil Naik 1b94346fbe
Bugfix: Sync Access Control defined in DAGs when running sync-perm (#13377)
fixes https://github.com/apache/airflow/issues/13376
2020-12-30 11:35:45 +00:00
Kaxil Naik d5cf993f81
Fix typo in Open API docs (#13374)
`releaase` -> `release`
2020-12-30 11:26:42 +01:00
Kaxil Naik a4a3d3f262
Minor enhancements to Sensors docs (#13381)
- Removed redundant comma
- Used list-table so that modifications are easy
- Added syntax highlighting for config code-block
2020-12-30 09:28:48 +01:00
Kaxil Naik 295d66f914
Fix Grammar in PIP warning (#13380)
`might leads to errors` -> `might lead to errors`
2020-12-30 09:05:19 +01:00
Kian Ghodoussi bafd258e66
Add Fleek Fashion to the list of Airflow users (#13372)
Add Fleek Fashion to INTHEWILD.md.
2020-12-29 22:40:53 +00:00
Jarek Potiuk 82fa048c12
Production image can also be upgraded to newer dependencies (#13345)
Previously UPGRADE_TO_LATEST_CONSTRAINTS variable controlled
whether the CI image uses latest dependencies rather than
fixed constraints. This PR brings it also to PROD image.

The name of the ARG is changed to UPGRADE_TO_NEWER_DEPENDENCIES
as this corresponds better with the intention.
2020-12-28 20:08:18 +01:00
Jarek Potiuk 0d214575a1
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
2020-12-28 19:10:27 +01:00
Jarek Potiuk d23ac9b235
Adds missing LDAP "extra" dependencies to ldap provider. (#13308)
It seems that for quite some time (1.10.4) the "ldap" extra
missed python-ldap dependency.

https://issues.apache.org/jira/browse/AIRFLOW-5261

Also LDAP seems to be popular enough to be added as default
extra in the production image.

Fixes #13306
2020-12-28 17:07:00 +01:00
Jarek Potiuk 13a9747bf1
Revert "Support google-cloud-tasks>=2.0.0 (#13334)" (#13341)
This reverts commit 1f712219fa.
2020-12-28 16:53:24 +01:00
Tomek Urbaszek 04ec45f045
Add DataprocCreateWorkflowTemplateOperator (#13338)
* Add DataprocCreateWorkflowTemplateOperator

* fixup! Add DataprocCreateWorkflowTemplateOperator

* fixup! fixup! Add DataprocCreateWorkflowTemplateOperator
2020-12-28 16:49:59 +01:00
Jarek Potiuk f7d354df1c
Print better error message when tests fail (#13339)
The recently added log groupping hides error messages in case
there is an error in tests. You need to manually unfold last test
step which is somewhate hidden - it is followed by several
'dump-container' logs.

This change adds clear error message showing the exact log
group that you need to unfold in case you want to look for
a problem.
2020-12-28 16:05:35 +01:00
Jarek Potiuk 3b4290d055
Re-enables verification of production image (#13329)
The PROD image is now verified by several checks:

* whether all expected providers are installed
* whether pip-check shows no conflicts
* whether imports are working for expected features

Part of #13315
2020-12-28 14:02:55 +01:00
Kamil Breguła e35bdb94b2
json-merge-patch becomes optional library and has looser restrictions (#13175) 2020-12-28 11:42:11 +01:00
Kamil Breguła 1f712219fa
Support google-cloud-tasks>=2.0.0 (#13334) 2020-12-28 11:29:28 +01:00
Jarek Potiuk 09c6549200
Add missing sqlite provider for production image (#13332)
The production image was missing sqlite provider (this fails
pip check)
2020-12-28 08:58:51 +01:00
André Amaral 4be27af04d
Fix the behavior for deactivate the authentication option and documenting the process to do it (#13191) 2020-12-28 07:37:26 +01:00
dstandish 641f63c2c4
Prefer newer CLI syntax over legacy in helm chart (#13330)
* saves approx 1 second and an error message when using >= 1.10.14

Co-authored-by: Daniel Standish <dstandish@techstyle.com>
2020-12-28 00:54:02 +01:00