Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Mar 14, 2021

The base python image is only updated when manually triggered and
in case of checking for upgraded dependencies in master build.

While automated upgrade to latest Python image is good for
security, it can cause a number of problems when run automatically
in the CI:

  • cache invalidation - thus longer builds
  • sudden test failures

This happened in the past already quite a number of times so it
is time to switch to a bit different mode. Python images will only
be automatically upgraded in those cases:

  1. When Master CI build is run in scheduled nightly build - to check
    that tests still pass for latest version of the image

  2. When manually refreshed with --force-pull-base-python-image

  3. When DockerHub official images (from tags) are built.

The procedure to refresh the images manually in our CI has been
added to the documentation.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@potiuk potiuk requested review from ashb and kaxil as code owners March 14, 2021 18:54
@potiuk potiuk requested a review from turbaszek March 14, 2021 18:54
@potiuk
Copy link
Member Author

potiuk commented Mar 14, 2021

Hey @kaxil, all -> with recent problems with Python version, I think I gave up on the idea of updating to latest version automatically in CI. It's nice in theory but has a number of problems (like the recent test failiures with CVE).

With this change we will be much more stable - always the same base python version will be used with few exceptions - the scheduled nightly build will use the "latest available" version - so after we stabilize it, it might flag any problems like the one we had with the CVE (same mechanism as with "upgrade-to-newer-depenedencies".

And we will be able to refresh the latest version in alll our registries easily manually (command to do it is added to docs).

@potiuk potiuk force-pushed the make-sure-ci-tests-use-cached-python-version branch 3 times, most recently from 4ab94c1 to 1a98f3e Compare March 14, 2021 19:19
The base python image is only updated when manually triggered and
in case of checking for upgraded dependencies in master build.

While automated upgrade to latest Python image is good for
security, it can cause a number of problems when run automatically
in the CI:

* cache invalidation - thus longer builds
* sudden test failures

This happened in the past already quite a number of times so it
is time to switch to a bit different mode. Python images will only
be automatically upgraded in those cases:

1) When Master CI build is run in scheduled nightly build - to check
   that tests still pass for latest version of the image

2) When manually refreshed with --force-pull-base-python-image

3) When DockerHub official images (from tags) are built.

The procedure to refresh the images manually in our CI has been
added to the documentation.
@potiuk potiuk force-pushed the make-sure-ci-tests-use-cached-python-version branch from 1a98f3e to 27e152a Compare March 14, 2021 19:20
@potiuk potiuk requested review from feluelle and mik-laj March 14, 2021 20:00
@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Mar 14, 2021
@potiuk potiuk merged commit 4762396 into apache:master Mar 14, 2021
@potiuk potiuk deleted the make-sure-ci-tests-use-cached-python-version branch March 14, 2021 20:31
potiuk added a commit that referenced this pull request Mar 23, 2021
The base python image is only updated when manually triggered and
in case of checking for upgraded dependencies in master build.

While automated upgrade to latest Python image is good for
security, it can cause a number of problems when run automatically
in the CI:

* cache invalidation - thus longer builds
* sudden test failures

This happened in the past already quite a number of times so it
is time to switch to a bit different mode. Python images will only
be automatically upgraded in those cases:

1) When Master CI build is run in scheduled nightly build - to check
   that tests still pass for latest version of the image

2) When manually refreshed with --force-pull-base-python-image

3) When DockerHub official images (from tags) are built.

The procedure to refresh the images manually in our CI has been
added to the documentation.

(cherry picked from commit 4762396)
ashb pushed a commit that referenced this pull request Apr 15, 2021
The base python image is only updated when manually triggered and
in case of checking for upgraded dependencies in master build.

While automated upgrade to latest Python image is good for
security, it can cause a number of problems when run automatically
in the CI:

* cache invalidation - thus longer builds
* sudden test failures

This happened in the past already quite a number of times so it
is time to switch to a bit different mode. Python images will only
be automatically upgraded in those cases:

1) When Master CI build is run in scheduled nightly build - to check
   that tests still pass for latest version of the image

2) When manually refreshed with --force-pull-base-python-image

3) When DockerHub official images (from tags) are built.

The procedure to refresh the images manually in our CI has been
added to the documentation.

(cherry picked from commit 4762396)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools full tests needed We need to run full set of tests for this PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants