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

80 Коммитов

Автор SHA1 Сообщение Дата
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
Beni Ben zikry 24a951e8ed
Breeze / KinD - support earlier k8s versions, fix recreate and kubectl versioning (#9905) 2020-07-22 12:24:46 +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
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
Jarek Potiuk 4636fc6ede
Python 3.8.4 release breaks our builds (#9820) 2020-07-14 18:15:12 +02:00
Jarek Potiuk 5a9ce33660
More robust and re-runnable autocomplete setup in Breeze (#9685)
* More robust and re-runnable autocomplete setup in Breeze

* Update breeze

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

Co-authored-by: Tomek Urbaszek <turbaszek@gmail.com>
2020-07-06 12:14:11 +02: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
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 7078c1b6fa
Fixes pushing prod image directly from breeze (#9449) 2020-06-20 21:04:14 +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
Jarek Potiuk 2fc13f0068
Fixes unbound variable on MacOS (#9335)
Closes #9334
2020-06-16 20:25:24 +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
zikun 0682e784b1
Additional apt dependencies options in breeze (#9231) 2020-06-11 18:53:26 +02:00
Jarek Potiuk de9d3401f9
Improved cloud tool available in the trimmed down CI container (#9167)
* Improved cloud tool available in the trimmed down CI container

The tools now have shebangs which make them available for
python tools. Also /opt/airflow is now mounted from the
host Airflow sources which makes it possible for the tools to
copy files directly to/from the sources of Airflow.

It also contains one small change for Linux users - the files
created by docker gcloud are created with root user so in order to fix
that the directories mounted from the host are fixed when you exit
the tool - their ownership is changed to be owned by the host user
2020-06-09 09:33:16 +02:00
James Timmins 5918efc86a
Add 3.8 to the test matrices (#8836) 2020-06-05 18:39:28 +01:00
Jarek Potiuk 92d68807f3
Split utils sh (#9132)
* Split _utils.sh into separate files
2020-06-04 22:12:56 +02:00
Jarek Potiuk da748d0251
Remove remnant kubernetes stuff from breeze scripts (#9138) 2020-06-04 15:08:54 +02:00
Tomek Urbaszek 1fe804a30a
Fix INTEGRATIONS[*]: unbound variable error in breeze (#9135) 2020-06-04 11:44:26 +02:00
Jarek Potiuk d6b954d472
Fixes a bug where `build-image` command did not calculate md5 (#9130)
Even if image was rebuilt, the md5 files were not updated
2020-06-04 10:00:14 +02:00
Jarek Potiuk ff5dcccbbd
Kubernetes Cluster is started on host not in the container (#8265)
Tests requiring Kubernetes Cluster are now moved out of
the regular CI tests and moved to "kubernetes_tests" folder
so that they can be run entirely on host without having
the CI image built at all. They use production image
to run the tests on KinD cluster and we add tooling
to start/stop/deploy the application to the KinD cluster
automatically - for both CI testing and local development.

This is a pre-requisite to convert the tests to convert the
tests to use the official Helm Chart and Docker images or
Apache Airflow.

It closes #8782
2020-06-03 20:58:38 +02:00
Jarek Potiuk a6216a760c
You can push with Breeze as separate command and to cache (#8976)
Breeze had --push-images switch to also push images to repo
but it was often needed to build and push images separately.

We have now a possibility to push an already built image with
separate push-image command instead and also you can choose
to push to cache registry in GitHub rather than to DockerHub
with --registry-cache switch.
2020-06-02 10:24:47 +02:00
Ash Berlin-Taylor 3dd81b7af1
Don't reuse MY_DIR in breeze to mean different folder from ci/_utils.sh (#9098)
scripts/ci/*.sh uses MY_DIR to mean scripts/ci, but in `breeze` MY_DIR
is the same as AIRFLOW_SOURCES. When jumping back-and-forth between
ci/_utils.sh, breeze, and ci/ci_*.sh it can be confusing to keep track
of what is what.

This changes `breeze` to use `AIRFLOW_SOURCES` to referrer to the top
level folder instead -- that means I don't have to keep as much context
in my head
2020-06-02 08:39:42 +02:00
Jarek Potiuk 738667082d
Additional python extras and deps can be set in breeze (#9035)
Closes #8604
Closes #8866
2020-05-27 17:09:11 +02:00
Jarek Potiuk 00642a46d0
Fixed name of 20 remaining wrongly named operators. (#8994) 2020-05-26 19:12:21 +02:00
Jarek Potiuk 375d1ca229
Release candidate 2 for backport packages 2020.05.20 (#8898)
Release candidate 2 for backport packages 2020.05.20
2020-05-19 14:17:22 +02:00
Jarek Potiuk 92585ca4cb
Added automated release notes generation for backport operators (#8807)
We have now mechanism to keep release notes updated for the
backport operators in an automated way.

It really nicely generates all the necessary information:

* summary of requirements for each backport package
* list of dependencies (including extras to install them) when package
  depends on other providers packages
* table of new hooks/operators/sensors/protocols/secrets
* table of moved hooks/operators/sensors/protocols/secrets with
  information where they were moved from
* changelog of all the changes to the provider package (this will be
  automatically updated with incremental changelog whenever we decide to
  release separate packages.

The system is fully automated - we will be able to produce release notes
automatically (per-package) whenever we decide to release new version of
the package in the future.
2020-05-15 19:00:15 +02:00
Jarek Potiuk d5c4001f8d
Useful help information in test-target and docker-compose commands (#8796)
There was no useful information printed in test-target and
docker-compose commands. It's fixed now
2020-05-11 11:58:25 +02:00
Jarek Potiuk 9bb91ef991
Add comments to breeze scripts (#8797) 2020-05-10 19:55:40 +02:00
Jarek Potiuk 100f530ed5
Fixed test-target command (#8795)
Wrong parameter sequence were passed to the run script.
2020-05-10 00:34:52 +08:00
Jarek Potiuk 34074ba3e5
Fix building image manifest (was removed by accident with prod img) (#8408) 2020-04-16 19:21:22 +02:00
Felix Uellendall cf6c254ebd
Expose Airflow Webserver Port in Production Docker Image (#8228) 2020-04-15 13:05:02 +02:00
Jarek Potiuk 62a0396ddc
Help for breeze commands contain relevant flags. (#8261)
* Help for breeze commands contain relevant flags.

* fixup! Help for breeze commands contain relevant flags.

* fixup! fixup! Help for breeze commands contain relevant flags.
2020-04-13 08:51:33 +02:00
Jarek Potiuk 82a8985242
Proper version is displayed when running prod image via Breeze (#8229) 2020-04-11 11:37:06 +02:00
Jarek Potiuk 07fd0d71c8
Add Production Docker image support (#7832) 2020-04-02 18:52:11 +01:00
Jarek Potiuk 88bfd37cc0
Install version is not persistent in breeze (#7914) 2020-03-28 11:03:52 +01:00
Jarek Potiuk 3fb5f1568c
Requirements now depend on python version (#7841) 2020-03-27 15:27:53 +01:00
Jarek Potiuk 75348177a1
Change name of the common environment initialization function (#7805) 2020-03-22 18:24:53 +01:00
Jarek Potiuk 8c5638832f
[AIRFLOW-7067] Pinned version of Apache Airflow (#7730) 2020-03-22 13:34:48 +01:00
Jarek Potiuk 271ee6477b
[AIRFLOW-7058] Add support for different DB versions (#7717) 2020-03-14 23:57:47 +01:00
Jarek Potiuk a86924f0e0
[AIRFLOW-7054] Breeze has an option now to reset db at entry (#7710) 2020-03-13 16:08:16 +01:00
Jarek Potiuk 6cc9d817fa
[AIRFLOW-7013] Automated check if Breeze image needs to be pulled (#7656) 2020-03-12 09:48:24 +01:00
Jarek Potiuk cad20c28da
[AIRFLOW-5842] Swtch to Debian buster image as a base (#7647) 2020-03-07 20:20:05 +01:00
Jarek Potiuk 265282cf6b
[AIRFLOW-7005] Added exec command to Breeze (#7649) 2020-03-07 20:18:51 +01:00
Jarek Potiuk d18513ceb1
[AIRFLOW-5828] Move build logic out from hooks/build (#7618)
This is the final step of simplifying the Breeze scripts by
moving all the logic out from Travis' hooks/build
2020-03-07 16:09:06 +01:00
Kamil Breguła a6e5bcd591
[AIRFLOW-6972] Shorter frequently used commands in Breeze (#7608) 2020-03-04 01:21:11 +01:00
Jiajie Zhong 2bae095744
[AIRFLOW-6979] Fix breeze test-target specific test param issue (#7614) 2020-03-03 19:05:16 +01:00
Jarek Potiuk d0d8732a84
[AIRFLOW-6932] Add restart-environment command to Breeze (#7557)
When you switch between versions of Aiflow installed, you want to delete the
database so that the scripts for resetdb work
2020-02-27 10:44:43 +01:00
Ben Anderson 206fc36b83
[AIRFLOW-XXXX] Fix typo in BREEZE.rst (#7556)
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
2020-02-26 22:47:20 +00:00