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

11268 Коммитов

Автор SHA1 Сообщение Дата
Ash Berlin-Taylor 252b04718e
Configuration.getsection copes with sections that only exist in user config (#12816)
If you try to run `airflow config list` with an old config you upgraded
from 1.8, it would fail for any sections that have been removed from the
default cofing -- `ldap` for instance.

This would also be a problem if the user makes a typo in a config
section, or is using the airflow config for storing their own
information.

While I was changing this code, I also removed the use of private
methods/variable access in favour of public API
2020-12-05 07:16:47 +01:00
Xiaodong DENG fbb8a4a151
Cleanup & improvements around scheduling (#12815)
* Cleanup & improvement around scheduling

- Remove unneeded code line
- Remove stale docstring
- Fix wrong docstring
- Fix stale doc image link in docstring
- avoid unnecessary loop in DagRun.schedule_tis()
- Minor improvement on DAG.deactivate_stale_dags()
  which is invoked inside SchedulerJob

* Revert one change, because we plan to have a dedicated project-wise PR for this issue

* One more fix: dagbag.read_dags_from_db = True in DagFileProcess.process_file() is not needed anymore
2020-12-05 07:12:59 +01:00
Sam Wheating c85f49454d
Updating documentation to specify sensitive config options (#12820) 2020-12-05 07:00:18 +01:00
Daniel Imberman e82cf0d01d
Dagrun object doesn't exist in the TriggerDagRunOperator (#12819)
* Dagrun object doesn't exist in the TriggerDagRunOperator

fixes  https://github.com/apache/airflow/issues/12587

Fixes issue where dag_run object is not populated if the dag_run already
exists and is reset

* change to get_last_dag_run

* Update airflow/operators/dagrun_operator.py

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

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Tomek Urbaszek <turbaszek@gmail.com>
2020-12-04 20:10:45 -08:00
zclimes c1cd50465c
Add 'headers' to template_fields in HttpSensor (#12809)
Co-authored-by: Zachary Climes <zclimes@zclimes-DCH2.com>

closes: #12796
2020-12-05 00:59:52 +00:00
Sam Wheating 37afe55775
Fix paths to images in README.md (#12756) 2020-12-04 22:07:53 +01:00
Kamil Breguła 70b1cc2cfc
Move secret backends guides to provider docs (#12798) 2020-12-04 21:58:36 +01:00
Kamil Breguła 71d874515a
Add expandable groups in the docs build log (#12799) 2020-12-04 21:51:22 +01:00
Ash Berlin-Taylor 2936c13a44
Get airflow version from importlib.metadata rather than hard-coding (#12786)
One less thing to change, and one less pre-commit step needed :)
2020-12-04 16:42:25 +00:00
Kamil Breguła 6878a7baad
Add more json-schama checks + display all errors (#12805) 2020-12-04 16:51:59 +01:00
Siddartha Ravichandran 88aa174047
Add SMTP timeout and retry limit for SMTP email backend. (#12801) 2020-12-04 16:20:39 +01:00
Tomek Urbaszek 1bd98cd54c
Improve error handling in cli and introduce consistency (#12764)
This PR is a followup after #12375 and #12704 it improves handling
of some errors in cli commands to avoid show users to much traceback
and uses SystemExit consistently.
2020-12-04 10:41:41 +01:00
James Timmins abf5104354
Convert state arguments to ExternalTaskSensor to list (#12794)
Without this if you pass a tuple or a set etc things would break.
2020-12-04 09:30:03 +00:00
Kamil Breguła fa4fc37b96
Artifacts in Github Action have a short retention period (#12793) 2020-12-04 08:37:38 +01:00
Sam Wheating 292118e339
Add documentation on AIRFLOW__{SECTION}__{KEY}_SECRET config (#12797)
closes #12774
2020-12-04 00:58:17 +00:00
Xiaodong DENG 4da94b5a19
Clean noqa labels wrongly handled by black linter (#12791) 2020-12-03 22:42:15 +01:00
Xiaodong DENG 6b339c70c4
Avoid log spam & have more meaningful log when pull image in DockerOperator (#12763)
Fixing issue reported in https://github.com/apache/airflow/issues/12576

This change actually also makes the log more meaningful

Co-authored-by: Tomek Urbaszek <turbaszek@gmail.com>
2020-12-03 22:36:25 +01:00
Ryan Hamilton 28e83c30eb
Prevent unused scrollbars from appearing in FF on Linux (#12795) 2020-12-03 15:53:04 -05:00
宋财礼 d9d6dafb18
Fix the exception that the port is empty when using db shell (#12740)
* Fix the exception that the port is empty when using db shell
2020-12-03 19:19:26 +01:00
Kaxil Naik be7d867459
BugFix: Editing a DAG run or Task Instance on UI causes an Error (#12770)
closes https://github.com/apache/airflow/issues/12489
2020-12-03 17:53:59 +00:00
Ephraim Anierobi b62abfbfae
Handle ParserError when dag is triggered with invalid execution_date (#12618) 2020-12-03 17:04:14 +01:00
Tomek Urbaszek 56f82ba225
Change DEBUG color to green in coloured logger (#12784)
In this way it's easier to see difference between debug and error.
2020-12-03 16:07:43 +01:00
Kaxil Naik 8f48f12128
Fix typo in airflow/serialization/serialized_objects.py (#12767)
"Cnn't load plugins" -> "Can not load plugins"
2020-12-03 06:54:59 +01:00
James Timmins 386f6b2ecb
Refactor and speed up "DAG:" prefix permissions migration (#12720) 2020-12-02 20:57:00 +00:00
Tomek Urbaszek 67acdbdf92
Remove store_serialized_dags from config (#12754)
The store_serialized_dags is no longer used in our code base as
both webserver and scheduler require serialization.
2020-12-02 18:18:48 +01:00
Kaxil Naik 0400ee32d4
Allow using _CMD / _SECRET to set `[webserver] secret_key` config (#12742)
`[webserver] secret_key` is also a secret like Fernet key. Allowing
it to be set via _CMD or _SECRET allows users to use the external secret store for it.
2020-12-02 14:39:26 +00:00
Darwin Yip 2947e09999
SlackWebhookHook use password instead of extra (#12674)
closes: #12214
2020-12-02 14:09:28 +00:00
Danny 03fa6edc7a
Order broken DAG messages in UI (#12749) 2020-12-02 13:37:59 +00:00
Kaxil Naik 101da213c5
Optimize subclasses of DummyOperator for Scheduling (#12745)
Custom operators inheriting from DummyOperator will now instead
 of going to a scheduled state will go set straight to success
 if they don't have callbacks set.

 closes https://github.com/apache/airflow/issues/11393
2020-12-02 12:49:17 +00:00
Ash Berlin-Taylor dab783fcdc
Don't let webserver run with dangerous config (#12747) 2020-12-02 10:55:22 +00:00
Tomek Urbaszek cba8d62553
Refactor list rendering in commands (#12704)
This commit unifies the mechanism of rendering output of tabular
data. This gives users a possibility to eiter display a tabular
representation of data or render it as valid json or yaml payload.

Closes: #12699

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
2020-12-02 10:20:16 +01:00
Xiaodong DENG ae0e8f4732
Move config item 'worker_precheck' from section [core] to [celery] (#12746)
* Move config item 'worker_precheck' from section [core] to [celery]

This configuration is ONLY applicable for Celery Worker.
So it should be in section [celery], rather than [core]

* Add to deprecation/migration automatic list
2020-12-02 07:47:02 +01:00
Shivansh Saini da2a7d6b33
Added Headout to INTHEWILD (#12734)
Signed-off-by: Shivansh Saini <shivanshs9@gmail.com>
2020-12-01 19:21:48 +00:00
Florent Chehab a697c588c4
Fix chart jobs delete policy for improved idempotency (#12646)
The chart has two jobs (migrate-database & create-user).
These jobs are run post-install and post-upgrade and only deleted on success.

So if for some reason (quick reinstall / upgrade), the job fails or is stuck then helm
will fail because the job already exists.

This commit sets the `helm.sh/hook-delete-policy` to `before-hook-creation,hook-succeeded`
so helm will always delete the jobs before creating them again.
2020-12-01 19:24:42 +01:00
Jarek Potiuk a02e0f746f
User-friendly output of Breeze and CI scripts (#12735) 2020-12-01 17:44:05 +01:00
Jarek Potiuk 0451d84ea2
Pins PIP to 20.2.4 in our Dockerfiles (#12738)
Until we make sure that the new resolver in PIP 20.3 works
we should pin PIP to 20.2.4.

This is hopefully a temporary measure.

Part of #12737
2020-12-01 17:39:55 +01:00
Kaxil Naik ac3a8bfb0c
Allow switching xcom_pickling to JSON/Pickle (#12724)
Without this commit, the Webserver throws an error when
enabling xcom_pickling in the airflow_config by setting `enable_xcom_pickling = True`
(the default is `False`).

Example error:

```
>           return pickle.loads(result.value)
E           _pickle.UnpicklingError: invalid load key, '{'.

airflow/models/xcom.py:250: UnpicklingError
--------------------------------------------------
```
2020-12-01 11:35:34 +00:00
Kamil Breguła 027fd743d6
Fix static checks - #12715 (#12729) 2020-12-01 11:10:54 +00:00
Ry Walker 91c22032b9
Stronger language re: SQLite (#12727) 2020-12-01 10:01:07 +01:00
Jarek Potiuk ebc8fcf199
Improve verification of images with PIP check (#12718)
Verification of images with PIP is done in separate jobs and
they provide useful information to committers and contributors
when the pip check fails.
2020-12-01 09:51:24 +01:00
Jarek Potiuk e4cb0ef192
Output of installing remaining packages is shown also on success (#12723)
Previously the output of instaling remaining packges when testing
provider imports was only shown on error. However it is useful
to know what's going on even if it clutters the log.

Note that this installation is only needed until we include
apache-beam in the installed packages on CI.

Related to #12703

This PR shows the output always .
2020-12-01 09:51:05 +01:00
Kamil Breguła 42f0a3d628
Move apache-airflow docs to subdirectory (#12715) 2020-12-01 02:14:20 +01:00
Mutlu Polatcan dee304b222
Add Getir to in the wild! (#12719)
* Add Getir to in the wild!

* hotfix - Add Getir to in the wild
2020-11-30 18:29:53 +01:00
HasanJ 4ac66cf8c4
Deprecate BaseHook.get_connections method (#10135) (#10192)
Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
2020-11-30 16:29:30 +00:00
Ash Berlin-Taylor 5e13c37286
Remove deprecated dagbag metrics (#12695)
These were deprecated in 1.10.6 via #6157, so we should remove them
before 2.0 rolls around.
2020-11-30 09:14:15 +00:00
Kamil Breguła bd90136aaf
Move operator guides to provider documentation packages (#12681) 2020-11-30 08:48:24 +01:00
Xiaodong DENG bb00f164da
Refine the DB query logics in www.views.task_stats() (#12707)
* Refine the DB query logics in www.views.task_stats()

- given filter_dag_ids is either allowed_dag_ids, or intersection of allowed_dag_ids and selected_dag_ids,
  no matter if selected_dag_ids is None or not, filter_dag_ids should ALWAYS be considered into the SQL query.

  Currently, if selected_dag_ids is None, the query is actually getting the full result (then 'filter' at the end).
  This means more (unnecessary) data travel between Airflow and DB.

- When we join table A and B with A.id == B.id (default is INNER join), if we always confirm ALL A.id is in a specific list,
  implicitly ALL ids in the result table are already guaranteed in this specific list as well.
  This is why the two redundant .filter() chunks are removed.

Minor performance improvement should be expected.
Meanwhile, this change makes the code cleaner.
2020-11-29 22:22:38 +01:00
raphaelauv e57de8c758
Remove now-incorrect warning about pools and multiple schedulers (#12709)
Reverts #7643 now it's not true anymore after Scheduler HA has landed
2020-11-29 20:51:21 +00:00
Jarek Potiuk 7e426d3f47
Improve wording of selective checks comments (#12701) 2020-11-29 18:27:09 +01:00
Jarek Potiuk 2037303eef
Adds support for Connection/Hook discovery from providers (#12466)
* Adds support for Hook discovery from providers

This PR extends providers discovery with the mechanism
of retrieving mapping of connections from type to hook.

Fixes #12456

* fixup! Adds support for Hook discovery from providers

* fixup! fixup! Adds support for Hook discovery from providers
2020-11-29 15:31:49 +01:00