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

637 Коммитов

Автор SHA1 Сообщение Дата
QP Hou ab07891466
Add missing x-openapi-router-controller to DAG Run endpoint (#9945) 2020-07-25 20:47:40 +02:00
zikun 458d7d4cb0
Fix CI: Fetch target only when source repo != target repo (#9962) 2020-07-24 10:09:18 +02:00
Kaxil Naik 4112723f80
Fix CI: Don't add & fetch remote if source branch == target branch (#9961) 2020-07-24 01:22:25 +02:00
Jarek Potiuk a9c871b47c
Clean up tmp directory when exiting from breeze shell (#9930)
Since we are mountign tmp dir now to inside container, some
of the remnants of what's going on inside remains after exit.
This is particularly bad if you are using tmux (some of the
directories remaining there prevent tmux from re-run)

This change cleans up /tmp directory on exit from Breeze command.
It does it from inside container so that we clean up all
root-owned files without sudo.
2020-07-22 19:54:35 +02:00
Jarek Potiuk 7b9e8e0950
Python base image version is retrieved in the right place (#9931)
When quick-fixing Python 3.8.4 error #9820 PYTHON_BASE_IMAGE_VERSION
variable was added but it was initialized too early in Breeze and
it took the default version of Python rather than the one chosen
by --python switch. This caused the generated requirements
(locally by Breeze only) to generate wrong set of requirements
and images built locally for different python versions were
based on default Python version, not the one chosen by --python
switch.
2020-07-22 15:58:39 +02:00
retornam c2db0dfeb1
More strict rules in mypy (#9705) (#9906)
Signed-off-by: Raymond Etornam <retornam@users.noreply.github.com>
2020-07-22 13:56:02 +02:00
Beni Ben zikry 24a951e8ed
Breeze / KinD - support earlier k8s versions, fix recreate and kubectl versioning (#9905) 2020-07-22 12:24:46 +02:00
QP Hou 040fb1db02
point go client mod path to new repo (#9922)
* point go client mod path to new repo
2020-07-22 09:56:55 +02:00
Tomek Urbaszek b823f8a2e8
Use pipe pylint result to sort -u for error deduplication (#9893)
Due to an pylint issue https://github.com/PyCQA/pylint/issues/3584
single error/warning is printed multiple times when using
pylint in multiprocessing mode
2020-07-21 18:46:36 +02:00
Jarek Potiuk de9eaeb434
Constraint files are now maintained automatically (#9889)
* Constraint files are now maintained automatically

* No need to generate requirements when setup.py changes
* requirements are kept in separate orphan branches not in main repo
* merges to master verify if latest requirements are working and
  push tested requirements to orphaned branches
* we keep history of requirement changes and can label them
  individually for each version (by constraint-1.10.n tag name)
* consistently changed all references to be 'constraints' not
  'requirements'
2020-07-20 14:36:03 +02:00
Alexander Sutcliffe 64929eeb70
Added "all" to allowed breeze integrations and tried to clarify on fail (#9872) 2020-07-18 07:38:02 +02:00
Alexander Sutcliffe cbfff65ec5
Fix check_integration pre-commit test (#9869) 2020-07-17 16:16:53 +02:00
Jarek Potiuk 496ed6f1b2
Reorganizing of CI tests (#9654)
* we come back to idea of having one CI workflow
* cancel and openapi are incorporated into that CI workflow
* cancel retrieves workflow id automatically (works for forks)
* static checks are now merged into one job
* less dependencies between jobs so that waiting is minimised
* better name for check if tests should be run
* separated out script for tests should be run check
2020-07-17 10:30:56 +02:00
Jarek Potiuk faec41ec9a
Group CI scripts in subdirectories (#9653)
Reviewed the scripts and removed some of the old unused ones.
2020-07-16 18:05:35 +02:00
Ash Berlin-Taylor e4790d58b2
Helm chart can now place arbitrary config settings in to airflow.cfg (#9816)
Rather than only allowing specific pre-determined config settings, this
change allows the user to place _any_ config setting they like in the
generated airflow.cfg, including overwriting the "generated defaults".

This providers a nicer interface for the users of the chart (even if the
could already set these via the env vars).
2020-07-16 14:33:07 +01:00
Jarek Potiuk 5805a36368
Fix SqlAlchemy-Flask failure with python 3.8.4 (#9821) 2020-07-14 21:28:42 +01:00
Jarek Potiuk 4636fc6ede
Python 3.8.4 release breaks our builds (#9820) 2020-07-14 18:15:12 +02:00
Jarek Potiuk 69f82e66af
For now cloud tools are not needed in CI (#9818)
Currently there is "unbound" variable error printed in CI logs
because of that.
2020-07-14 16:35:33 +02:00
QP Hou 98f06ea10c
Make airflow package type check compatible (#9791) 2020-07-14 08:47:09 +02:00
Kaxil Naik c353fed81a
Make airflow/migrations/env.py Pylint Compatible (#9670) 2020-07-08 12:14:51 +01:00
QP Hou 6c158853ae
generate go client from openapi spec (#9502)
* generate go client from openapi spec

* move openapi codegen to seperate workflow
2020-07-07 19:48:28 +02:00
Jarek Potiuk 44d4ae809c
Upgrade to latest pre-commit checks (#9686) 2020-07-06 11:37:22 +02:00
Kaxil Naik 2ed8883163
Fix typo in pre_commit_breeze_cmd_line.sh (#9682)
`genereate` -> `generate`
2020-07-06 08:55:04 +01:00
Kamil Breguła 444051d32c
Fix pylint issues in airflow/models/dagbag.py (#9666) 2020-07-05 22:45:14 +01:00
Aneesh Joseph d93555b863
Add git sync option and unit tests for the Helm chart (#9371)
* add git sync sidecars

* add a helm test

* add more tests

* allow users to provide git username and pass via  a k8s secrets

* set default values for airflow worker repository & tag

* change ci timeout

* fix link

* add credentials_secret to airflow.cfg configmap

* set GIT_SYNC_ADD_USER on kubernetes worker pods, set uid

* add fsGroup to webserver and kubernete workers

* move gitSync to dags.gitSync

* rename valueFields

* turn off git sync and dag persistence by default

* provide option to specify known_hosts

* add git-sync details into the chart documentation

* Update .gitignore

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

* make git sync max failures configurable

* Apply suggestions from code review

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

* add back requirements.lock

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2020-07-05 12:57:15 -07:00
Jarek Potiuk 7a328660b9
The fix_ownership works independently of backend choice (#9664)
The script failed on a "clean" installation if the image
required cleaning and the database was not started.
2020-07-05 21:44:29 +02:00
Kaxil Naik 78d0287ca7
Make airflow/logging_config.py Pylint Compatible (#9672) 2020-07-05 20:38:21 +01:00
Kaxil Naik e4529d18cd
Make airflow/models/kubernetes.py Pylint Compatible (#9673) 2020-07-05 20:16:54 +01:00
Kaxil Naik 5c895154ed
Make airflow/models/xcom.py Pylint Compatible (#9658) 2020-07-05 08:56:43 +02:00
Jarek Potiuk be6ed86ccd
Fixed failing Kubernetes tests after deny_all for experimental API (#9647)
The tests were broken by #9611
2020-07-03 21:28:43 +01:00
Jarek Potiuk 8bd15ef634
Switches to Helm Chart for Kubernetes tests (#9468)
The Kubernetes tests are now run using Helm chart
rather than the custom templates we used to have.

The Helm Chart uses locally build production image
so the tests are testing not only Airflow but also
Helm Chart and a Production image - all at the
same time. Later on we will add more tests
covering more functionalities of both Helm Chart
and Production Image. This is the first step to
get all of those bundle together and become
testable.

This change introduces also 'shell' sub-command
for Breeze's kind-cluster command and
EMBEDDED_DAGS build args for production image -
both of them useful to run the Kubernetes tests
more easily - without building two images
and with an easy-to-iterate-over-tests
shell command - which works without any
other development environment.

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: Daniel Imberman <daniel@astronomer.io>
2020-07-01 14:50:30 +02:00
Kamil Breguła bb2f3fed28
Raise exception on invalid type in pre_commit_yaml_to_cfg.py (#9577) 2020-06-29 23:22:40 +02:00
Jarek Potiuk 6aabd9a86e
More sensible docker caching strategy for Prod images (#9547)
Local caching is now default strategy when building
the Production image.

You can still change it to pulled - similar to CI builds
by providing the right build flag and this is what
is used in CI by default. The flags in Breeze are now updated
to be more eplanatory and friendly (build-cache-*) and a flag
for "disabled" cache option is added as well.

Also the Dockerfile and Dockerfile.ci files are not needed
any more in the docker context. They used to be needed when
we built the Kubernetes image in the container, but since
we are now using production image directly - we do not need
them any nmore.

Combining setting the default strategy to local and removing
the Dockerfile from the context has the nice effect that you
can iterate much faster on the Production image without
triggering rebuilds of half of the docker image
as soon as the Dockerfile changes.
2020-06-28 17:38:17 +02:00
Jarek Potiuk cf510a30fb
Make Production Dockerfile OpenShift-compatible (#9545)
OpenShift (and other Kubernetes platforms) often use the approach
that they start containers with random user and root group. This is
described in the https://docs.openshift.com/container-platform/3.7/creating_images/guidelines.html

All the files created by the "airflow" user are now belonging to
'root' group and the root group has the same access to those
files as the Airflow user.

Additionally, the random user gets automatically added
/etc/passwd entry which is name 'default'. The name of the user
can be set by setting the USER_NAME variable when starting the
container.

Closes #9248
Closes #8706
2020-06-27 14:29:55 +02:00
Felix Uellendall 097180b1fd
Remove redundant code from breeze initialization (#9375) 2020-06-22 19:36:44 +02:00
Kamil Breguła 7256f4caa2
Pylint fixes and deprecation of rare used methods in Connection (#9419) 2020-06-22 13:38:07 +02:00
Kaxil Naik 57b495caa4
Add PyDocstyle Precommit Hook (#9456) 2020-06-21 09:34:41 +01:00
Kaxil Naik a50e112f6b
Make airflow/models/base.py Pylint Compatible (#9442) 2020-06-20 16:49:44 +01:00
Omar Iglesk a450900cb9
Add options to extend list of sensitive keywords (#9397) 2020-06-20 14:49:31 +02:00
Kamil Breguła 6b1f7b4568
Fix pylint issue in some airflow/www/* files (#9421) 2020-06-20 10:46:50 +02:00
Kaxil Naik be667d0f3b
Make airflow/models/pool.py Pylint compatible (#9423) 2020-06-20 10:39:59 +02:00
Kaxil Naik a87575fe34
Make airflow/models/variable.py Pylint compatible (#9422) 2020-06-20 02:48:35 +01:00
Jarek Potiuk c7e5bce57f
Prepare backport release candidate for 2020.6.23rc1 (#9370)
* Prepare backport release candidate for 2020.6.23rc1

* fixup! Prepare backport release candidate for 2020.6.23rc1

* fixup! fixup! Prepare backport release candidate for 2020.6.23rc1
2020-06-19 10:07:06 +02:00
Jarek Potiuk ca88151887
Fix in-breeze CLI tools to work also on Linux (#9376)
Instead of creating the links in the image (which did not work)
the links are created now at the entry to the breeze image.
The wrappers were not installed via Dockerfile and the ownership
fixing did not work on Linux
2020-06-19 08:58:32 +02:00
Jarek Potiuk 6484dea15b
Fixes Breeze 'tests' command (#9384)
Fixes the 'tests' command allows to run individual tests immediately
from the host without entering the container. It's been broken
in 7c12a9d4e0
2020-06-18 21:59:52 +02:00
Kamil Breguła 6a9c436f6f
Move out metastore_browser from airflow.contrib (#9341) 2020-06-17 21:52:23 +02:00
Jarek Potiuk f6bd817a3a
Introduce 'transfers' packages (#9320)
* Consistent naming of transfer operators

Transfer operators have consistent names and are grouped in
the 'transfer' packages.

* fixup! Consistent naming of transfer operators

* Introduces 'transfers' packages.

Closes #9161 and #8620

* fixup! Introduces 'transfers' packages.

* fixup! fixup! Introduces 'transfers' packages.

* fixup! fixup! fixup! Introduces 'transfers' packages.
2020-06-16 22:55:42 +02:00
Jarek Potiuk 7c12a9d4e0
Improve production image iteration speed (#9162)
For a long time the way how entrypoint worked in ci scripts
was wrong. The way it worked was convoluted and short of black
magic. This did not allow to pass multiple test targets and
required separate execute command scripts in Breeze.

This is all now straightened out and both production and
CI image are always using the right entrypoint by default
and we can simply pass parameters to the image as usual without
escaping strings.

This also allowed to remove some breeze commands and
change names of several flags in Breeze to make them more
meaningful.

Both CI and PROD image have now embedded scripts for log
cleaning.

History of image releases is added for 1.10.10-*
alpha quality images.
2020-06-16 12:36:46 +02:00
Jarek Potiuk 696e74594f
Fix broken CI image optimisation (#9313)
The commit 5918efc86a broke
optimisation of the CI image - using the Apache Airflow
master branch as a base package installation source from PyPI.

This commit restores it including removal of the
obsolete CI_OPTIMISED arg - as now we have a separate
production and CI image and CI image is by default
CI_OPTIMISED
2020-06-16 00:38:55 +01:00
Daniel Imberman 8b0073d8fb
Get all pod logs on k8s launching failure (#9317)
Co-authored-by: Daniel Imberman <daniel@astronomer.io>
2020-06-15 10:29:28 -07:00