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

10078 Коммитов

Автор SHA1 Сообщение Дата
Kaxil Naik ee8b02a14f
Add missing assert call in test_dbapi_hook.py (#10842)
`assert` call was missing so the statement didn't test or wouldn't fail if condition isn't true
2020-09-09 23:59:16 +01:00
Kaxil Naik 0d38cf16f8
Fix typo in docs/howto/operator/amazon/aws/emr.rst (#10844)
`Documetation` -> `Documentation`
2020-09-09 23:58:19 +01:00
Daniel Imberman e1e0485bb1
Remove k8s dependency from serialization (#10831)
Ensures that airflow can run without downloading the
Kubernetes python client
2020-09-09 13:25:10 -07:00
Kaxil Naik cc851c7c03
Fix grammar in UPDATING.md (#10841)
`changes` -> `changed`
2020-09-09 20:39:16 +01:00
Kamil Breguła 9528f15513
Fix doc errors introduced in #10413 (#10833) 2020-09-09 20:16:41 +01:00
Ash Berlin-Taylor dfcb7afd13
Fix typos in the stackdriver howto document (#10834)
Someone was overzealous in building the initial ignore list -- "wil" is
not a word :)

And the spell checker does not catch repeated words.
2020-09-09 08:24:18 -07:00
Ash Berlin-Taylor 9f23407ec9
Fix doc errors introduced in #10413 (#10832)
Co-authored-by: Kamil Breguła <mik-laj@users.noreply.github.com>
2020-09-09 15:56:23 +01:00
Jarek Potiuk a356656d44
Make dockerfiles Google Shell Guide Compliant (#10734)
Part of #10576
2020-09-09 14:04:16 +02:00
Aleksey Tsalolikhin 7adae240d8
Add documentation for preparing database for Airflow (#10413) 2020-09-09 11:51:20 +02:00
Jarek Potiuk 409ebc1097
Make scripts/ci/tools Google Shell Guide Compatible (#10811)
Part of #10576
2020-09-09 11:44:17 +02:00
Jarek Potiuk 40939dca86
Make airflow testing Google Shell Guide compatible (#10813)
Part of #10576
2020-09-09 11:43:25 +02:00
Tomek Urbaszek 7edfac957b
Add connection caching to KubernetesHook (#10447)
* Add connection caching to KubernetesHook

* Fix recursion and remove redundant docstrings
2020-09-09 11:42:31 +02:00
Kaxil Naik 9549274d11
Upgrade black to 20.8b1 (#10818) 2020-09-09 09:06:24 +01:00
Kaxil Naik 004e1d8e34
Update log exception to reflect rename of execute_helper (#10819)
`SchedulerJob.execute_helper` was renamed to `SchedulerJob._run_scheduler_loop`
2020-09-09 08:43:02 +01:00
Daniel Imberman 20481c3caf
Add pod_override setting for KubernetesExecutor (#10756)
* Add podOverride setting for KubernetesExecutor

Users of the KubernetesExecutor will now have a "podOverride"
option in the executor_config. This option will allow users to
modify the pod launched by the KubernetesExecutor using a
`kubernetes.client.models.V1Pod` class. This is the first step
in deprecating the tradition executor_config.

* Fix k8s tests

* fix docs
2020-09-08 15:56:59 -07:00
Yingbo Wang ac943c9e18
[AIRFLOW-3964][AIP-17] Consolidate and de-dup sensor tasks using Smart Sensor (#5499)
Co-authored-by: Yingbo Wang <yingbo.wang@airbnb.com>
2020-09-08 22:47:59 +01:00
Kamil Breguła ff41361e0e
Add task logging handler to airflow info command (#10771) 2020-09-08 22:12:55 +02:00
Ash Berlin-Taylor 7fd65d75b3
Don't include kubernetes_tests/ and backport_packages/ in our wheel (#10805)
Since 1.10.x we have added some new top-level folders that were getting
included in the build wheel!
2020-09-08 21:44:17 +02:00
Jarek Potiuk 2811851f80
Move Impersonation test back to quarantine (#10809)
Seems that TestImpersonation is not stable even in isolation
Moving it back to quarantine for now.
2020-09-08 21:33:44 +02:00
Jarek Potiuk c60fcccdb6
Fix integration tests being accidentally excluded (#10807)
The change from #10769 accidentally switched Integration tests
into far-longer run unit tests (we effectively run the tests
twice and did not run integration tests.

This fixes the problem by removing readonly status from
INTEGRATIONS and only setting it after the integrations are
set.
2020-09-08 20:46:46 +02:00
Jarek Potiuk 3c6fdd84f8
Make ci/backport_packages Google Shell guide compliant (#10733) 2020-09-08 19:29:37 +02:00
Jarek Potiuk 71e1d09175
Fixed wrong "-e" on md5 file status check (#10803)
The "-e" flag was not reset properly in the md5 status check
which could lead in some cases to removing output of flake check.
2020-09-08 19:23:07 +02:00
Jarek Potiuk 4f07463cf2
Make script/ci/kubernetes Google Shell Guide Compatible (#10746)
Part of #10576
2020-09-08 19:21:45 +02:00
Jarek Potiuk 43303f10aa
Make script/ci/images Google Shell Guide compatible (#10745)
Part of #10576
2020-09-08 19:20:26 +02:00
Ry Walker aaf56f9816
Refactor official source section to use bullets (#10801)
* Refactor section to use bullets

* Change structure to group the binary options
2020-09-08 10:50:07 -04:00
Ry Walker 417ab301cf
Add section for official source code (#10678)
* Add section for official source code

* Update README.md

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

* Update README.md

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

* Update README.md

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

* Fix typos

* Fix capitalization

* Update README.md

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

* Update README.md

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

* Format fixup

* Remove official docker images section

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2020-09-08 10:03:33 -04:00
Jarek Potiuk cd0cc4ca86
Check that all pre-commits are synchronized code<>docs (#10789)
Until pre-commit implements export of all configured
checks, we need to maintain the list manually updated.

We check both - pre-commit list in breeze-complete and
descriptions in STATIC_CODE_CHECKS.rst
2020-09-08 14:06:42 +02:00
Kamil Breguła 961131d51c
All files in providers package heve unit tests (#10799) 2020-09-08 13:55:35 +02:00
Ephraim Anierobi 078bfaf60a
Extract missing gcs_to_local example DAG from gcs example (#10767)
Co-authored-by: Kamil Breguła <kamil.bregula@polidea.com>
2020-09-08 13:08:06 +02:00
Ephraim Anierobi 3c3342f1fd
Add unit test for AzureCosmosDocumentSensor (#10765) 2020-09-08 12:21:22 +02:00
Jarek Potiuk 4de67a6731
Move dev docker images to airflow registry (#9652)
Part of #9401
2020-09-08 10:07:10 +02:00
Joshua Carp 2934220dc9
Always return a list from S3Hook list methods (#10774) 2020-09-08 09:49:34 +02:00
Dmitri Kuksik 10ce31127f
Deprecate using global as the default region in Google Dataproc operators and hooks (#10772)
The region parameter is required for some of Google Dataproc operators
and it should be provided by users to avoid creating data-intensive 
tasks in any default location.
2020-09-08 08:46:29 +02:00
Jarek Potiuk b746f33fc6
Removes stable tests from quarantine (#10768)
We've observed the tests for last couple of weeks and it seems
most of the tests marked with "quarantine" marker are succeeding
in a stable way (https://github.com/apache/airflow/issues/10118)
The removed tests have success ratio of > 95% (20 runs without
problems) and this has been verified a week ago as well,
so it seems they are rather stable.

There are literally few that are either failing or causing
the Quarantined builds to hang. I manually reviewed the
master tests that failed for last few weeks and added the
tests that are causing the build to hang.

Seems that stability has improved - which might be casued
by some temporary problems when we marked the quarantined builds
or too "generous" way of marking test as quarantined, or
maybe improvement comes from the #10368 as the docker engine
and machines used to run the builds in GitHub experience far
less load (image builds are executed in separate builds) so
it might be that resource usage is decreased. Another reason
might be Github Actions stability improvements.

Or simply those tests are more stable when run isolation.

We might still add failing tests back as soon we see them behave
in a flaky way.

The remaining quarantined tests that need to be fixed:
 * test_local_run (often hangs the build)
 * test_retry_handling_job
 * test_clear_multiple_external_task_marker
 * test_should_force_kill_process
 * test_change_state_for_tis_without_dagrun
 * test_cli_webserver_background

We also move some of those tests to "heisentests" category
Those testst run fine in isolation but fail
the builds when run with all other tests:
 * TestImpersonation tests

We might find that those heisentest can be fixed but for
now we are going to run them in isolation.

Also - since those quarantined tests are failing more often
the "num runs" to track for those has been decreased to 10
to keep track of 10 last runs only.
2020-09-08 07:36:12 +02:00
QP Hou 3a4f51775f
fix task instance modal open performance issue (#10764)
This reduces the task instance modal open wait time for large DAGs with
extra links from minutes to 6 ms, an order of 10000 times speed up.
2020-09-07 15:07:51 -07:00
Jarek Potiuk ef0d639b34
Fixes pre-commit failing on build step (#10785)
When rebuildig the image during commit, kill command failed to
find the spinner job to kill (this is just preventive measure)
and failed the rebuild step in pre-commit.

This is now fixed.
2020-09-07 22:38:39 +02:00
Mateusz Kukieła f14f379716
[AIRFLOW-10672] Refactor BigQueryToGCSOperator to use new method (#10773)
Makes BigQueryToGCSOperator to use BigQueryHook.insert_job method

Committer: Mateusz Kukieła <mateuszkukiela@gmail.com>
2020-09-07 16:18:16 +02:00
Tomek Urbaszek c8ee455685
Refactor DataprocCreateCluster operator to use simpler interface (#10403)
DataprocCreateCluster requires now:
- cluster config
- cluster name
- project id

In this way users don't have to pass project_id two times 
(in cluster definition and as parameter). The cluster object 
is built in create_cluster hook method
2020-09-07 12:21:00 +02:00
Jarek Potiuk 1959d6aee2
Make static checks Google Shell Guide compatible (#10750)
Part of #10576
2020-09-07 08:05:07 +02:00
Jarek Potiuk 18b80f34e8
The scripts to run tests properly initialises constants (#10769)
The constants were initialised after the readonly status was set
for the constants in the test script.

This was mainly about default values for those consttants (but this
has already been handled by the _script_init.sh but more importantly
the INTEGRATIONS were not properly initialized that cause skipping of
some integration tests.
2020-09-07 08:03:48 +02:00
Kamil Breguła ddee0aa4fb
Simplify load connection in LocalFilesystemBackend (#10638) 2020-09-06 20:56:03 +02:00
Jarek Potiuk ebb0a97018
Make ci/scripts/pre-commit Google Shell Guide compatible (#10748)
Part of #10576
2020-09-06 20:00:54 +02:00
Jarek Potiuk fbce92e8e7
The verbose functions will not exit immediately if not asked to (#10731)
The docker(), helm(), kubectl() functions replace the real tools
to get verbose behaviour (we can print the exact command being
executed for those. But when 'set +e' was set before the command
was called - indicating that error in those functions should be
ignored - this did not happen. The functions set 'set -e' just
before returning the non-zero value, effectively exiting the
script right after. This caused first time experience to be not
good.

The fix also fixes behaviour of stdout and stderr for those
functions - previously they were joined to be able to be
printed to OUTPUT_FILE but this lost the stderr/stdout
distinction. Now both stdout and stderr are printed to the
output file but they are also redirected to stdout/stderr
respectively, so that 2>/dev/null works as expected.

While fixing it, it turned out that one of the remove_images
methods was not used any more - merged it with the breeze one.
2020-09-06 19:56:35 +02:00
Jed Cunningham 59f9a4116a
Add permission "extra_links" for Viewer role and above (#10719)
This change adds 'can extra links on Airflow' to the Viewer role and above. Currently, only Admins can see extra links by default.
2020-09-06 18:26:08 +02:00
Jarek Potiuk e3c83da984
Check all dockerfiles with hadolint (#10754)
The hadolint check only checked the "main dir" Dockerfile
but we have more of them now. All of them are now checked.

The following problems are fixed:

 * DL3000 Use absolute WORKDIR
 * DL4000 MAINTAINER is deprecated
 * DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it.
 * SC2046 Quote this to prevent word splitting.

The followiing problems are ignored:

 * DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add
   <package>=<version>`
2020-09-06 18:06:05 +02:00
Kamil Breguła 9f5b22f937
Move role guide to access control (#10755) 2020-09-06 18:04:09 +02:00
Ash Berlin-Taylor 323319c33f
Fix `breeze flags` command. (#10766)
This was missed in #10670
2020-09-06 12:32:32 +01:00
Jarek Potiuk e3c750e618
Switch to downloaded pgbouncer_exporter (#10759)
Fixes #10753
2020-09-06 10:47:32 +02:00
Jarek Potiuk ba36f876dc
Make scripts/ci/openapi Google Shell Guide compatible (#10747)
Part of #10576
2020-09-05 22:25:39 +02:00
Kush 28c21cfd1d
clean-logs script for Dockerfile: trim logs before sleep (#10685)
If the pod restarts before the sleep time is over, the trim command will not run. I think it's better if we reorder the commands to execute the delete and then go to sleep. At the moment sleep is every 15 mins but people will just increase the EVERY line if they want longer sleep time and can encounter this bug.
2020-09-05 17:40:57 +02:00