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

10400 Коммитов

Автор SHA1 Сообщение Дата
Gerard Casas Saez 84dc2fbd2e
Set doc_md when using task decorator and function has __doc__ (#11598) 2020-10-17 01:09:01 +01:00
Daniel Imberman 00dd7586fb
Raises a warning for provide_context instead of killing the task (#11597)
* raises a warning for provide_context instead of killing the task

* Update airflow/operators/python.py

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>

* static checks

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
2020-10-16 15:18:55 -07:00
Ryan Hamilton 4582c808ab
UX Enhancement: Add button to clear search query from DAG search (#11583) 2020-10-16 22:56:52 +01:00
Kaxil Naik be72817a2e
Allow loading plugins on Airflow start-up (#11596)
0be7654fd2 commit made an optimization where the plugin are lazy-loaded. However, there are use-cases where you would still want the plugins to be loaded on Airflow start-up.
2020-10-16 22:56:39 +01:00
Ash Berlin-Taylor 0c5bbe83c6
Replace methods on state with frozenset properties (#11576)
Although these lists are short, there's no need to re-create them each
time, and also no need for them to be a method.

I have made them lowercase (`finished`, `running`) instead of uppercase
(`FINISHED`, `RUNNING`) to distinguish them from the actual states.
2020-10-16 21:09:36 +01:00
Sumit Maheshwari 44031bf72b
Fix broken migration for Sqlite3 (#11573) 2020-10-17 01:01:33 +05:30
Martijn Pieters 4d611f2ffd
Clean up _trigger_dag function (#11584)
- The dag_run argument is only there for test mocks, and only to access a static method. Removing this simplifies the function, reduces confusion.
- Give optional arguments a default value, reduce indentation of arg list to PEP / Black standard.
- Clean up tests for readability
2020-10-16 20:22:40 +01:00
Ryan Hamilton 84c70287ee
Fix tooltip typo (#11593) 2020-10-16 19:17:17 +01:00
Michał Misiewicz 91484b938f
Pass SQLAlchemy engine options to FAB based UI (#11395)
Co-authored-by: Tomek Urbaszek <turbaszek@gmail.com>
2020-10-16 19:55:41 +02:00
Katsunori Kanda 0823d46a7f
Add type annotations for AWS operators and hooks (#11434)
Co-authored-by: Tomek Urbaszek <turbaszek@gmail.com>
2020-10-16 19:54:08 +02:00
Kamil Breguła 3c10ca6504
Add DataflowStartFlexTemplateOperator (#8550) 2020-10-16 18:28:23 +02:00
Ryan Hamilton 45d608396d
Utilize the state foreground color to ensure an accessible contrast ratio (#11579) 2020-10-16 16:31:32 +01:00
Martijn Pieters 3163016450
Guard against kubernetes not being installed (#11558)
If the `kubernetes.client` import fails, then `airflow.kubernetes.pod_generator` also can't be imported, and there won't be attributes on `k8s` to use in `isinstance()` calls.

Instead of setting `k8s` to `None`, use an explicit flag so later code can disable kubernetes-specific branches explicitly.

Also, when de-serializing a Kubernetes pod with no kubernetes library installed is an error.
2020-10-16 16:23:20 +01:00
Jarek Potiuk 6f0bc0d81f
Fixes dependencies to pre-release versions of apache-airflow (#11578)
The dependencies in Alphas are currently >= 2.0.0 and should be
>=2.0.0a0 in order to work with Alphas in cases which are not PEP
440-compliant.

According to https://www.python.org/dev/peps/pep-0440/, >= 2.0.0 should
also work with alpha/beta releases (a1/a2) but in some cases it does not
(https://apache-airflow.slack.com/archives/C0146STM600/p1602774750041800)

Changing to ">=2.0.0a0" should help.

Fixes #11577
2020-10-16 16:29:14 +02:00
Satyasheel 8865d14df4
Strict type checking for provider google cloud (#11548) 2020-10-16 15:06:58 +01:00
Masato Ohba df756105b8
Fix broken backtick usage in Timezone docs (#11575) 2020-10-16 15:03:52 +01:00
Ryan Hamilton 399b81d3af
Prevent pop-over elements from being cut off by hidden overflow (#11574) 2020-10-16 15:02:07 +01:00
Michal Niemiec 3cddc11821
Updated template_fields_rendereds for PostgresOperator and SimpleHttpOperator (#11555)
Co-authored-by: Michal Niemiec/IT/CREDITSAFE <Michal.Niemiec@creditsafe.com>
2020-10-16 13:12:06 +02:00
Jarek Potiuk 6733f2d7b9
The scripts fixing ownership and cleaning tmp use docker run (#11569)
The scripts were using docker compose, but they
can be docker run commands. Also they are not needed to be
run by breeze directly in CI image because I've added traps
to run the commands at the exit of all "in_container" scripts.
2020-10-16 10:50:59 +02:00
Felix Uellendall 5d4fbcebe7
Clarify breeze docs --install-airflow-version/-reference (#11570)
* Clarify breeze docs --install-airflow-version/-reference

* Add to automated bash scripts
2020-10-16 10:50:17 +02:00
Ryan Hamilton 8372ab1375
Add/implement Webpack plugin to minify CSS files on-compile (#11564) 2020-10-16 08:59:09 +01:00
James Timmins 7ab62100af
Prepend `DAG:` to dag permissions (#11189)
This adds the prefix DAG: to newly created dag permissions. It supports checking permissions on both prefixed and un-prefixed DAG permission names.

This will make it easier to identify permissions that related to granular dag access.

This PR does not modify existing dag permission names to use the new prefixed naming scheme. That will come in a separate PR.

Related to issue #10469
2020-10-16 00:32:38 +01:00
Ryan Hamilton 89d4dd8802
Auto-refresh default state (#11559) 2020-10-15 23:36:36 +01:00
Daniel Imberman f7e01ab293
Create job for airflow migrations (#11533)
Creating airflow migrations should run seperately from the user creation
job, as many users might not want to create users on deployment.
2020-10-15 11:10:14 -07:00
Ryan Hamilton 81a5b03635
Visual tweaking of TI swatches, legend refactoring (#11550)
Co-authored-by: James Timmins <james@astronomer.io>
2020-10-15 18:45:22 +01:00
Daniel Imberman eee4e30f2c
Add better debug logging to K8sexec and K8sPodOp (#11502) 2020-10-15 15:38:47 +01:00
Ryan Hamilton 13959df540
Feature: Auto-refresh Graph view chart (#11534) 2020-10-15 14:46:20 +01:00
Jarek Potiuk e7dc964619
Adds capability of installing wheel packages in CI image (#11527)
The production image had the capability of installing images from
wheels (for security teams/air-gaped systems). This capability
might also be useful when building CI image espeically when
we are installing separately core and providers packages and
we do not yet have provider packages available in PyPI.

This is an intermediate step to implement #11490
2020-10-15 15:19:18 +02:00
Ash Berlin-Taylor 1ddeddc582
Rename (confusing) dag.sub_dag to dag.partial_subset (#11542)
There was a method on the DAG class called `sub_dag()` that had nothing
to do with Sub-DAGs or the SubDagOperator - It instead created a new
"partial" dag that contained only a selected subset of tasks.

To remove this confusion when seeing `dag.sub_dag()` used in code I have
renamed this function, and included a compat shim in case anyone is
using it outside of Airflow core.
2020-10-15 14:04:40 +01:00
Kaashif Khawaja 03a632e0ad
Resolve MSSQL DAG serialization bug by changing datatype for execution date (#11512)
Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
2020-10-15 13:33:30 +01:00
Jarek Potiuk 3447b55ba5
More stable kubernetes port forwarding (#11538)
Seems that port forwarding during kubernetes tests started to behave
erratically - seems that kubectl port forward sometimes might hang
indefinitely rather than connect or fail.
We change the strategy a bit to try to allocate
increasing port numbers in case something like that happens.
2020-10-15 11:05:58 +02:00
Ash Berlin-Taylor 765d29ecc9
Pymssql is maintained again (#11537)
See 20457589b2
2020-10-15 07:05:16 +01:00
Ash Berlin-Taylor c099e0a2b5
Fix documentation errors (#11536)
In trialing an upgrade of sphinx-autoapi to 1.5.1 (it has other
problem with metaclasses right now, so we cant use it just yet) I
noticed these cases of warnings that would become errors if we upgraded.
2020-10-15 07:04:40 +01:00
Daniel Imberman 7b7cc3c391
backport for add_xcom_sidecar (#11478)
* backport for add_xcom_sidecar

* activate function

* add k8s filter

* nit

* fix to work
2020-10-14 12:49:44 -07:00
Songkran Nethan 0646849e3d
Add protocol_version to conn_config for Cassandrahook (#11036) 2020-10-14 21:30:30 +02:00
Ash Berlin-Taylor 545ba8ec37
Upgrade to pymssql 2.1.5 for Py 3.8 support (#11523) 2020-10-14 15:43:51 +01:00
Kaxil Naik 3163912293
Remove flask-admin based Plugins (#11515) 2020-10-14 15:35:36 +01:00
Kaxil Naik 2509d13096
Minor improvements to dev/README.md (#11525) 2020-10-14 15:23:33 +01:00
kukigai 6c8cf6aebe
Add reset_dag_run option on dagrun_operator to clear existing dag run (#11484)
* Add reset_dag_run option on dagrun_operator so that user can clear target dag run if exists.

* Logging coding style changes.

* Make pylint check pass.

* Make pylint check pass.

* Make pylint check pass on unit test file.

* Make static check pass.

* Use settings.STORE_SERIALIZED_DAGS

Co-authored-by: Kaz Ukigai <kukigai@apple.com>
2020-10-14 14:15:42 +02:00
Jarek Potiuk bcf0557827
Fixes remaining test-type strategy problems (#11522)
The test-type strategy matrix were not deleted entirely when combined
back tests in #11504
2020-10-14 11:36:45 +02:00
Kaxil Naik d963467dde
Fix example in UPDATING.md (#11518)
`my_plguin.MyCustomExecutor` -> `my_plugin.MyCustomExecutor` as we mention in the sentence above that "plugin was
called `my_plugin` "
2020-10-14 08:24:56 +02:00
Kaxil Naik e9f7bdd25f
Fix typo in scripts/ci/libraries/_initialization.sh (#11517)
`initialized` -> `initialize`
2020-10-14 08:24:32 +02:00
Jarek Potiuk 4297abab26
Combine back multiple test types into single jobs (#11504)
Seems that by splitting the tests into many small jobs has a bad
effect - since we only have queue size = 180 for the whole Apache
organisation, we are competing with other projects for the jobs
and with the jobs being so short we got starved much more than if
we had long jobs. Therefore we are re-combining the test types into
single jobs per Python version/Database version and run all the
tests sequentially on those machines.
2020-10-13 20:51:08 +02:00
Vikram Koka 4551a5e6d5
Updated tutorial_decorated_flows.rst to add links (#11510)
Added links to the Decorated Flows AIP and to the Decorated Flows section of the Concepts doc.
2020-10-13 19:10:20 +01:00
Kaxil Naik c6048918bc
Change Airflow version to 2.0.0a1 in Updating.md (#11508) 2020-10-13 17:08:12 +01:00
Jarek Potiuk bf9ece79cb
Update CONTRIBUTING.rst (#11461)
Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
2020-10-13 18:07:30 +02:00
Kaxil Naik 56b761bac5
Bump to Airflow 2.0.0a1 (#11507) 2020-10-13 17:00:59 +01:00
Vikram Koka 095756c6e8
Airflow tutorial to use Decorated Flows (#11308)
Created a new Airflow tutorial to use Decorated Flows (a.k.a. functional
DAGs). Also created a DAG to perform the same operations without using
functional DAGs to be compatible with Airflow 1.10.x and to show the
difference.

* Apply suggestions from code review

It makes sense to simplify the return variables being passed around without needlessly converting to JSON and then reconverting back.

* Update tutorial_functional_etl_dag.py

Fixed data passing between tasks to be more natural without converting to JSON and converting back to variables.

* Updated dag options and task doc formating

Based on feedback on the PR, updated the DAG options (including schedule) and the fixed the task documentation to avoid indentation.

* Added documentation file for functional dag tutorial

Added the tutorial documentation to the docs directory. Fixed linting errors in the example dags.
Tweaked some doc references in the example dags for inclusion into the tutorial documentation.
Added the example dags to example tests.

* Removed multiple_outputs from task defn

Had a multiple_outputs=True defined in the Extract task defn, which was unnecessary. - Removed based on feedback.

Co-authored-by: Gerard Casas Saez <casassg@users.noreply.github.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
2020-10-13 16:59:20 +01:00
Jarek Potiuk 16e7129719
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
2020-10-13 16:33:00 +01:00
Kaxil Naik 42b979d217
Fix spelling for Airbnb (#11505) 2020-10-13 16:31:50 +01:00