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

7558 Коммитов

Автор SHA1 Сообщение Дата
Tomek 465c1f879d [AIRFLOW-XXX] Fix DebugExecutor docs (#6830) 2019-12-16 22:45:01 +00:00
TobKed 11262c6d42 [AIRLFOW-6240] BigQuery - remove unnecessary mocks in hook system tests (#6805) 2019-12-16 17:47:17 +01:00
Nikolay fd124a54b9 [AIRFLOW-6246] Add support None in mysql_to_gcs (#6808) 2019-12-16 16:58:31 +01:00
yuqian90 1006740aa9 [AIRFLOW-6250] Ensure on_failure_callback always has a populate context (#6812)
on_failure_callback almost always want to know the dag_id and taskinstance that failed. These info are in the context passed to on_failure_callback, which is passed in from handle_failure(). However, in some rare scenarios, if handle_failure is called in scheduler_job.py and backfill_job.py, the only argument passed is the error message. context is left as None.

So in these cases, on_failure_callback will not even know what's the dag_id of the dag that just failed.

This PR fixes this by setting context to get_template_context() if it's not given.
2019-12-16 09:55:51 +00:00
dependabot[bot] 8107651f8f [AIRFLOW-XXX] Bump npm from 6.4.1 to 6.13.4 in /airflow/www (#6815)
Bumps [npm](https://github.com/npm/cli) from 6.4.1 to 6.13.4.
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/v6.4.1...v6.13.4)

Signed-off-by: dependabot[bot] <support@github.com>
2019-12-14 17:25:41 +00:00
Jarek Potiuk cfa773828c
[AIRFLOW-6226] Always reset warnings in tests (#6785) 2019-12-14 10:36:06 +01:00
dstandish c6425a4be9 [AIRFLOW-6254] obscure conn extra in logs (#6817) 2019-12-14 10:28:49 +01:00
zuku1985 27785f47ba [AIRFLOW-4824] Add charset handling for SqlAlchemy engine for MySqlHook (#6816)
Airflow should handle various charsets for connections with MySQL dbs.
This change allows to set charset in extra field of a connection when
using SqlAlchemy engine.
2019-12-14 08:57:02 +01:00
zuku1985 0cf9598b08 [AIRFLOW-6091] Add flushing in execute method for BigQueryCursor (#6683)
If you execute multiple queries results of old ones will be
flushed allowing to read results of recent execute without
any issues.
2019-12-14 07:53:19 +01:00
Kaxil Naik 5b461d626a [AIRFLOW-6247] Fix sort order in Alembic Migration template (#6809)
* [AIRFLOW-6247] Fix sort order in Alembic Migration template
2019-12-14 05:40:37 +01:00
Yingbo Wang b1c4e36eb0 [AIRFLOW-6243]Optimize NamedHivePartitionSensor poke (#6810) 2019-12-13 15:32:05 -08:00
Kaxil Naik b5d0b9d306 [AIRFLOW-XXX] Bump Jira version to fix issue with async (#6813) 2019-12-13 23:17:49 +01:00
Bjorn Olsen 55f4a07456 [AIRFLOW-6170] BranchPythonOperator does not do XCom push of returned value (#6726)
* [AIRFLOW-6170] BranchPythonOperator XCom push
2019-12-13 23:16:42 +01:00
Robert Young 5483ae4992 [AIRFLOW-5463] Use same session to delete and add variable in set (#6807)
Why:
* In our system we had a postgres connection error during Variable.set
resulting in the variable being deleted. The intention of this change is
that an error should leave the variable unchanged.
2019-12-13 14:35:21 +00:00
Daniel Huang 0426e30a71 [AIRFLOW-1076] Add get method for template variable accessor (#6793)
Support getting variables in templates by string. This is necessary when
fetching variables with characters not allowed in a class attribute
name. We can then also support returning default values when a variable does
not exist.
2019-12-13 14:26:06 +00:00
Rich Dean 4a21b62161 [AIRFLOW-5959][AIP-21] Move contrib/*/jira to providers (#6661) 2019-12-13 14:47:56 +01:00
TobKed 070026b9d7 [AIRFLOW-6220] Remove redundant BigQuery hook tests (#6776) 2019-12-13 13:52:01 +01:00
mislo add3b5cec0 [AIRFLOW-6122] Rename CloudKMS service classes (#6798) 2019-12-13 12:01:37 +01:00
Robin Edwards bdcd7cd9d4 [AIRFLOW-6239] Filter dags return by last_dagruns (#6804)
Add dag_ids get parameter to last_dagruns endpoint so can filter by the
set of dag_ids present on the dags view. This is intended to speed up
the response time on systems running a large number of dags.
2019-12-13 10:23:23 +00:00
Robin Edwards 1b61282215 [AIRFLOW-6238] Filter dags returned by dag_stats (#6803)
Add dag_ids parameter to the dag_stats end point and only request the
dags on the current page. This is intended to speed up the response
times for systems running a large number of DAGS.
2019-12-13 09:33:46 +00:00
Daniel Gorelik 69ef1c68c2 [AIRFLOW-XXX] Change instances "Google cloud storage" to "Google Cloud Storage". (#6359)
GCS should be formatted as "Google Cloud Storage", so change instances "Google cloud storage" to "Google Cloud Storage".
2019-12-13 01:26:58 +01:00
pradeepbhadani c43a5ec878 [AIRFLOW-6241] Fix typo in airflow/gcp/operator/dataflow.py (#6806) 2019-12-13 00:11:21 +00:00
Tomek fe2334fb0a [AIRFLOW-6181] Add InProcessExecutor (#6740)
Adds new executor that is meant to be used mainly
for debugging and DAG development purposes. This
executor executes single task instance at time and
is able to work with SQLLite and sensors.
2019-12-12 22:44:36 +01:00
Andrey Klochkov 702005fe35 [AIRFLOW-6171] Apply .airflowignore to correct subdirectories (#6784)
Fix the defect that applied .airflowignore rules from one subdirectory
to all other subdirectories scanned later.
2019-12-12 18:01:49 +00:00
Joseph McCartin 699aea8ee3 [AIRFLOW-5744] Environment variables not correctly set in Spark submit operator (#6796) 2019-12-12 09:16:35 -08:00
Aditya Vishwakarma 0f9983f472 [AIRFLOW-5660] Attempt to find the task in DB from Kubernetes pod labels (#6340)
Try to find the task in DB before regressing to searching every task, 
and explicitly warn about the performance regressions.

Co-Authored-By: Ash Berlin-Taylor <ash_github@firemirror.com>
2019-12-12 15:56:38 +00:00
pradeepbhadani ebeaef34ba [AIRFLOW-XXX] Add link to XCom section in concepts.rst (#6791)
Add link to XCom section in concepts.rst
2019-12-12 15:13:48 +01:00
Darren Weber 479ee63921 [AIRFLOW-5889] Make polling for AWS Batch job status more resillient (#6765)
- errors in polling for job status should not fail
  the airflow task when the polling hits an API throttle
  limit; polling should detect those cases and retry a
  few times to get the job status, only failing the task
  when the job description cannot be retrieved
- added typing for the BatchProtocol method return
  types, based on the botocore.client.Batch types
- applied trivial format consistency using black, i.e.
  $ black -t py36 -l 96 {files}
2019-12-12 11:30:43 +00:00
kaverisharma09 6882d355b9 [AIRFLOW-XXX] Add task lifecycle diagram to documentation (#6762) 2019-12-12 10:07:18 +01:00
mislo 1a58880626 [AIRFLOW-6121][API-21] Rename Cloud Build service class (#6771) 2019-12-12 09:34:23 +01:00
Alexandre Yang 0863d41254 [AIRFLOW-6084] Add info endpoint to experimental api (#6651) 2019-12-11 15:59:10 -08:00
Tomek 3bf5195e9e [AIRFLOW-6230] Improve mocking in GCP tests (#6789) 2019-12-11 17:53:00 +01:00
Ash Berlin-Taylor 999d704d64 [AIRFLOW-XXX] Update airflow-jira release management script (#6772) 2019-12-11 14:37:28 +00:00
Bjorn Olsen d4a8afb5ae [AIRFLOW-6195] Fixed TaskInstance attrs not correct on UI (#6758) 2019-12-11 10:25:18 +00:00
dstandish 53422a8b7a [AIRFLOW-5751] add get_uri method to Connection (#6426)
Add a convenience method `get_uri` on `Connection` object to generate the URI for a connection.
2019-12-11 09:45:01 +00:00
Avetisyan Sevak 58dfc7c6c0 [AIRFLOW-XXX] Add template_ext to custom operator example (#6787)
Update Custom Operator -> Templating section, add template_ext field to HelloOperator example.
2019-12-11 09:33:10 +01:00
Ryan Yuan 4cbb055c41 [AIRFLOW-5685] Loading AVRO file from GCS to BQ throwing ValueError (#6355)
[AIRFLOW-5685] Loading AVRO file from GCS to BQ throwing ValueError
2019-12-11 09:13:18 +01:00
Kamil Breguła 53aa9753c1 [AIRFLOW-6209] Drop gcp_service_account_keys option (#6768)
* [AIRFLOW-6209] Drop gcp_service_account_keys option

* fixup! [AIRFLOW-6209] Drop gcp_service_account_keys option
2019-12-10 14:05:37 -08:00
Darren Weber 0f21e9b5a7 [AIRFLOW-6211] Use conda for local virtualenv (#6766) 2019-12-10 22:35:19 +01:00
Sergio Kef 2784372a26 Update kubernetes doc with correct path (#6774) 2019-12-10 22:33:38 +01:00
benjamingrenier d3d37a5103 [AIRFLOW-XXXX] Birdz by Veolia added to users (#6781) 2019-12-10 21:45:22 +01:00
Ash Berlin-Taylor d9f7136432
Revert "[AIRFLOW-3014] Increase max length of connection password column to 5000 (#6241)" (#6783)
This reverts commit da7a353e17.

This was already fixed by by #6754 which was already merged, and we ended up with
two migration files (trying) to do the same thing.
2019-12-10 20:44:32 +00:00
Fokko Driesprong 59d45c9018 [AIRFLOW-XXX] Fix the trailing whitespace 2019-12-10 20:18:23 +01:00
pradeepbhadani df1206a476 [AIRFLOW-XXX] Fix typos in gcp_authenticator.py (#6775) 2019-12-10 18:04:53 +01:00
Tim Paine d90ddbd189 [AIRFLOW-6168] Allow proxy_fix middleware of webserver to be configurable (#6723) 2019-12-10 14:03:14 +00:00
Aviem Zur e37066086f [AIRFLOW-6056] Allow EmrAddStepsOperator to accept job_flow_name as alternative to job_flow_id (#6655) 2019-12-10 13:49:38 +00:00
Jarek Potiuk 239d51ed31
[AIRFLOW-6216] Allow pytests to be run without "tests" (#6770)
With this change you should be able to simply run `pytest` to run all the tests in the main airflow directory.

This consist of two changes:

* moving pytest.ini to the main airflow directory
* skipping collecting kubernetes tests when ENV != kubernetes
2019-12-10 14:49:00 +01:00
Kim Persson da7a353e17 [AIRFLOW-3014] Increase max length of connection password column to 5000 (#6241) 2019-12-10 13:31:18 +00:00
Tomek e17b2cc63b [AIRFLOW-6183] Fix flaky GCS hook gzip test (#6739)
* [AIRFLOW-6183] Fix flaky GCS hook gzip test
2019-12-10 12:57:37 +01:00
Daniel Imberman f3bb4c31b8 [AIRFLOW-6175] Fixes bug when tasks get stuck in "scheduled" state (#6732)
There is a bug caused by scheduler_jobs refactor which leads to task failure
and scheduler locking.

Essentially when a there is an overflow of tasks going into the scheduler, the
tasks are set back to scheduled, but are not removed from the executor's
queued_tasks queue.

This means that the executor will attempt to run tasks that are in the scheduled
state, but those tasks will fail dependency checks. Eventually the queue is
filled with scheduled tasks, and the scheduler can no longer run.

Co-Authored-By: Kaxil Naik <kaxilnaik@gmail.com>, Kevin Yang <kevin.yang@airbnb.com>
2019-12-10 11:17:30 +00:00