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

28 Коммитов

Автор SHA1 Сообщение Дата
Jarek Potiuk 20b6b34392
[AIRFLOW-6838] Introduce real subcommands for Breeze (#7515)
This change introduces sub-commands in breeze tool.
It is much needed as we have many commands now
and it was difficult to separate commands from flags.

Also --help output was very long and unreadable.

With this change help it is much easier to discover
what breeze can do for you as well as navigate with it.

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

Co-authored-by: Kamil Breguła <mik-laj@users.noreply.github.com>
2020-02-24 22:31:50 +01:00
Kaxil Naik 9e63fec0c9
[AIRFLOW-XXXX] Remove duplicate line from breeze (#7491) 2020-02-22 06:54:18 +01:00
Jarek Potiuk 848fbab5bd
[AIRFLOW-6763] Make systems tests ready for backport tests (#7389)
We will run system test on back-ported operators for 1.10* series of airflow
and for that we need to have support for running system tests using pytest's
markers and reading environment variables passed from HOST machine (to pass
credentials). 

This is the first step to automate system tests execution.
2020-02-21 18:25:32 +01:00
Jarek Potiuk 6502cfa8e6
[AIRFLOW-6866] Fix wrong export for Mac on Breeze (#7485) 2020-02-21 16:13:01 +00:00
Jarek Potiuk ae69475522
[AIRFLOW-6841] Fixed unbounded variable on Mac (#7465) 2020-02-19 17:35:15 +01:00
Jarek Potiuk 24f9f11775
[AIRFLOW-6820] split breeze into functions (#7433) 2020-02-19 01:58:53 +01:00
Jarek Potiuk ff7034f39a
[AIRFLOW-6816] Simplified common functions in breeze scripts (#7430) 2020-02-16 20:05:50 +01:00
Jarek Potiuk 53ba6d607c
[AIRFLOW-6764] Fixed environment installation for Linux (#7390) 2020-02-10 13:36:12 +01:00
Jarek Potiuk 92d6e4a16f [AIRFLOW-6607] Get rid of old local scripts for Breeze (#7225)
Breeze is now mature enought to remove old scripts that were
doing the same what Breeze does now with command line.
2020-01-21 11:42:45 +01:00
Jarek Potiuk c27f7e234b
[AIRFLOW-6489] Separate integrations in tests (#7091)
You can now choose which integration you want to start when you run
Breeze as well as when CI tests are run. Now by default Breeze
and CI runs without integrations, but you can add them via
Breeze flags or by environment variables when CI is executed.

We have pytest markers now that mark tests that can be run for
integration, backend and runtime selected.

Also we have now more test jobs - we have separate test run
for all non-integration tests (with less memory used by the
integrations) and separate jobs that run integration tests
only (more memory used for integrations but far less number
of tests to run)
2020-01-13 20:47:37 +01:00
Jarek Potiuk 73403cc8f4
[AIRFLOW-5704] Improve Kind Kubernetes scripts for local testing (#6516)
* Fixed problem that Kubernetes tests were testing latest master
  rather than what came from the local sources.
* Kind (Kubernetes in Dcocker) is run in the same Docker as Breeze env
* Moved Kubernetes scripts to 'in_container' dir where they belong now
* Kubernetes cluster is reused until it is stopped
* Kubernetes image is build from image in docker already + mounted sources
* Kubectl version name is corrected in the Dockerfile
* KUBERNETES_VERSION can now be used to select Kubernetes version
* Running kubernetes scripts is now easy in Breeze
* We can start/recreate/stop cluster using  --<ACTION>-kind-cluster
* Instructions on how to run Kubernetes tests are updated
* The old "bare" environment is replaced by --no-deps switch
2020-01-11 16:25:19 +01:00
Jarek Potiuk a76df6e191
[AIRFLOW-6491] Improve handling of Breeze parameters (#7084)
While working on improving the way we run Kubernetes tests, we found out that I
need to fix handling of parameters - we change Kubernetes version used via Kind
and the old versions are no longer valid, however it was not properly
removed/saved.

We use the opportunity to add automated tests for that feature.

(cherry picked from commit 38dea9132d1fa36f4fbe871e2ab037be5ad3fab2)
2020-01-07 20:38:24 +01:00
Xinbin Huang 6ddb6b0042 [AIRFLOW-XXXX] Fix typos and broken links in development docs (#7086) 2020-01-07 00:08:12 +01:00
Tomek e61025e1ac [AIRFLOW-6058] Running tests with pytest (#6472)
This commit runs Airflow's test suite using pytest.
2019-12-05 10:40:28 +01:00
Jarek Potiuk 1b3af10246 Revert "[AIRFLOW-5704] Improve Kind Kubernetes scripts for local testing (#6496)"
This reverts commit 8e789a33a3.
2019-11-07 13:36:05 +01:00
Jarek Potiuk 8e789a33a3
[AIRFLOW-5704] Improve Kind Kubernetes scripts for local testing (#6496)
* [AIRFLOW-5704] Improve Kind Kubernetes scripts for local testing

* Fixed problem that Kubernetes tests were testing latest master
  rather than what came from the local sources.
* Moved Kubernetes scripts to 'in_container' dir where they belong now
* Kubernetes tests are now better suited for running locally
* Kubernetes cluster is not deleted until environment is stopped
* Kubernetes image is built outside of the container and passed as .tar
* Kubectl version name is corrected in the Dockerfile
* Kubernetes Version can be used to select Kubernetes versio
* Running kubernetes scripts is now easy in Breeze
* Instructions on how to run Kubernetes tests are updated
* Better flags in Breeze are used to run Kubernetes environment/tests
* The old "bare" environment is replaced by --no-deps switch
2019-11-06 17:25:11 +01:00
Jarek Potiuk d4ff529743
[AIRFLOW-5829] Get rid of the checklicence image (#6495)
This change is a further step of simplifying the set of scripts
used by CI. The separate checklicence image was implemented as an
optimisation of the licence check time. The image to download was
small and could be downloaded slightly faster in CI. However that
made all the management script more complex and lead to having
separate jobs for check licence and static checks. That lead to
actually longer time of Travis jobs - because new machine had to
be spun-off for checklicence check only.

With this change, the CI image is the only one left and it is slightly
bigger (with RAT tool added) but the same image is used for all the
tests - unit tests, static checks and checklicence checks.

This also makes it easier to manage the images and decreases update
overhead on the developers using Breeze.
2019-11-06 10:31:20 +01:00
Jarek Potiuk b4c7538b86
[AIRFLOW-5830] Get rid of slim image (#6494)
The slim image gave only very small gain on executing the tests in CI. The
image was significantly smaller, but then for local development and testing
you needed both full CI and SLIM-CI image.

This made the scripts and docker image needlessly complex - especially
in the wake of coming Production image it turned to be premature
optimisation really. While it sped-up (slightly - by 10-20 seconds) some
static check jobs in Travis, it increased time needed by developers
to have a working environment and to keep it updated every time it was
needed (by minutes)

Also having two separately managed images made it rather complex to join
some of the Travis CI jobs (there is a follow-up change with getting rid
of Checklicence image).

With this change both static checks and tests are executed using single
image. That also opens doors for further simplification of the scripts
and easier implementation of production image.
2019-11-05 22:30:00 +01:00
Kaxil Naik 036c2924ba [AIRFLOW-XXX] FIX typo in Breeze.rst (#6477) 2019-10-31 07:58:39 +01:00
Jarek Potiuk ba01ed538f
[AIRFLOW-5750] Licence check is done also for non-executable .sh (#6425) 2019-10-25 09:54:36 +02:00
mucio d5dc1e2632 [AIRFLOW-5747] `real_prefix misses the virtual env created with pyenv and venv (#6417) 2019-10-24 20:05:15 +02:00
Jarek Potiuk f8794d888f
[AIRFLOW-5684] docker-compose-kubernetes still used (#6353) 2019-10-17 14:54:19 +02:00
Jarek Potiuk 857788e305
[AIRFLOW-5369] Adds interactivity to pre-commits (#5976)
This commit adds full interactivity to pre-commits. Whenever you run pre-commit
and it detects that the image should be rebuild, an interactive question will
pop up instead of failing the build and asking to rebuild with REBUILD=yes

This is much nicer from the user perspective. You can choose whether to:
1) Rebuild the image (which will take some time)
2) Not rebuild the image (this will use the old image with hope it's OK)
3) Quit.

Answer to that question is carried across all images needed to rebuild.
There is the special "build" pre-commit hook that takes care about that.

Note that this interactive question cannot be asked if you run only
single pre-commit hook with Dockerfile because it can run multiple processes
and you can start building in parallel. This is not desired so instead we fail
such builds.
2019-09-18 13:43:30 +02:00
Jarek Potiuk 455eb41ba6
[AIRFLOW-5437] Better python version detection/explanation. (#6060)
We have fairly complex python version detection in our CI scripts.

They have to handle several cases:

1) Running builds on DockerHub (we cannot pass different environment
   variables there, so we detect python version based on the image
   name being build (airflow:master-python3.7 -> PYTHON_VERSION=3.7)

2) Running builds on Travis CI. We use python version determined
   from default python3 version available on the path. This way we
   do not have to specify PYTHON_VERSION separately in each job,
   we just specify which host python version is used for that job.
   This makes a nice UI experience where you see python version in
   Travis UI.

3) Running builds locally via scripts where we can pass PYTHON_VERSION
   as environment variable.

4) Running builds locally for the first time with Breeze. By default
   we determine the version based on default python3 version we have
   in the host system (3.5, 3.6 or 3.7) and we use this one.

5) Selecting python version with Breeze's --python switch. This will
   override python version but it will also store the last used version
   of python in .build directory so that it is automatically used next
   time.

This change adds necessary explanations to the code that works for
all the cases and fixes some of the edge-cases we had. It also
extracts the code to common directory.
2019-09-10 10:16:10 +02:00
Jarek Potiuk 593dfb9134 [AIRFLOW-5364] Fix missing port numbers for local ci scripts 2019-08-31 09:49:26 -04:00
Jarek Potiuk 572465e020 [AIRFLOW-5363] Fixed building docs in breeze 2019-08-31 07:47:10 -04:00
Jarek Potiuk f98867c3a8 [AIRFLOW-5329] Added shared files folder 2019-08-28 04:14:55 -04:00
Jarek Potiuk 286aa7a581
[AIRFLOW-3611] Simplified development environment (#4932) 2019-08-27 14:39:36 -04:00