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

36 Коммитов

Автор SHA1 Сообщение Дата
Jarek Potiuk 58b36b861c
Gets rid of all the docker cli tools in Breeze. (#13731)
* Gets rid of all the docker cli tools in Breeze.

The docker cli tools caused more trouble than benefits.
Replaced the last two (azure and aws) with installation to
"/files" directory so that they survive breeze restart.

Also added --reinstall to installation command for all tools
so that it is easier to reinstall them.

* Update .pre-commit-config.yaml
2021-01-18 03:59:34 +01:00
Ash Berlin-Taylor ec136061d1
Fix rendering of CI.rst in Github (#13613)
It was treating the `(x)` as a numbered list.
2021-01-11 16:47:26 +00:00
Jarek Potiuk 82fa048c12
Production image can also be upgraded to newer dependencies (#13345)
Previously UPGRADE_TO_LATEST_CONSTRAINTS variable controlled
whether the CI image uses latest dependencies rather than
fixed constraints. This PR brings it also to PROD image.

The name of the ARG is changed to UPGRADE_TO_NEWER_DEPENDENCIES
as this corresponds better with the intention.
2020-12-28 20:08:18 +01:00
Kaxil Naik db166ba75c
Update CI to run tests againt v2-0-test branch (#10891) 2020-12-09 19:35:04 +00:00
John Bampton 5eeb66ce18
Fix case of GitHub (#12950)
Changed `Github` to `GitHub`
2020-12-09 16:36:25 +01:00
Jarek Potiuk ed1825c026
Production images on CI are now built from packages (#12685)
So far, the production images of Airflow were using sources
when they were built on CI. This PR changes that, to build
airflow + providers packages first and install them
rather than use sources as installation mechanism.

Part of #12261
2020-12-06 23:36:33 +01:00
Jarek Potiuk 6b3c6add9e
Update setup.py to get non-conflicting set of dependencies (#12636)
This change upgrades setup.py and setup.cfg to provide non-conflicting
`pip check` valid set of constraints for CI image.

Fixes #10854

Co-authored-by: Tomek Urbaszek <turbaszek@apache.org>

Co-authored-by: Tomek Urbaszek <turbaszek@apache.org>
2020-11-27 20:06:44 +01:00
Kamil Breguła c34ef853c8
Separate out documentation building per provider (#12444)
* POC

* fixup! POC
2020-11-20 15:35:56 +01:00
Jarek Potiuk b2a28d1590
Moves provider packages scripts to dev (#12082)
The change #10806 made airflow works with implicit packages
when "airflow" got imported. This is a good change, however
it has some unforeseen consequences. The 'provider_packages'
script copy all the providers code for backports in order
to refactor them to the empty "airflow" directory in
provider_packages folder. The #10806 change turned that
empty folder in 'airflow' package because it was in the
same directory as the provider_packages scripts.

Moving the scripts to dev solves this problem.
2020-11-09 13:27:10 +01:00
Ash Berlin-Taylor 79836bb92c
Convert OpenAPI client generation tests to use selective checks (#12092)
This test was bundled in with the existing needs-api tests, but then
performed it's _own_ checks on if it should run. This changes that to
have selective_ci_checks.sh do this check.

Additionally CI_SOURCE_REPO was often wrong -- at least for me as I
don't open PRs from ashb/airflow, and this lead to a confusing message:

> https://github.com/ashb/airflow.git Branch my_branch does not exist

But all we were using this for was to find the "parent" commit, but
there is any easier way we can do that: HEAD^1 with a fetch depth of 2
to the checkout option.

So I've removed calculating that and where it is used.

If we need to bring it back we should use the output from the
`potiuk/get-workflow-origin` action -- that gets the correct value
2020-11-04 19:12:49 +00:00
Jarek Potiuk d85a31f2d8
Adds documentation about the optimized PR workflow (#12006)
We had a lot of problems recently about the queues in Github
Actions. This documentations explains the motivation and approach
we have taken for optimizing our PR workflow.
2020-11-01 00:20:38 +01:00
Jarek Potiuk 2124453421
Moves tests that should be always executed to 'always' directory (#11948)
Some tests (testing the structure and importability of
example) should be always run even if core part was not modified.

That's why we move it to "always" directory.
2020-10-30 12:53:25 +01:00
John Bampton a1822919cc
Fix case of JavaScript (#11718)
Changes were:
- `javascript` to `JavaScript`
2020-10-21 19:56:54 +02:00
John Bampton 172820db4d
Fix case of GitHub (#11398) 2020-10-21 14:32:41 +02:00
Jarek Potiuk e3a0839e21
Security scans are also selective now (#11674)
The security scans take a long time, especially for python code
- it is about ~18 minutes now. This PR reduces strain on the
GitHub actions by only running the scan in pull requests
when any of python/javascript code changed respectively.
2020-10-20 12:19:16 +02:00
Jarek Potiuk dd1c07b20d
Optimizes CI builds heavily with selective checks (#11656)
* Images are not built if the change is not touching code or docs.
* In case we have no need for CI images we run stripped-down
  pre-commit checks which skip the long checks and only run for
  changed files
* If none of the CLI/Providers/Kubernetes/WWW files changed
  the relevant tests are skipped, unless some of the core files
  changed as well.
* The selective checks logic is explained and documented.

This is the second attempt at the problem with better
strategy to get the list of files from the incoming PR.

The strategy works now better in a number of cases:
* when PR comes from the same repo
* when PR comes from the pull_repo
* when PR contains more than one commit
* when PR is based on older master and GitHub creates
  merge commit
2020-10-20 06:27:20 +02:00
Kaxil Naik d93b6e53eb
Revert "Optimizes CI builds heavily with selective checks (#11541)" (#11648)
This reverts commit 9237338f75.
2020-10-19 01:56:38 +01:00
Jarek Potiuk 9237338f75
Optimizes CI builds heavily with selective checks (#11541)
* Images are not built if the change is not touching code or docs.
* In case we have no need for CI images we run stripped-down
  pre-commit checks which skip the long checks and only run for
  changed files
* If none of the CLI/Providers/Kubernetes/WWW files changed
  the relevant tests are skipped, unless some of the core files
  changed as well.
* The selective checks logic is explained and documented.
2020-10-18 20:47:21 +02:00
Jarek Potiuk 16e7129719
Added support for provider packages for Airflow 2.0 (#11487)
* Separate changes/readmes for backport and regular providers

We have now separate release notes for backport provider
packages and regular provider packages.

They have different versioning - backport provider
packages with CALVER, regular provider packages with
semver.

* Added support for provider packages for Airflow 2.0

This change consists of the following changes:

* adds provider package support for 2.0
* adds generation of package readme and change notes
* versions are for now hard-coded to 0.0.1 for first release
* adds automated tests for installation of the packages
* rename backport package readmes/changes to BACKPORT_*
* adds regulaar packge readmes/changes
* updates documentation on generating the provider packaes
* adds CI tests for the packages
* maintains backport packages generation with --backports flag

Fixes #11421
Fixes #11424
2020-10-13 16:33:00 +01:00
Jarek Potiuk 32f2a45819
Rename backport packages to provider packages (#11459)
In preparation for adding provider packages to 2.0 line we
are renaming backport packages to provider packages.

We want to implement this in stages - first to rename the
packages, then split-out backport/2.0 providers as part of
the #11421 issue.
2020-10-12 16:29:48 +02:00
Tobiasz Kędzierski 18f6cf138b
Fix typo in command in CI.rst (#11233) 2020-10-02 10:50:28 +02:00
Jarek Potiuk 52fdb62314
Requirements might get upgraded without setup.py change (#10784)
I noticed that when there is no setup.py changes, the constraints
are not upgraded automatically. This is because of the docker
caching strategy used - it simply does not even know that the
upgrade of pip should happen.

I believe this is really good (from security and incremental updates
POV to attempt to upgrade at every successfull merge (not that
the upgrade will not be committed if any of the tests fail and this
is only happening on every merge to master or scheduled run.

This way we will have more often but smaller constraint changes.

Depends on #10828
2020-09-22 16:22:53 +02:00
Jarek Potiuk cea9e829b3
Improves deletion of old artifacts. (#11079)
We introduced deletion of the old artifacts as this was
the suspected culprit of Kubernetes Job failures. It turned out
eventually that those Kubernetes Job failures were caused by
the #11017 change, but it's good to do housekeeping of the
artifacts anyway.

The delete workflow action introduced in a hurry had two problems:

* it runs for every fork if they sync master. This is a bit
  too invasive

* it fails continuously after 10 - 30 minutes every time
  as we have too many old artifacts to delete (GitHub has
  90 days retention policy so we have likely tens of
  thousands of artifacts to delete)

* it runs every hour and it causes occasional API rate limit
  exhaustion (because we have too many artifacts to loop trough)

This PR introduces filtering with the repo, changes the frequency
of deletion to be 4 times a day. Back of the envelope calculation
tops 4/day at 2500 artifacts to delete at every run so we have low risk 
of reaching 5000 API calls/hr rate limit. and adds script that we are
running manually to delete those excessive artifacts now. Eventually
when the number of artifacts goes down the regular job should delete
maybe a few hundreds of artifacts appearing within the 6 hours window
in normal circumstances and it should stop failing then.
2020-09-22 14:31:14 +02:00
John Bampton ce19657ec6
Fix case of GitHub. (#10955)
Changed `Github` to `GitHub`.
2020-09-15 14:49:27 -04:00
Kaxil Naik 16b02dfe44
Add missing closing bracket in CI.rst (#10908)
A closing bracket was missing in the sentence.
2020-09-13 16:27:31 +02:00
Kaxil Naik 6dd2a0dbb1
Update the name of static check without pylint in CI.rst (#10909)
We changed the name of the static check without pylint in a1032805bc (diff-e9f950f17198d3d5e3122a44230a09b9), this commit updates it's name in the docs
2020-09-13 16:27:02 +02:00
Jarek Potiuk f2da6b419f
Updated documentation for the CI with mermaid sequence diagrams (#10380) 2020-08-24 22:45:28 +02:00
Jarek Potiuk 86d8e349b4
Status of quarantined tests is stored in Github Issue (#10119) 2020-08-03 20:01:00 +02:00
Jarek Potiuk ddeea33b88
Nightly tag was not pushed on scheduled run (#9924) 2020-07-22 08:35:33 +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
Aneesh Joseph d93555b863
Add git sync option and unit tests for the Helm chart (#9371)
* add git sync sidecars

* add a helm test

* add more tests

* allow users to provide git username and pass via  a k8s secrets

* set default values for airflow worker repository & tag

* change ci timeout

* fix link

* add credentials_secret to airflow.cfg configmap

* set GIT_SYNC_ADD_USER on kubernetes worker pods, set uid

* add fsGroup to webserver and kubernete workers

* move gitSync to dags.gitSync

* rename valueFields

* turn off git sync and dag persistence by default

* provide option to specify known_hosts

* add git-sync details into the chart documentation

* Update .gitignore

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>

* make git sync max failures configurable

* Apply suggestions from code review

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

* add back requirements.lock

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2020-07-05 12:57:15 -07: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 92d68807f3
Split utils sh (#9132)
* Split _utils.sh into separate files
2020-06-04 22:12:56 +02:00
Jarek Potiuk 41481bb402
Python base images are stored in cache (#8943)
All PRs will used cached "latest good" version of the python
base images from our GitHub registry. The python versions in
the Github Registry will only get updated after a master
build (which pulls latest Python image from DockerHub) builds
and passes test correctly.

This is to avoid problems that we had recently with Python
patchlevel releases breaking our Docker builds.
2020-05-21 13:39:07 +02:00
Jarek Potiuk c1d4a239f6
Update documentation with clarification about v1-10-stable (#8588)
The v1-10-test branch does not have it's own cron job. The
DockerHub build is triggered after manual pushing of v1-10-stable.
2020-04-27 17:56:57 +02:00
Jarek Potiuk 0de597f95f
The CRON job now is working and triggers builds on DockerHub (#8549)
The CRON job from previous runs did not have everything working
after the emergency migration to Github Actions.

This change brings back following improvements:

* rebuilding images from the scratch in CRON job
* automatically upgrading all requirements to test if they are new
* pushing production images to github packages as cache
* pushing nightly tag to github
2020-04-26 00:33:39 +02:00