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

67 Коммитов

Автор SHA1 Сообщение Дата
Jarek Potiuk 064cb67ae5
Pin Hadolint to version released 2020.04.20 (#8485) 2020-04-21 13:33:11 +02:00
Kaxil Naik 6c5fba2570
Remove duplicate dependency ('curl') from Dockerfile (#8412) 2020-04-17 16:09:20 +01:00
Hao Liang bc230a9711
Fix subcommand error when running production image without argument (#8415)
Co-authored-by: Liang Hao <liahao@tesla.com>
2020-04-17 14:47:23 +02:00
Daniel Imberman baa61c9c84
Add migration waiting script and log cleaner (#8219)
* Add migration waiting script and log cleaner

This PR creates a "migration spinner" that allows the webserver to wait for all database migrations to complete before starting up. Is a necessary component before we can merge the helm chart.

* Update airflow/cli/cli_parser.py

Co-Authored-By: Tomek Urbaszek <turbaszek@gmail.com>

Co-authored-by: Tomek Urbaszek <tomasz.urbaszek@polidea.com>
Co-authored-by: Tomek Urbaszek <turbaszek@gmail.com>
2020-04-16 00:12:41 -07:00
Felix Uellendall cf6c254ebd
Expose Airflow Webserver Port in Production Docker Image (#8228) 2020-04-15 13:05:02 +02:00
Jarek Potiuk 4e8a979d03
Docker image build include now releses 1.10.10 version (#8234)
It also installs properly on Mac as well as it auto-detects
if yarn prod is needed - based on presence of proper
package.json in either www or www_rbac which makes it simpler
for remote installations.
2020-04-10 15:07:15 +02:00
Jarek Potiuk 07fd0d71c8
Add Production Docker image support (#7832) 2020-04-02 18:52:11 +01:00
Jarek Potiuk 210de87d6d
Move Dockerfile to Dockerfile.ci (#7829) 2020-03-23 08:56:26 +01:00
Kamil Breguła 8465d66f05
Remove airflow.bin package (#7808) 2020-03-22 22:01:06 +01:00
Jarek Potiuk 8c5638832f
[AIRFLOW-7067] Pinned version of Apache Airflow (#7730) 2020-03-22 13:34:48 +01:00
Jarek Potiuk cabd684b46
[AIRFLOW-7097] Install gcloud beta componensts in CI image (#7772) 2020-03-21 15:45:10 +01:00
Jarek Potiuk dced43bee9
[AIRFLOW-6946] Switch to MySQL 5.7 in 2.0 as base (#7570)
Switch to MySQL 5.7 in tests.

Fixes the utf8mb4 encoding issue where utf8mb4 encoding
produces too long keys for mysql to handle in XCom table.

You can optionally specify a separate option to set
encoding differently for the columns that are part of the
index - dag_id, task_id and key.
2020-03-14 22:24:03 +01:00
Ash Berlin-Taylor ef71ac6a22
[AIRFLOW-7029] Use separate docker image for running license check (#7678)
Each stage of the CI tests needs to pull our `ci` image. By removing
java from it we can save 1-2minutes from each test stage. This is part
of that work.
2020-03-13 18:54:22 +00:00
Jarek Potiuk cad20c28da
[AIRFLOW-5842] Swtch to Debian buster image as a base (#7647) 2020-03-07 20:20:05 +01:00
Kamil Breguła 609707eddf
[AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor (#7602) 2020-03-07 19:13:00 +01:00
Vanessasaurus 0bb687990b
[AIRFLOW-4030] second attempt to add singularity to airflow (#7191)
* adding singularity operator and tests

Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>

* removing encoding pragmas and fixing up dockerfile to pass linting

Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>

* make workdir in /tmp because AIRFLOW_SOURCES not defined yet

Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>

* curl needs to follow redirects with -L

Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>

* moving files to where they are supposed to be, more changes to mock, no clue

Signed-off-by: vsoch <vsochat@stanford.edu>

* removing trailing whitespace, moving example_dag for singularity, adding licenses to empty init files

Signed-off-by: vsoch <vsochat@stanford.edu>

* ran isort on example dags file

Signed-off-by: vsoch <vsochat@stanford.edu>

* adding missing init in example_dags folder for singularity

Signed-off-by: vsoch <vsochat@stanford.edu>

* removing code from __init__.py files for singularity operator to fix documentation generation

Signed-off-by: vsoch <vsochat@stanford.edu>

* forgot to update link to singularity in operators and hooks ref

Signed-off-by: vsoch <vsochat@stanford.edu>

* command must have been provided on init of singularity operator instance

Signed-off-by: vsoch <vsochat@stanford.edu>

* I guess I'm required to have a task_id?

Signed-off-by: vsoch <vsochat@stanford.edu>

* try adding working_dir to singularity operator type definitions

Signed-off-by: vsoch <vsochat@stanford.edu>

* disable too many arguments for pylint of singularity operator init

Signed-off-by: vsoch <vsochat@stanford.edu>

* move pylint disable up to line 64 - doesnt catch at end of statement like other examples

Signed-off-by: vsoch <vsochat@stanford.edu>

* two spaces before inline comment

Signed-off-by: vsoch <vsochat@stanford.edu>

* I dont see task_id as a param for other providers, removing for singularity operator

Signed-off-by: vsoch <vsochat@stanford.edu>

* adding debug print

Signed-off-by: vsoch <vsochat@stanford.edu>

* allow for return of just image and/or lines

Signed-off-by: vsoch <vsochat@stanford.edu>

* dont understand how mock works, but the image should exist after its pulled....

Signed-off-by: vsoch <vsochat@stanford.edu>

* try removing shutil, the client should handle pull folder instead

Signed-off-by: vsoch <vsochat@stanford.edu>

* try changing pull-file to same uri that is expected to be pulled

Signed-off-by: vsoch <vsochat@stanford.edu>

* import of AirflowException moved to exceptions

Signed-off-by: vsoch <vsochat@stanford.edu>

* DAG module was moved to airflow.models

Signed-off-by: vsoch <vsochat@stanford.edu>

* ensure pull is called with pull_folder

Signed-off-by: vsoch <vsochat@stanford.edu>
2020-02-23 10:49:47 +01:00
Kamil Breguła 175a160463
[AIRFLOW-6828] Stop using the zope library (#7448) 2020-02-19 13:08:48 +01:00
Ash Berlin-Taylor cec9249f90
[AIRFLOW-6818] Prevent Docker cache-busting on when editing www templates (#7432)
There is two parts to this PR:

1. Only copying www/webpack.config.js and www/static/ before running the
   asset pipeline
2. Making sure that _all_ files (not just the critical ones) have the
   same permissions.
2020-02-16 17:58:46 +01:00
Jarek Potiuk 627365ab74 Revert "[AIRFLOW-XXXX] Prevent Docker cache-busting on when editing www templates (#7427)"
This reverts commit 3eb30ed12c.
2020-02-16 10:10:37 +01:00
Ash Berlin-Taylor 3eb30ed12c
[AIRFLOW-XXXX] Prevent Docker cache-busting on when editing www templates (#7427)
There is two parts to this PR:

1. Only copying www/webpack.config.js and www/static/ before running the
   asset pipeline
2. Making sure that _all_ files (not just the critical ones) have the
   same permissions.

The goal of both of these is to make sure that the docker build cache for the "expensive"
operations (installing NPM modules, running asset pipeline, installing python modules)
isn't run when it isn't necessary.
2020-02-15 20:24:35 +00:00
Jarek Potiuk 945b988cc2
[AIRFLOW-6662] install dumb init (#7300)
* Revert "[AIRFLOW-6662] Switch to --init docker flag for signal propagation (#7278)"

This reverts commit d1bf343ffe.

* [AIRFLOW-6662] return back the dumb-init - installed by apt

We had stability problems with tests with --init flag so we are
going back to it
2020-02-02 11:13:04 +01:00
Jarek Potiuk d7d2794d05
[AIRFLOW-6701] Rat is downloaded from stable backup/mirrors (#7323)
Also curl options are now using long format and include --fail
to protect against some temporary errors (5xx). Also RAT download
uses now two possible sources of downloads and fallbacks to the
second if first is not available.
2020-02-02 11:11:38 +01:00
Jarek Potiuk d1bf343ffe
[AIRFLOW-6662] Switch to --init docker flag for signal propagation (#7278)
We are now using native --init flag of docker run and init: parameter
of docker compose to pass signals and reap child processes
2020-01-29 14:07:34 +01:00
dstandish 2a819b11fb [AIRFLOW-6296] add OdbcHook & deprecation warning for pymssql (#6850) 2020-01-19 07:54:56 +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
Kamil Breguła 9fce4eca4e [AIRFLOW-6470] Avoid pipe to file when do curl (#7063) 2020-01-05 19:00:02 +01:00
Kamil Breguła 5ae2f968e5 [AIRFLOW-6462] Limit exported variables in Dockerfile/Breeze (#7057) 2020-01-05 17:11:34 +01:00
Kamil Breguła 4c0cbe5843 [AIRFLOW-6465] Add bash autocomplete for airflow in Breeze (#7060) 2020-01-05 10:22:07 +01:00
Kamil Breguła 42add8edf9 [AIRFLOW-64624] Add cloud providers CLI tools in Breeze (#7059) 2020-01-05 10:16:29 +01:00
Kamil Breguła 5d73d32052 [AIRFLOW-6461] Remove silent flags in Dockerfile (#7052) 2020-01-05 09:15:14 +01:00
Ash Berlin-Taylor 2a157e32d0 [AIRFLOW-6272] Switch from npm to yarnpkg for managing front-end dependencies (#6844)
It is:

- quicker to install
- easier to get repeatable results
- Takes up less space (130MB/15k files vs 190MB/23k files)
- nicer to user (has better help)
2019-12-19 22:21:41 +01:00
Jarek Potiuk 239d51ed31
[AIRFLOW-6216] Allow pytests to be run without "tests" (#6770)
With this change you should be able to simply run `pytest` to run all the tests in the main airflow directory.

This consist of two changes:

* moving pytest.ini to the main airflow directory
* skipping collecting kubernetes tests when ENV != kubernetes
2019-12-10 14:49:00 +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 2897624a51 [AIRFLOW-5886] Fixed a bit too selective Dockerfile copy (#6570) 2019-11-13 13:07:39 +01:00
Jarek Potiuk cc754f7f74
[AIRFLOW-5886] Selective copying of sources in Docker image (#6538)
This change further improves time of rebuilds for docker image when your
sources change (very useful in case of building kubernetes image). It adds only
directories that are needed (it is synchronised with .dockerignore and local
mounts) and in the sequence that reflects frequency of changes. Also pip
install is not done again after sources change (there is no point) so the
build is much faster when only sources or test file change.
2019-11-12 22:40:03 +01:00
Jarek Potiuk 75a43ccd0c
[AIRFLOW-5887] User is removed from CI images (#6540)
The AIRFLOW_USER is not needed any more in CI images. It will be needed in Prod
images but it will be implemented differently there.
2019-11-12 21:47:20 +01:00
Jarek Potiuk f2473b320f
[AIRFLOW-5885] List of tests is generated dynamically after you enter Breeze (#6536)
The list of tests for autocomplete is now generated automatically when you enter Breeze.

It will take some 40 seconds or so to generate the list and until it's done there are
no autocompletions but they appear right after the list is ready.
2019-11-12 16:20:07 +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 489e7fe9a7 [AIRFLOW-5687] Fix Upgrade pip to 19.0.2 in CI build pipeline (#6361) 2019-10-18 09:45:12 +01:00
Kaxil Naik f2b7f5a85a
[AIRFLOW-5687] Upgrade pip to 19.0.2 (#6358) 2019-10-17 21:37:51 +01:00
Gerardo Curiel e62056b225 [AIRFLOW-5223] Use kind for Kubernetes in CI (#5837)
This PR reimplements Kubernetes integration testing using kind,
a tool for running local Kubernetes clusters using Docker container
"nodes". The "nodes" are deployed to a separate docker daemon
(dind) started through docker-compose.
2019-10-15 12:56:09 +02:00
Kamil Breguła 8097006468 [AIRFLOW-5588] Add Celery's architecture diagram (#6247)
* [AIRFLOW-5588] Add Celery's architecture diagram

* fixup! [AIRFLOW-5588] Add Celery's architecture diagram

* fixup! fixup! [AIRFLOW-5588] Add Celery's architecture diagram
2019-10-09 10:52:50 -07:00
Kamil Breguła 76fe45e1d1 [AIRFLOW-5604] Remove duplicated isort check (#6272) 2019-10-06 18:10:47 +02:00
Hao Liang 0a505b6136 [AIRFLOW-XXX] Fix typo and format error (#6149) 2019-09-21 12:56:02 +08: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 9d6b58d871 [AIRFLOW-5389] better organized scripts for building CI docker deps 2019-09-03 16:13:41 +02:00
Jarek Potiuk 286aa7a581
[AIRFLOW-3611] Simplified development environment (#4932) 2019-08-27 14:39:36 -04:00