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

21 Коммитов

Автор SHA1 Сообщение Дата
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