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

22 Коммитов

Автор SHA1 Сообщение Дата
Omair Khan 68e0eb6976
in_container bats pre-commit hook and updated bats-tests hook (#11179) 2020-09-29 11:59:06 +02:00
Jarek Potiuk 620b0989b8
Add Helm Chart linting (#11108) 2020-09-24 13:02:11 +02:00
Kaxil Naik 1a149827a2
Fix typo in STATIC_CODE_CHECKS.rst (#11094)
`realtive` -> `relative`
2020-09-22 21:36:38 +01:00
Kaxil Naik 6a3ff676f2
Fix typo in the word "committed" (#10979)
`commited` -> `committed`
2020-09-16 21:52:28 +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
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
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
Kaxil Naik 0faa710e47
Add black to STATIC_CODE_CHECKS.rst (#10737)
Add black to the table for Static Code Checkers
2020-09-05 08:55:48 +02:00
Jarek Potiuk c320d99c4b
Small fixes in Breeze/Static check/docs documentation (#10658) 2020-08-31 12:46:39 +02:00
Jarek Potiuk 1cf1af664f
Do not override in_container scripts when building the image (#10442)
After #10368, we've changed the way we build the images
on CI. We are overriding the ci scripts that we use
to build the image with the scripts taken from master
to not give roque PR authors the possibiility to run
something with the write credentials.

We should not override the in_container scripts, however
because they become part of the image, so we should use
those that came with the PR. That's why we have to move
the "in_container" scripts out of the "ci" folder and
only override the "ci" folder with the one from
master. We've made sure that those scripts in ci
are self-contained and they do not need reach outside of
that folder.

Also the static checks are done with local files mounted
on CI because we want to check all the files - not only
those that are embedded in the container.
2020-08-21 17:21:57 +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 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
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
Kaxil Naik b46de89a9e
Add pydocstyle to Breeze Autocomplete (#9462) 2020-06-21 10:29: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
Jarek Potiuk bd7f63b39f
Get rid of Travis CI from the docs (#8488) 2020-04-21 17:27:09 +02:00
Ryan Hamilton 6aa4f534ce
CSS linting integrated into pre-commit (#8218) 2020-04-09 21:50:17 +01:00
Jarek Potiuk 210de87d6d
Move Dockerfile to Dockerfile.ci (#7829) 2020-03-23 08:56:26 +01:00
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
Xinbin Huang da2a617cb7 [AIRFLOW-XXX] Fix development packages installtion instructions (#6942) 2019-12-31 08:19:03 +01:00
Jarek Potiuk 6733e58c73
more GSOD improvements (#6585)
Co-authored-by: Elena Fedotova <lavel@mail.ru>
2019-12-04 13:15:02 +01:00