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

10044 Коммитов

Автор SHA1 Сообщение Дата
Denis Evseev f7da7d94b4
Fix ExternalTaskMarker serialized fields (#10924)
Co-authored-by: Denis Evseev <xOnelinx@gmail.com>
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
2020-09-15 23:40:41 +01:00
John Bampton ce19657ec6
Fix case of GitHub. (#10955)
Changed `Github` to `GitHub`.
2020-09-15 14:49:27 -04:00
Jonathan Stacks e4e316ab9e
Fix Kubernetes Executor logs for long dag names (#10942)
See #10292
2020-09-15 08:51:35 -07:00
Jarek Potiuk 45272a8e41
Github repository can be overridden in command line by Breeze (#10943)
During testing v1-10-test backport for Breeze the
--github-repository flag did not work. It turned out that
the lowercase variable was not re-set when the flag was
provided by Breeze.

This change causes the lowercasing to be run just before it
is used to make sure that the GITHUB_REPOSITORY value
is used after it's been overwritten.
2020-09-15 15:42:31 +02:00
Jarek Potiuk 14f27635f6
Fixes retrieval of correct branch in non-master related builds (#10912)
When we ported the new CI mechanism to v1-10-test it turned out
that we have to correct the retrieval of DEFAULT BRANCH
and DEFAULT_CONSTRAINTS_BRANCH.

Since we are building the images using the "master" scripts, we need to
make sure the branches are retrieved from _initialization.sh of the
incoming PR, not from the one in the master branch.

Additionally versions 2.7 and 3.5 builds have to be merged to
master and excluded when the build is run targeting master branch.
2020-09-15 15:24:33 +02:00
Kaxil Naik d43bb75367
Remove test dependency from TestApiKerberos (#10950)
TestApiKerberos::test_trigger_dag previously was dependent that the `example_bash_operator` exist in the Database.

If one of the other tests didn't write it to the DB or if one of the other tests cleared it from the DB, this test failed.
2020-09-15 14:19:29 +01:00
Sumit Maheshwari 791a175988
Fix the method defaults for _construct_volume (#10948) 2020-09-15 17:21:15 +05:30
Jacob Ferriero 23768f6946
Proposal: remove -serviceaccount suffix from KSA names in helm chart (#10892)
* [WIP] remove -serviceaccount suffix in helm chart

It's quite annoying to have `-serviceaccount` in each service account name as this is a useless 15 characters that provides no additional information.
"why is this so frustrating to you Jake?"
GCP service accounts have 30 char name limit https://cloud.google.com/iam/docs/creating-managing-service-accounts#creating
For manageability / clarity I'd like to keep KSA and GSA names exactly the same when using workload identity which maps KSA<>GSA 1:1 https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity.
2020-09-15 12:39:39 +02:00
Ping Zhang 96165185f1
Add CeleryKubernetesExecutor (#10901)
it consists of CeleryExecutor and KubernetesExecutor, which allows users
to route their tasks to either Kubernetes or Celery based on the queue
defined on a task
2020-09-15 09:42:55 +02:00
Jarek Potiuk 83ed6bdb3f
Cache for kubernetes tests is updateable (#10945)
The cache in Github Actions is immutable - once you create it
it cannot be modified. That's why cache keys should contain
hash of all files that are used to create the cache.

Kubernetes cache key did not contain it, and as a side effect
the cache from master kubernetes setup.py was used in the v1-10-test
after the breeze changes were cherry-picked.
2020-09-15 02:24:15 +02:00
Jed Cunningham b628067b42
Minor refactor of the login methods in tests.www.test_views (#10918)
- Instead of supporting only an Admin user in the base test class, you can also use a normal User or Viewer
- Only add users when they are being used so we can do a little less in the setup phase (minor speedup in TestDagACLView)
2020-09-14 23:54:23 +02:00
Ryan Hamilton aab95994b8
Fix 'Tasks State' stats UI Overlap (#10939)
Resolves #10935
2020-09-14 19:49:57 +01:00
Daniel Imberman d24b8f69e7
Add Examples and documentation for pod_template_file feature (#10916)
* Add examples and documentation for pod_mutation_hook

* @mik-laj comments

* Update docs/executor/kubernetes.rst

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

* Update docs/executor/kubernetes.rst

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

* Update docs/executor/kubernetes.rst

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

* Update docs/executor/kubernetes.rst

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

* Update docs/executor/kubernetes.rst

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

* Update docs/executor/kubernetes.rst

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

* Update docs/executor/kubernetes.rst

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

* Update docs/executor/kubernetes.rst

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

* Update docs/executor/kubernetes.rst

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

* moved template files

* fix spelling

* spellcheck

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
2020-09-14 09:56:07 -07:00
Tomek Urbaszek 5d6d5a2f7d
Allow to specify path to kubeconfig in KubernetesHook (#10453) 2020-09-14 18:16:53 +02:00
Dmytro Usenko 4e1f3a69db
[AIRFLOW-10645] Add AWS Secrets Manager Hook (#10655) 2020-09-14 08:54:48 -07:00
Kaxil Naik 2832c954fd
Stop running Doc tests with Spelling tests (#10938)
Currently we run the following tests too when checking spell-check errors

- check_guide_links_in_operator_descriptions()
- check_class_links_in_operators_and_hooks_ref()
- check_guide_links_in_operators_and_hooks_ref()
- check_enforce_code_block()
- check_exampleinclude_for_example_dags()
- check_google_guides()
2020-09-14 16:50:59 +01:00
Kaxil Naik 67402b72a9
Fix grammar in Bug Report Template (#10936)
`This questions` -> `These questions`
2020-09-14 16:38:42 +01:00
Tomek Urbaszek eaa49b2257
Fix chain methods for XComArg (#10827)
__lshift__ and __rshift__ methods should return other not self.
This PR fixes XComArg implementation  to support chain like this one:
BaseOprator >> XComArg >> BaseOperator

Related to: #10153
2020-09-14 13:13:04 +02:00
Kaxil Naik e9add79160
Fix Failing static tests on Master (#10927) 2020-09-14 11:33:18 +01:00
Kaxil Naik 7b4dc63908
Add Formatted Stacktrace for Spelling Error (#10919) 2020-09-14 11:02:40 +01:00
Cooper Gillan 383a118d2d
Add more type annotations to AWS hooks (#10671)
Co-authored-by: Kamil Breguła <kamil.bregula@polidea.com>
2020-09-14 11:55:53 +02:00
Ash Berlin-Taylor 9e42a97f3f
Mark task as failed when it fails sending in Celery (#10881)
If a task failed hard on celery, _before_ being able to execute the
airflow code the task would end up stuck in queued state. This change
makes it get retried.

This was discovered in load testing the HA work (but unrelated to HA
changes), where I swamped the kube-dns pod, meaning the worker was
sometimes unable to resolve the db name via DNS, so the state in the DB
was never updated
2020-09-14 10:40:14 +01:00
Ash Berlin-Taylor ad4f232cda
Remove unknown pytest.ini setting (#10923)
This was added when we first migrated to pytest, but pytest is now
complaining that this setting is unknown.

Since it doesn't do anything, lets remove it
2020-09-14 09:49:41 +01:00
Jarek Potiuk b2dc346062
Make breeeze-complete Google Shell Guide compatible (#10708)
Also added unit tests for breeze-complete
Part of #10576
2020-09-14 10:21:09 +02:00
Jarek Potiuk f6963223d6
Make Clients Google Shell guide compatible (#10810)
Part of #10576
2020-09-14 10:20:21 +02:00
Jarek Potiuk d26830f510
Make vrious scripts Google Shell Guide compatible (#10812)
Part of #10576
2020-09-14 10:19:19 +02:00
Jarek Potiuk 791f9044fe
Adds the maintain-heart-rate to quarantine. (#10922)
The test occasionally fails, moving it to quarantine for now.
2020-09-14 10:18:54 +02:00
Daniel Imberman 87e7ad9daf
fix bug where multiple volume mounts created (#10915) 2020-09-13 16:47:35 -07:00
Kaxil Naik 69be4b8bce
Fix typos in scripts/ci/docker-compose/local.yml (#10906)
`an` -> `on` (grammatically that makes sense)
2020-09-13 22:41:59 +01:00
tszerszen 12a652f534
Fix parameter name collision in AutoMLBatchPredictOperator #10723 (#10869)
Rename `params` to `prediction_params` to avoid
clash with BaseOperator arguments
2020-09-13 17:05:57 +02:00
Kaxil Naik f77a11d5b1
Add Secrets backend for Microsoft Azure Key Vault (#10898) 2020-09-13 16:45:21 +02:00
Kaxil Naik 76dc7ed027
Fix grammar in BREEZE.rst (#10904)
`Other uses the Airflow Breeze environment` -> `Other uses of the Airflow Breeze environment`
2020-09-13 16:43:01 +02:00
Kaxil Naik d8237b84cb
Fix typos in BREEZE.rst (#10905)
`lunch` -> `launch`
`disto` -> `distro`
2020-09-13 16:42:30 +02:00
Kaxil Naik 75bbddf2bb
Make the usage of bash 'shift' consistent across Breeze (#10907)
If an argument is not provided to `shift` it by default uses `shift 1`. The commands "shift 1" and "shift" (with no argument) do the same thing. This PR makes the usage consistent as there were occurences of both
2020-09-13 16:28:11 +02:00
Kaxil Naik 16b02dfe44
Add missing closing bracket in CI.rst (#10908)
A closing bracket was missing in the sentence.
2020-09-13 16:27:31 +02:00
Kaxil Naik 6dd2a0dbb1
Update the name of static check without pylint in CI.rst (#10909)
We changed the name of the static check without pylint in a1032805bc (diff-e9f950f17198d3d5e3122a44230a09b9), this commit updates it's name in the docs
2020-09-13 16:27:02 +02:00
Kaxil Naik 92eafc01ed
Parameterize tests in hashicorp/hooks/test_vault.py (#10903)
Some of the tests were parameterizable, so less line to maintain with the same level of testing
2020-09-12 22:01:47 +01:00
Kaxil Naik ee42aaeaa2
Fix typo in the word 'instance' (#10902)
`instnace` -> `instance`
2020-09-12 20:08:43 +01:00
Kaxil Naik 9c866cd9ef
Fix syntax error in Dockerfile 'maintainer' Label (#10899) 2020-09-12 18:32:07 +02:00
Kaxil Naik f383bb3416
Fix separated strings in test_secrets_manager.py (#10900)
"airflow.providers.amazon.aws.secrets.secrets_manager." "SecretsManagerBackend.get_conn_uri"

to

"airflow.providers.amazon.aws.secrets.secrets_manager.SecretsManagerBackend.get_conn_uri"
2020-09-12 18:31:38 +02:00
Jarek Potiuk 106c0f556f
Add pre-commit to sort INTHEWILD.md file automatically (#10851) 2020-09-12 18:26:12 +02:00
Jarek Potiuk b9f868b5ec
Remove errors raised during initialiation of virtualenv (#10896)
Our migration scripts are written in the way that if you
are running them to reset the db and you have some files in
example_dags or dags, or some plugins in your plugins folder,
you will get various kinds of errors.

Those errors are printed to the user and even if they are
ultimately ignored by the SqlAlchemy migration process,
they are confusing whether the database reset
(and thus the whole initialize-virtualenv) were successful
or not.

This change disables any DAGs that could be loaded during the
DB reset (in case of running './breeze initialize-virtualenv'.

Fixes #10894
2020-09-12 14:39:34 +02:00
Daniel Cohen 2e8b4ece36
Pass conf to subdags (#9956) 2020-09-12 11:58:17 +01:00
Jarek Potiuk d9920faa80
The entrypoints in Docker Image should be owned by Airflow (#10853)
Since we are running the airflow image as airflow user, the
entrypoint and clear-logs scripts should also be set as airflow.

This had no impact if you actually run this as root user or
when your group was root (which was recommended).
2020-09-12 10:54:25 +02:00
Jarek Potiuk 35840ff211
Removes snakebite kerberos dependency (#10865)
Snakebite's kerberos support relied on a python-krbV
which has been removed from PyPI. It did not work
completely anyway due to snakebite not being officially
supported in python3 (snakebite-py3 did not work with
SSL which made Kerberos pretty much unusable.

This commit removes the snakebite's kerberos support
from setup.py so that you still can install kerberos
as extra for other uses.
2020-09-12 10:53:52 +02:00
Jarek Potiuk f76ab1f882
Fix failing dependencies for FAB and Celery (#10828)
Recent releases of FAB and Celery caused our installation to
fail. Luckily we have protection so that regular PRs are not
affected, however we need to update the setup.py to exclude
those dependencies that cause the problem.

Those are:

* vine - which is used by Celery Sensor (via kombu) - 5.0.0
  version breaks celery-vine feature

* Flask-OauthLib and flask-login - combination of the current
  requirements caused a conflict by forcing flask login to
  be 0.5.0 which is not compatible with Flask Application Builder
2020-09-12 09:52:11 +02:00
dependabot[bot] 7dd7be3164
Bump prismjs from 1.20.0 to 1.21.0 in /airflow/www (#10234)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.20.0 to 1.21.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.20.0...v1.21.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-12 00:10:28 +01:00
mucio 47e592e3a0
Flag --start-airflow for breeze (#10837) 2020-09-11 23:26:56 +02:00
Ash Berlin-Taylor 030582a043
Fix `breeze -i` error (#10887)
It was erroring with "unbound" variable, expecting INTEGRATION to be a
pre-defined variable.
2020-09-11 23:25:43 +02:00
tszerszen 41a62735ed
Add on_kill method to BigQueryInsertJobOperator (#10866)
* Add on_kill method to BigQueryInsertJobOperator
* BigQueryInsertJobOperator pylint disable=too-many-arguments
2020-09-11 20:48:16 +02:00