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

9012 Коммитов

Автор SHA1 Сообщение Дата
Kamil Breguła 2b45d8f0cb
Move TestDagFileProcessorQueriesCount to quarantine (#9119) 2020-06-03 16:23:01 +02:00
James Timmins 10796cb7ce
Remove Hive/Hadoop/Java dependency from unit tests (#9029) 2020-06-03 12:49:27 +01:00
Tomek Urbaszek 11d726dcf1
Add query count test for SchedulerJob (#9088)
* Add query count test for SchedulerJob

* fixup! Add query count test for SchedulerJob
2020-06-03 10:02:02 +02:00
Kaxil Naik 5f038d08bc
Add filepaths for API label in BoringCyborg Bot (#9116) 2020-06-02 20:17:00 +01:00
Kamil Breguła 67379d1d9e
Add fudament for API based on connexion (#8149) 2020-06-02 18:45:37 +02:00
Sebastian Werner 17adcea835
Fix handling of subprocess error handling in s3_file_transform and gcs (#9106)
As outlined in Issue 9104 the python subprocess return code can be less than 0.
The previous version only captures errors of the subprocess itself, not the negative error codes, as cause by host SIGKILL, SIGHUP, ... see https://docs.python.org/3/library/subprocess.html#subprocess.
CompletedProcess.returncode

We now treat all non-zero returncodes as a script failure.
2020-06-02 17:57:59 +02:00
Ash Berlin-Taylor 9e0ccdea20
Produce less verbose output when building docker mount options (#9103)
The previous method of generating this list had two "problems"/niggles
that this PR solves, when running with VERBOSE=true

- Firstly, LOCAL_MOUNTS was set at the top level, so running with
  `set -x` produced 30 extra lines of output.
- Because of the `while read` used, it created 4 or 5 lines _per_ mount,
  resulting in a lot verbose output.

Nothing I've changed here is "critical", it's just making it a bit
easier to see with the debug output what is going on, by running fewer
commands.

I have also expanded the BATS test a little bit to check each pair (`-v`
and its following option)
2020-06-02 14:53:43 +01:00
Kamil Breguła 87a4a0adff
Allow using Airflow with Flask CLI (#9030) 2020-06-02 12:00:17 +02:00
Jarek Potiuk a6216a760c
You can push with Breeze as separate command and to cache (#8976)
Breeze had --push-images switch to also push images to repo
but it was often needed to build and push images separately.

We have now a possibility to push an already built image with
separate push-image command instead and also you can choose
to push to cache registry in GitHub rather than to DockerHub
with --registry-cache switch.
2020-06-02 10:24:47 +02:00
Jarek Potiuk b7b48463b1
Updated missing parameters for docker image building (#9039) 2020-06-02 09:27:09 +02:00
Ash Berlin-Taylor 3dd81b7af1
Don't reuse MY_DIR in breeze to mean different folder from ci/_utils.sh (#9098)
scripts/ci/*.sh uses MY_DIR to mean scripts/ci, but in `breeze` MY_DIR
is the same as AIRFLOW_SOURCES. When jumping back-and-forth between
ci/_utils.sh, breeze, and ci/ci_*.sh it can be confusing to keep track
of what is what.

This changes `breeze` to use `AIRFLOW_SOURCES` to referrer to the top
level folder instead -- that means I don't have to keep as much context
in my head
2020-06-02 08:39:42 +02:00
mgorsk1 93e924d3fa
Enable configurable git sync depth (#9094)
Enable configurable git sync depth
2020-06-02 08:36:03 +02:00
Kamil Breguła 20f898288a
Add OpenAPI specification (II) (#8721)
* Add OpenAPI spec (#7549)

* Fix typo in name of pre-commit hook

* Chaange type for DAGID, DAGRunID, TaskID

* Fix typo in summary - POST /pools

* Fix typo in description - FileToken parameter

* Fix typo - singular/plural form - variables

* Make EventLog endpoints read-only

* Use ExcutionDate in DagRuns endpoints

* Use custom action to control task instances

* Typo in  DELETE Task instance

* Remove unused schema - DagStructureCollection

* Fix typo - singular/plural form - import errors

* Add endpoint - POST /dagRuns

* Remove job_id

We do not have endpoints to download jobs, because this is an implementation detail, so this field has big no value.

* Add filters to GET /taskInstances

* Fix typo - upadtePool => updatePool

* Rename "Create a DAG Run" to "Trigger a DAG Run"

* Use Pool name as a parameter

* Add filter to GET /dagRuns

* Remove invalid note ion start_date field

* Uss POST instead of PATCH for custom action

* Remove DELETE /taskInstances endpooint

* Rename Xcom Value to xcom Entry

* Fix typo in XCCOM Entry endpoint

* Change operationID: patchConnection => updaateConnection

* Make execution_date optionall in DAGRun

This field can be filled with the current date when creating the DAG Run

* Unify connection ID

* Use URL with HTTPS and without www.

* Fix typo - at database => in database

* Fix typo = Raange -> Raange

* Fix typo - the specific DAG => a DAG

* Fix typo - getXComVEntry => getXComVEntry

* Unify collection names - xcomEntries

* Move TaskInstance resource under DagRun resource

* Fix typo - change tag - TaskInstance => TaskInstance

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

* Use path paramaters for /variables/lookup/ endpoint

* Use consistent names for IDs

* Use new style for filter parameters

* Remove unused path parameter

* Use ~ as a wildcard charaacter

* Add batch endpoints for TaskInstance and DagRuns

* Fix typo - response in trigger dag endpoint

* Fix typo - Qqueue => Queue

* Set dry_run = True in ClearTaskInstance

* Mark all fieldss (expcet state) of DagRun as read-only

* Use __type as a discriminator

* Fix typo - "The Import Error ID." => "The Event Log ID."

* Fix typo - Self referential in EventLogCollection

* Rename fieldss - dttm => when

* remove fields - pool_id

* Fix typo - change request body in PATCH /pools/{pool_name}

* Use DAG Run ID as a primary identifier

* Fix typo - Change type of query to string

* Unify fields names in collections

* Use variable key as a primary id

* Move collection to /variables

* Mark passord as a write only

* Fix typo - updaateConnection => updateConnection

* Change is_paused/is_subdag to boolean

* Fix typo - clearTaskInstaance => clearTaskInstance

* Fix typo - DAAG => DAG

* Fix typo - many => multiple

* Fix typo - missing "a"

* Fix typo - variable by id => variable by key

* Fix typo - updateXComEntries => updateXComEntry

* Fix typo - missing "a"

* Use dag_run_id as a primary ID

* Fix typo - objectss => objects, DAG IDS => DAG IDs

* Allows create DAG Run with custom conf/execution_date/dag_run_id

* Add new trigger rule, fix typo in dag run state

* Add request body to POST/PATCH /dags/{dag_id}

* Rename collection fields - dag_model => dags

* Fix typo - /clearTaskInstanaces -> /clearTaskInstances

* Improve wording - wildcard

* Returns owners as a array

* Return only references in clear task instances

* Remove support for application/x-www-form-urlencoded

* fixup! Use __type as a discriminator

* Add file_token fields

* Move description of variable collections

* Return SUB DAG in DAG structure

* Fix typo - sucess => sucess, Apache Foundation => Apache Software Foundation, Airfow => Apache Airflow

* Improve description of get logs endpoint

* Fix typo - Get all XCom entry => Get all XCom entries

* Add crossreference between /dags/{dag_id}/structure and /dags/{dag_id}

* Remove all form-urllencoded request bodies

* Rename parameter - NoChunking => FullContent

* Improve description of batch endpoints

* Remove request body for GET endpoint

* Use allOf insteaad of oneOf

* Rename key => xcom_key

* Use lowercase letters in query string parameter - Queue -> queue

* Change type of conf to object

* Change allOf into oneOf for ScheduleInterval

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
2020-06-01 21:46:15 +02:00
samuelkhtu 55b9b8f645
#8525 Add SQL Branch Operator (#8942)
* Add SQL Branch Operator

SQL Branch Operator allow user to execute a SQL query in any supported backend to decide which
branch to follow. The SQL branch operator expect query to return True/False (Boolean) or
0/1 (Integer) or true/y/yes/1/on/false/n/no/0/off (String).
2020-06-01 20:14:13 +02:00
Tomek Urbaszek 7898525468
Add BigQueryInsertJobOperator (#8868)
* Add BigQueryInsertJobOperator

* fixup! Add BigQueryInsertJobOperator

* fixup! fixup! Add BigQueryInsertJobOperator

* fixup! fixup! fixup! Add BigQueryInsertJobOperator
2020-06-01 11:54:38 +02:00
Kamil Breguła 7c0e6ede60
Don't create empty modules for plugins (#9078) 2020-06-01 09:52:24 +02:00
Kamil Breguła c970053254
Improve TestCliConfig in local environment (#9085) 2020-06-01 09:51:59 +02:00
Ephraim Anierobi a92eb8475a
Shorten command help and move long help to command description (#9070)
* add description to subcommands and move them to respective subcommands

* move some command help to description

* add default description

* improve text

* move some help text to description

* improve code
2020-06-01 09:38:11 +02:00
Damian a85d228c72
Update Breeze Documentation to have WSL 2 Instructions instead of WSL 1 (#9057) 2020-06-01 09:04:31 +02:00
Mauricio De Diana c002b25e37
Add displaying multiple dates in airflow next_execution command (#9072)
The "next_execution" cli sub-command now accepts an optional number of
executions to be returned. This is particularly useful for checking
non-regular schedule intervals, such as those created by some cron
expressions.

Co-authored-by: Kamil Breguła <mik-laj@users.noreply.github.com>
2020-05-31 21:31:58 +02:00
Kamil Breguła 93b8f3e48d
Test queries when number of active DAG Run is not zero (#9082) 2020-05-31 19:39:22 +02:00
Joppe Vos 29eb68b90b
Create guide for Dataproc Operators (#9037)
* added documentation for dataproc

* added more update information for updateMask

* Added link to information about cluster config api request

* Apply naming convention

* Set all dedents from 4 to 0

* Adjust dedent to 4, for operators

* removed dataproc guide from test_missing_guides
2020-05-31 15:29:09 +02:00
Ace Haidrey a3fc8be34e
Add metric for job start/end task run (#8680)
Co-authored-by: Ace Haidrey <ahaidrey@pinterest.com>
2020-05-31 12:52:20 +02:00
Kamil Breguła 2b1dc1b8e1
Support properties in plugins (#9002) 2020-05-30 21:12:21 +02:00
Jarek Potiuk 88c8edb898
Prevents failure on fixing permissions for files with space in it (#9076) 2020-05-30 21:02:31 +02:00
Jarek Potiuk db4297406d
Adds hive as extra in pyhive (#9075)
Seems that apache hive needs to install [hive] extra of pyhive
in order to be usable ¯\_(ツ)_/¯.

Fixes: #8933
2020-05-30 20:59:04 +02:00
Ash Berlin-Taylor 735bf45de7
Test that DagFileProcessor can operate against on a Serialized DAG (#8739)
As part of the scheduler HA work we are going to want to separate the
parsing from the scheduling, so this changes the tests to ensure that
the important methods of DagFileProcessor can do everything the need to
when given a SerializedDAG, not just a DAG. i.e. that we have correctly
serialized all the necessary fields.
2020-05-30 17:36:53 +01:00
Tomek Urbaszek 7f026d12b8
Remove Travis CI badge from README (#9074)
* Remove Travis CI badge from README

* fixup! Remove Travis CI badge from README
2020-05-30 18:16:03 +02:00
Bas Harenslak 93eda7ac4e
Remove not-existing files in pylint_todo.txt (#9073) 2020-05-30 17:48:17 +02:00
Jarek Potiuk 05e4c39eb6
Provide_context coma is added only when there is not one already (#9064) 2020-05-30 17:37:51 +02:00
Tomek Urbaszek 3435e6e7eb
Improve SchedulerJob code style (#9018)
* Small style changes in BaseJob

* Small code improvements in SchedulerJob

* fixup! Small code improvements in SchedulerJob

* fixup! fixup! Small code improvements in SchedulerJob
2020-05-30 17:35:25 +02:00
Mauricio De Diana e9ecf0ae10
Improve test for the next_execution cli command (#9058)
* Improve test for the next_execution cli command

It still tests the same functionality, but it is now more efficient and
readable. The changes are:

 - The DB is cleaned only once instead of eight times
 - Use a fixed datetime instead of timezone.utcnow (deterministic)
 - Use redirect_stdout instead of subprocess
 - Clean up pylint warning
 - Test None output once instead of four times

* Address PR comments

Issues addressed:

 - Use create_session

 - Use DagRunType.MANUAL.value

 - Remove DagRuns created by the test

* Remove test from quarantine

Co-authored-by: Tomek Urbaszek <turbaszek@gmail.com>

Co-authored-by: Tomek Urbaszek <turbaszek@gmail.com>
2020-05-30 03:40:25 +02:00
S S Rohit 357e11e0cf
Add Delete/Create S3 bucket operators (#8895) 2020-05-29 23:35:40 +01:00
Ephraim Anierobi 886afaf622
Add example dag and system test for LocalFilesystemToGCSOperator (#9043) 2020-05-29 23:28:43 +01:00
Ephraim Anierobi a779c4dfc2
add separate example dags and system tests for GCSToGoogleSheetsOperator (#9066)
* add separate example dag and system test for GCSToGoogleSheetsOperator

* remove gcs_to_sheets from missing example dags

* fix doc error
2020-05-29 14:31:11 -07:00
Mikaël Ducharme 5cf46fad1e
Add SlackAPIFileOperator impementing files.upload from Slack API (#9004)
* Added SlackAPIFileOperator

* Added usage example in docstring

* Added tests for SlackAPIFileOperator, fixed extra line and added missing type hinting in operators/slack.py

* Fixed import order for isort

* Refactor conn_id for slack_conn_id

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

* Remove # from channel name for default channel name

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

Co-authored-by: Mikaël Ducharme <mikaelducharme@effenco.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
2020-05-29 18:37:44 +02:00
Joppe Vos 3d3c0425b1
Added test for bigquery sensor (#8986)
* added small test for bigquery sensor

* removed file from missing_test_files
2020-05-29 17:03:38 +02:00
Ephraim Anierobi ada26be23c
Add correct description for dst param in LocalFilesystemToGCSOperator (#9055) 2020-05-29 16:59:20 +02:00
Ash Berlin-Taylor 86909de47c
Allow testing any executor with scheduler_dag_execution_timing.py (#9062) 2020-05-29 15:28:20 +01:00
JavierLopezT da83ef8cfe
Add Company to Airflow Users list (#9061) 2020-05-29 12:54:17 +01:00
Ephraim Anierobi 81b2761b86
add example dag and system test for GoogleSheetsToGCSOperator (#9056)
* add example dag and system test for sheets_to_gcs

* remove sheets_to_gcs in missing example dags
2020-05-29 09:21:26 +02:00
Yingbo Wang decf7e83d8
Profile hostname for celery executor (#8624)
Co-authored-by: yingbo_wang <yingbo.wang@airbnb.com>
2020-05-28 17:43:07 -07:00
Daniel Imberman e4d811db86
Use production image for k8s tests (#9038)
* Use production image for k8s tests

The CI image has become too large to load into KinD,

it also only really makes sense to use the production image for
integration tests

* nit

Co-authored-by: Daniel Imberman <daniel@astronomer.io>
2020-05-28 07:11:37 -07:00
Ash Berlin-Taylor dd1bfccf3c
Cancel queued/running builds on second push to PR (#9050)
This uses an action from the marketplace to cancel any running builds
for our main "CI" workflow (the only one we have at the moment)
2020-05-28 13:05:45 +01:00
QP Hou 14e241f05c
detect incompatible docker server version in breeze (#9042) 2020-05-28 13:50:24 +02:00
Daniel Huang 902703da60
[AIRFLOW-6231] Display DAG run conf in the list view (#6794) 2020-05-28 12:49:49 +01:00
Kamil Breguła 52c7862195
Add a tip to trigger DAG screen (#9049) 2020-05-28 13:40:51 +02:00
Andrej Švec 1ed171bfb2
Add script_args for S3FileTransformOperator (#9019)
Co-authored-by: Andrej Svec <asvec@slido.com>
2020-05-28 11:12:44 +01:00
Tomek Urbaszek 369e6377b4
Add query count test for LocalTaskJob (#8922)
* Add query count test for LocalTaskJob

* fixup! Add query count test for LocalTaskJob
2020-05-28 07:24:46 +02:00
Jarek Potiuk 738667082d
Additional python extras and deps can be set in breeze (#9035)
Closes #8604
Closes #8866
2020-05-27 17:09:11 +02:00