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

131 Коммитов

Автор SHA1 Сообщение Дата
Kaxil Naik 6970584e79
Upgrade to latest isort & pydocstyle (#11142)
isort: from 5.4.2 to 5.5.3
pydocstyle: from 5.0.2 to 5.1.1
2020-09-25 09:13:59 +02:00
Jarek Potiuk 620b0989b8
Add Helm Chart linting (#11108) 2020-09-24 13:02:11 +02:00
Patrick Cando f3e87c5030
Add D202 pydocstyle check (#11032) 2020-09-22 16:17:24 +01:00
Patrick Cando b61225a885
Add D204 pydocstyle check (#11031) 2020-09-21 11:45:06 +01:00
Jarek Potiuk b2dc346062
Make breeeze-complete Google Shell Guide compatible (#10708)
Also added unit tests for breeze-complete
Part of #10576
2020-09-14 10:21:09 +02:00
Jarek Potiuk 106c0f556f
Add pre-commit to sort INTHEWILD.md file automatically (#10851) 2020-09-12 18:26:12 +02:00
Daniel Imberman 56bd9b7d6b
Modify helm chart to use pod_template_file (#10872)
* Modify helm chart to use pod_template_file

Since we are deprecating most k8sexecutor arguments
we should use the pod_template_file when launching airflow
using the KubernetesExecutor

* fix tests

* one more nit

* fix dag command

* fix pylint
2020-09-11 10:47:59 -07:00
Ash Berlin-Taylor 59e8341d6e
Add new lint check to now allow realtive imports (#10825)
Relative and absolute imports are functionally equivalent, the only
pratical difference is that relative is shorter.

But it is also less obvious what exactly is imported, and harder to find
such imports with simple tools (such as grep).

Thus we have decided that Airflow house style is to use absolute imports
only
2020-09-10 18:07:50 +01:00
Kaxil Naik 9549274d11
Upgrade black to 20.8b1 (#10818) 2020-09-09 09:06:24 +01:00
Jarek Potiuk cd0cc4ca86
Check that all pre-commits are synchronized code<>docs (#10789)
Until pre-commit implements export of all configured
checks, we need to maintain the list manually updated.

We check both - pre-commit list in breeze-complete and
descriptions in STATIC_CODE_CHECKS.rst
2020-09-08 14:06:42 +02:00
Jarek Potiuk e3c83da984
Check all dockerfiles with hadolint (#10754)
The hadolint check only checked the "main dir" Dockerfile
but we have more of them now. All of them are now checked.

The following problems are fixed:

 * DL3000 Use absolute WORKDIR
 * DL4000 MAINTAINER is deprecated
 * DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it.
 * SC2046 Quote this to prevent word splitting.

The followiing problems are ignored:

 * DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add
   <package>=<version>`
2020-09-06 18:06:05 +02:00
Kaxil Naik 079d7b5946
Enable more checks for pydocstyle (#10741)
Enable D106, D207 and D208

D106	Missing docstring in public nested class
D207	Docstring is under-indented
D208	Docstring is over-indented
2020-09-05 02:26:09 +01:00
João Marques 5b6464f489
Migrate speccy to spectral in OpenAPI linting. (#10351) 2020-09-03 18:06:23 +02:00
Kaxil Naik 02b853b75e
Fix failing black test (#10697)
* Fix failing black test
2020-09-02 20:26:40 +02:00
Kamil Breguła 72b2be71b0
[AIRFLOW-XXX] Add task execution process on Celery Execution diagram (#6961) 2020-09-02 07:47:34 -04:00
Jarek Potiuk cd1f794242
Bring back some inclusions before we solve cyclic deps problems (#10551) 2020-08-25 20:04:51 +02:00
Kaxil Naik fdd9b6f65b
Enable Black on Providers Packages (#10543) 2020-08-25 17:39:04 +01:00
Kaxil Naik 7c0d6ab9f4
Enable Black on Connexion API folders (#10545) 2020-08-25 12:10:20 +01:00
Kaxil Naik d760265452
PyDocStyle: No whitespaces allowed surrounding docstring text (#10533) 2020-08-25 09:50:21 +01:00
Kaxil Naik d1bce91bb2
PyDocStyle: Enable D403: Capitalized first word of docstring (#10530) 2020-08-25 00:40:29 +01:00
Jarek Potiuk f2da6b419f
Updated documentation for the CI with mermaid sequence diagrams (#10380) 2020-08-24 22:45:28 +02:00
Jarek Potiuk de7500de84
CI Images are now pre-build and stored in registry (#10368)
* CI Images are now pre-build and stored in registry

With this change we utilise the latest pull_request_target
event type from Github Actions and we are building the
CI image only once (per version) for the entire run.

This safes from 2 to 10 minutes per job (!) depending on
how much of the Docker image needs to be rebuilt.

It works in the way that the image is built only in the
build-or-wait step. In case of direct push run or
scheduled runs, the build-or-wait step builds and pushes
to the GitHub registry the CI image. In case of the
pull_request runs, the build-and-wait step waits until
separate build-ci-image.yml workflow builds and pushes
the image and it will only move forward once the image
is ready.

This has numerous advantages:

1) Each job that requires CI image is much faster because
   instead of pulling + rebuilding the image it only pulls
   the image that was build once. This saves around 2 minutes
   per job in regular builds but in case of python patch level
   updates, or adding new requirements it can save up to 10
   minutes per job (!)

2) While the images are buing rebuilt we only block one job waiting
   for all the images. The tests will start running in parallell
   only when all images are ready, so we are not blocking
   other runs from running.

3) Whole run uses THE SAME image. Previously we could have some
   variations because the images were built at different times
   and potentially releases of dependencies in-between several
   jobs could make different jobs in the same run use slightly
   different image. This is not happening any more.

4) Also when we push image to github or dockerhub we push the
   very same image that was built and tested. Previously it could
   happen that the image pushed was slightly different than the
   one that was used for testing (for the same reason)

5) Similar case is with the production images. We are now building
   and pushing consistently the same images accross the board.

6) Documentation building is split into two parallel jobs docs
   building and spell checking - decreases elapsed time for
   the docs build.

7) Last but not least - we keep the history of al the images
   - those images contain SHA of the commit. This means
   that we can simply download and run the image locally to reproduce
   any problem that anyone had in their PR (!). This is super useful
   to be able to help others to test their problems.

* fixup! CI Images are now pre-build and stored in registry

* fixup! fixup! CI Images are now pre-build and stored in registry

* fixup! fixup! fixup! CI Images are now pre-build and stored in registry

* fixup! fixup! fixup! CI Images are now pre-build and stored in registry
2020-08-20 09:57:07 +02:00
Jarek Potiuk 9228bf2bd0
You can disable spellcheck or documentation when building docs. (#10377)
This cleans up the document building process and replaces it
with breeze-only. The original instructions with
`pip install -e .[doc]` stopped working so there is no
point keeping them.

Extracted from #10368
2020-08-18 19:40:18 +02:00
Jarek Potiuk 0d81cc0940
Improves stability of reported coverage and makes it nicer (#10208)
* Improves stability of reported coverage and makes it nicer

With this change we only upload coverage report in the case
when all tests were successuful and actually executed. This means
that coverage report will not be run when the job gets canceled.

Currently a lof of coverage reports gathered contain far less
coverage because when static check fails or docs some test jobs
could already submit their coverage - resulting in partial coverage
reports.

With this change we also remove comment from coverage report
and replace it with (for now) informational status message published
to github. If we see that it works, we can change it to a
PR-failing status if coverage drops for a given PR.

This way we might get our coverage monotonously increasing :).
2020-08-07 12:47:15 +02:00
Jarek Potiuk 9e3b7d9a1e
Pylint checks should be way faster now (#10207)
* Pylint checks should be way faster now

Instead of running separate pylint checks for tests and main source
we are running a single check now. This is possible thanks to a
nice hack - we have pylint plugin that injects the right
"# pylint: disable=" comment for all test files while reading
the file content by astroid (just before tokenization)

Thanks to that we can also separate out pylint checks
to a separate job in CI - this way all pylint checks will
be run in parallel to all other checks effectively halfing
the time needed to get the static check feedback and potentially
cancelling other jobs much faster.

* fixup! Pylint checks should be way faster now
2020-08-07 11:07:15 +02:00
Kaxil Naik 7d24b088cd
Stop using start_date in default_args in example_dags (2) (#9985) 2020-07-25 19:57:32 +01:00
QP Hou ab07891466
Add missing x-openapi-router-controller to DAG Run endpoint (#9945) 2020-07-25 20:47:40 +02:00
Kaxil Naik 8b10a4b35e
Stop using start_date in default_args in example_dags (#9982) 2020-07-25 00:16:25 +01:00
Shekhar Singh 750555f261
Add guide for Cassandra Operators (#9877) 2020-07-19 21:51:59 +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 d34404809f
Upgrade to latest isort (5.0.8) (#9782) 2020-07-12 20:15:33 +02:00
Kaxil Naik 619ab69657
Add 1.10.11 Changelog & Update UPDATING.md (#9757) 2020-07-11 19:15:02 +01:00
Jarek Potiuk 070e3c3364
Tests are working for newly added backport providers (#9739)
* Tests are working for newly added backport providers
2020-07-09 20:13:58 +02: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
Kaxil Naik 6daaf9cf93
Use parallel process for several Pre-Commits checks (#9681)
Many of the pre-commits don't require `require_serial: true`. This PR removes those to use the default of `require_serial: false`
2020-07-06 12:13:36 +02:00
Jarek Potiuk 44d4ae809c
Upgrade to latest pre-commit checks (#9686) 2020-07-06 11:37:22 +02:00
Kamil Breguła 40add26d45
Remove almost all references to airflow.contrib (#9559) 2020-06-29 08:08:58 +02:00
Kaxil Naik 87fdbd0708
Use literal syntax instead of function calls to create data structure (#9516)
It is slower to call e.g. dict() than using the empty literal, because the name dict must be looked up in the global scope in case it has been rebound. Same for the other two types like list() and tuple().
2020-06-25 16:35:37 +01:00
Kaxil Naik 5d61580c57
Enable 'Public function Missing Docstrings' PyDocStyle Check (#9463) 2020-06-21 15:44:27 +01:00
Kaxil Naik df8efd04f3
Enable & Fix "Docstring Content Issues" PyDocStyle Check (#9460) 2020-06-21 09:55:43 +01:00
Kaxil Naik 3981ed12bd
Select Checks to exclude instead of include for PyDocStyle (#9459)
Do the reverse of what we have in other Pull Request so it will be easy for us to in future to remove this "ignore checks" one by one
2020-06-21 09:51:57 +01:00
Kaxil Naik e13a14c873
Enable & Fix Whitespace related PyDocStyle Checks (#9458) 2020-06-21 09:38:25 +01:00
Kaxil Naik 74f7db0b3a
Enable & Fix "Missing docstring in public module" PyDocStyle check (#9457) 2020-06-21 09:36:36 +01:00
Kaxil Naik 57b495caa4
Add PyDocstyle Precommit Hook (#9456) 2020-06-21 09:34:41 +01:00
Greg Neiheisel 66e738296a
Add Production Helm chart support (#8777)
Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
2020-06-17 23:37:54 +01: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
Felix Uellendall 1698db4ac1
Update pre-commit-hooks repo version (#9195)
- use official isort pre-commit-hook
- use official yamllint pre-commit-hook
- run isort pre-commit-hook on all python files instead of files ending with py
2020-06-14 01:37:30 +01:00
Felix Uellendall a69b031f20
Add S3ToRedshift example dag and system test (#8877)
- add howto docs for S3ToRedshift example dag
- add terraform which runs terraform CLI commands in an isolated docker container

NOTE: This system test uses terraform to provide the infrastructure needed to run this example dag.
2020-06-10 17:20:08 +02:00
Ash Berlin-Taylor 7fd3695766
Don't use the `|safe` filter in code, it's risky (#9180)
Most things already use the `Markup` class to correctly escape problem
areas, this commit just fixes the last instances so that we can assert
that `|safe` is never used.
2020-06-08 22:27:02 +01:00
Ash Berlin-Taylor 6350fd6ebb
Don't use the term "whitelist" - language matters (#9174)
It's fairly common to say whitelisting and blacklisting to describe
desirable and undesirable things in cyber security. However just because
it is common doesn't mean it's right.

However, there's an issue with the terminology. It only makes sense if
you equate white with 'good, permitted, safe' and black with 'bad,
dangerous, forbidden'. There are some obvious problems with this.

You may not see why this matters. If you're not adversely affected by
racial stereotyping yourself, then please count yourself lucky. For some
of your friends and colleagues (and potential future colleagues), this
really is a change worth making.

From now on, we will use 'allow list' and 'deny list' in place of
'whitelist' and 'blacklist' wherever possible. Which, in fact, is
clearer and less ambiguous. So as well as being more inclusive of all,
this is a net benefit to our understandability.

(Words mostly borrowed from
<https://www.ncsc.gov.uk/blog-post/terminology-its-not-black-and-white>)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2020-06-08 10:01:46 +01:00