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

10078 Коммитов

Автор SHA1 Сообщение Дата
Varun Dhussa ece685b5b8
Asynchronous execution of Dataproc jobs with a Sensor (#10673) 2020-09-05 13:11:37 +01:00
Shekhar Singh 527ea81f3f
Add docs for how airflow manages packages and imports (#10303) 2020-09-05 13:47:22 +02:00
Kaxil Naik 4ce0a0639a
Remove duplicate entries from .mailmap (#10736) 2020-09-05 08:56:17 +02:00
Kaxil Naik 0faa710e47
Add black to STATIC_CODE_CHECKS.rst (#10737)
Add black to the table for Static Code Checkers
2020-09-05 08:55:48 +02:00
Kaxil Naik 7f0271f820
Improve test coverage for ConfObject in dag_run_schema (#10738)
Adds test to verify that string can be passed to conf and ConfObject._deserialize works.
2020-09-05 08:55:12 +02:00
Kaxil Naik a1a312ee1b
Fix typo in test_dag_run_schema.py (#10739) 2020-09-05 08:54:17 +02:00
Kaxil Naik 5b683f09c0
Improve test coverage for test_common_schema.py (#10740)
Adds test that an error is raised with specific message when unkown object type is passed
2020-09-05 08:53:43 +02:00
Ryan Yuan d84b62d7e1
Update node installation cmd (#10744) 2020-09-05 08:50:29 +02:00
Kaxil Naik 079d7b5946
Enable more checks for pydocstyle (#10741)
Enable D106, D207 and D208

D106	Missing docstring in public nested class
D207	Docstring is under-indented
D208	Docstring is over-indented
2020-09-05 02:26:09 +01:00
Kaxil Naik 7b810b8178
Fix docs for generate-dag-yaml cli command (#10735) 2020-09-05 01:28:33 +01:00
QP Hou 8cb4fc18e5
Add securitySchemes in openapi spec (#10652)
openapi-generator relies on this component to generate auth code in
some of the clients.
2020-09-05 00:41:01 +02:00
Antonio Davide Calì 6e3d7b63d3
Add masterConfig parameter to MLEngineStartTrainingJobOperator (#10578)
Co-authored-by: antonio-davide-cali <antonio.davide.cali@ikea.com>
2020-09-04 23:58:24 +02:00
Jarek Potiuk e4de7288a3
Switches to better BATS asserts (#10718)
BATS has additional libraries of asserts that are much more
straightforward and nicer to write tests for bash scripts

There is no dockerfile from BATS that contains those, so we
had to build our own (but it follows the same structure
as #9652 - where we keep our dev docker image
sources inside our repository and the generated docker images
in "apache/airflow:<tool>-CALVER-TOOLVER format.

We have more BATS unit test to add - following #10576
and this change will be of great help.
2020-09-04 22:25:29 +02:00
Daniel Imberman 90c1505686
Make grace_period_seconds option on K8sPodOperator (#10727)
* Make grace_period_seconds option on K8sPodOperator

This PR allows users to choose whether they want to gracefully kill
pods when they delete tasks in the UI or if they would like to
immediately kill them.

* Update airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py

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

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
2020-09-04 11:35:50 -07:00
Kaxil Naik 3f7831c73e
Relax requirement to allow latest version of flask-login (#9990)
The current latest available version is 0.5.0 (https://pypi.org/project/Flask-Login/0.5.0/)

Version 0.5.0 drops support for Python 2.6, 3.3, 3.4 and we don't use those versions in Airflow Master
2020-09-04 14:37:40 +01:00
Daniel Imberman 828f7303b7
Add generate_yaml command to easily test KubernetesExecutor before deploying pods (#10677)
* Add generate_template command for kubernetes_executor

* move import

* fix test failure

* Address @mik-laj comments

* Address @mik-laj comments

* Use current dir

* add docs

* fix test
2020-09-03 18:04:23 -07:00
Kamil Breguła ab5235ee12
Unify command names in CLI (#10720)
* Unify command names in CLI

* fixup! Unify command names in CLI
2020-09-04 01:25:39 +02:00
Chris McLennon 6f96e81f01
Add Indeed to INTHEWILD.md (#10716) 2020-09-03 16:10:14 -04:00
Sumit Maheshwari faaf1796fb
Add Stacktrace when DagFileProcessorManager gets killed (#10681) 2020-09-03 23:38:02 +05:30
Ash Berlin-Taylor 57fd4797e0
Ensure we heartbeat the DagFileProcessorManager regularly. (#10706)
It could have wedged, (but the process still be alive) and we would
never notice.

In this I use `time.monotonic` rather than a `datetime` object for two
reasons:

1. We don't need the expense of a "full" date time object since all we
    care about is the second diff between two points in time.
2. It is "more correct" as `datetime.now()` would be inaccurate if the
   system clock changes (NTP etc.)
2020-09-03 18:17:12 +01:00
Ash Berlin-Taylor de0d7d52ac
Make test_trigger_rule_dep tests re-runnable (#10712)
If we run this test
(TestTriggerRuleDep::test_get_states_count_upstream_ti specifically)
more than once without clearing the DB in between it would fail due to a
unique constraint violation.
2020-09-03 17:19:30 +01:00
Ash Berlin-Taylor a01d986f6a
Don't commit when explicitly passed a session to TI.set_state (#10710)
The `@provide_session` wrapper will already commit the transaction when
returned, unless an explicit session is passed in -- removing this
parameter changes the behaviour to be:

- If session explicitly passed in: don't commit (caller's
  responsibility)
- If no session passed in, `@provide_session` will commit for us already.
2020-09-03 17:18:32 +01:00
João Marques 5b6464f489
Migrate speccy to spectral in OpenAPI linting. (#10351) 2020-09-03 18:06:23 +02:00
Kamil Breguła f7fad67df3
Update DAG Serialization docs (#10711)
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
2020-09-03 18:00:24 +02:00
Kaxil Naik 9ac882e6cc
[AIRFLOW-5948] Replace SimpleDag with SerializedDag (#7694) 2020-09-03 16:52:27 +01:00
Tomek Urbaszek 913397c1c6
Make Cloud Build system tests setup runnable (#10692)
This change fixes error: open(quickstart.sh): Permission denied
that was rised during git add.
2020-09-03 13:20:10 +02:00
Aaditya Sharma 36aa88ffc1
Add jupytercmd and fix task failure when notify set as true in qubole operator (#10599)
Add jupytercmd in Qubole Operator which fires a JupyterNotebookCommand to the jupyter notebooks running on user's QDS account. Along with this, we have fixed a minor bug that caused the tasks to fail with --notify is set in Qubole Operator.

Co-authored-by: Aaditya Sharma <asharma@qubole.com>
2020-09-03 15:00:19 +05:30
Kaxil Naik a1032805bc
Change the name of Static Check without pylint (#10690) 2020-09-03 10:13:35 +01:00
Diego Lopes 2f5bf8bc48
Update INTHEWILD.md (#10703) 2020-09-03 08:43:47 +02:00
Jarek Potiuk 4e09cb53ea
Add packages to function names in bash (#10670) (#10696)
Inspired by the Google Shell Guide where they mentioned
separating package names with :: I realized that this was
one of the missing pieces in the bash scripts of ours.

While we already had packages (in libraries folders)
it's been difficult to realise which function is where.

With introducing packages - equal to the library file name
we are *almost* at a level of a structured language - and
it's easier to find the functions if you are looking for them.

Way easier in fact.

Part of #10576

(cherry picked from commit cc551ba793)
(cherry picked from commit 2bba276f0f06a5981bdd7e4f0e7e5ca2fe84f063)
2020-09-02 21:58:37 +02:00
Jarek Potiuk 649ce4ba9d
Implement Google Shell Conventions for breeze script (#10695)
* Implement Google Shell Conventions for breeze script … (#10651)

Part of #10576

First (and the biggest of the series of commits to introduce
Google Shell Conventions in our bash scripts.

This is about the biggest and the most complex breeze script
so it is rather huge but it is difficult to split it into
smaller pieces.

The rules implemented (from the conventions):

 * constants and exported variables are CAPITALIZED, where
   local/temporary variables are lowercase

 * following the shell guide, once all the variables are set to their
   final values (either from exported variables, calculation or --switches
   ) I have a single function that makes all the variables read-only. That
   helped to clean-up a lot of places where same functions was called
   several times, or where variables were defined in a few places. Now the
   behavior should be rather consistent and we should easily catch some
   duplications

 * function headers (following the guide) explaining arguments,
   variables expected, variables modified in the functions used.

 * setting the variables as read-only also helped to clean-up the "ifs"
   where we often had ":=}" in variables and != "" or == "". Those are
   replaced with `=}` and tests are replaced with `-n` and `-z` - also
   following the shell guide (readonly helped to detect and clean all
   such cases). This also should be much more robust in the future.

 * reorganized initialization of those constants and variables - simplified
   a few places where initialization was overlapping. It should be much more
   straightforward and clean now

 * a number of internal function breeze variables are "local" - this is
   helpful in accidental variables overwriting and keeping stuff localized

 * trap_add function is separated out to help in cases where we had
   several traps handling the same signals.

(cherry picked from commit 46c8d6714c)
(cherry picked from commit c822fd7b4bf2a9c5a9bb3c6e783cbea9dac37246)

* fixup! Implement Google Shell Conventions for breeze script … (#10651)
2020-09-02 21:55:50 +02:00
Kaxil Naik e5785d4720
Chart: Flower deployment should use Flower image (#10701)
Co-authored-by: Steven Miller <sjmiller609@gmail.com>
2020-09-02 20:34:03 +01:00
Kamil Olszewski 48ce4bdac4
Fix missing dash in flag for statsd container (#10691)
Co-authored-by: Kamil Olszewski <kamil.olszewski@polidea.com>
2020-09-02 19:43:00 +01:00
Kaxil Naik 02b853b75e
Fix failing black test (#10697)
* Fix failing black test
2020-09-02 20:26:40 +02:00
Kaxil Naik 9a10f83ab0
Revert recent breeze changes (#10651 & #10670) (#10694)
* Revert "Add packages to function names in bash (#10670)"

This reverts commit cc551ba793.

* Revert "Implement Google Shell Conventions for breeze script … (#10651)"

This reverts commit 46c8d6714c.
2020-09-02 17:27:36 +01:00
Daniel Imberman 338b412c04
Add on_kill support for the KubernetesPodOperator (#10666)
This PR ensures that when a user kills a KubernetesPodOperator task
in the airflow UI, that the associated pod is also killed using the
on_kill method.
2020-09-02 07:48:29 -07:00
Kamil Breguła 0d9e421f16
Unify command names in CLI (#10669)
* Unify command names in CLI
2020-09-02 08:43:41 -04:00
Yannick Weiss 9108cb57a1
docs: They added support for celltags to Jupyter Lab (#9141) 2020-09-02 08:42:20 -04:00
Kamil Breguła 72b2be71b0
[AIRFLOW-XXX] Add task execution process on Celery Execution diagram (#6961) 2020-09-02 07:47:34 -04:00
Kaxil Naik 0d76b59c68
Remove redundant section from dev/README.md toc (#10689) 2020-09-02 11:39:38 +01:00
Nick 805781b024
Update INTHEWILD.md (#10683) 2020-09-02 00:10:38 +02:00
Ry Walker 50c9411cbf
Remove airflow-pr tool (#10675)
* Remove airflow-pr tool

* Add PyGithub back in

* Remove gitpython
2020-09-01 14:50:31 -04:00
Ry Walker 4c4a7a844a
Improve getting started section (#10680) 2020-09-01 14:06:45 -04:00
Ry Walker 8ac6f2989e
Fix format of install commands (#10676) 2020-09-01 19:20:19 +02:00
Eyal Zekaria 70f05ac677
Add `log_id` field to log lines on ES handler (#10411)
* Add `log_id` field to log lines on ES handler

* Add `offset` field to log lines on ES handler

it will be set to the epoch timestamp in nanoseconds (this will just be
used for ordering log lines when displayed in the webserver UI).

* Update UPDATING.md

With information regarding log_id and offset fields in JSON log lines written to stdout
2020-09-01 15:35:42 +02:00
Jarek Potiuk cc551ba793
Add packages to function names in bash (#10670)
Inspired by the Google Shell Guide where they mentioned
separating package names with :: I realized that this was
one of the missing pieces in the bash scripts of ours.

While we already had packages (in libraries folders)
it's been difficult to realise which function is where.

With introducing packages - equal to the library file name
we are *almost* at a level of a structured language - and
it's easier to find the functions if you are looking for them.

Way easier in fact.

Part of #10576
2020-09-01 13:40:06 +02:00
Michał Słowikowski 804548d58f
Add Dataprep operators (#10304)
Add DataprepGetJobGroupOperator and DataprepRunJobGroupOperator
for Dataprep service.

Co-authored-by: Tomek Urbaszek <tomasz.urbaszek@polidea.com>
2020-09-01 12:59:13 +02:00
Shoichi Kagawa f40ac9b151
Add placement_strategy option (#9444) 2020-09-01 01:50:08 +02:00
Jarek Potiuk 901ecf7959
Remove requirements from the project. (#10668)
The requirements are not needed any more. We replaced them
with a new, better "constraints" mechanism where constraints
are stored in a separate, orphaned branches in the repository
and they are automatically maintained by the CI process.

See more about our dependency management process here:

https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pinned-constraint-files
2020-08-31 16:36:35 -04:00
Kamil Breguła aff8c76a57
Add example on airflow users create --help (#10662) 2020-08-31 20:46:03 +02:00