-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Optimises prod image preparation in CI #13557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimises prod image preparation in CI #13557
Conversation
|
This PR should optimese a bit prod image preparation - instead of building CI images twice (we need them for prod images) we just wait with the PROD images until CI images are built and we pull them. This should have no impact on the elapsed time of the build because the PROD images are used for much faster K8S builds, so this is not problem if they are prepared a little later. Tested : https://github.com/potiuk/airflow/actions/runs/470430011 (build) and https://github.com/potiuk/airflow/actions/runs/470429997 (CI) (needs to be built in the main branch). |
0e9b7af to
965902c
Compare
|
The Workflow run is cancelling this PR. Building images for the PR has failed. Follow the the workflow link to check the reason. |
The request to get manifest of the image in GitHub Packages
might randomly return either schma 1 response:
{
"schemaVersion": 1,
"name": "apache/airflow/master-python3.6-ci",
"tag": "470317521",
"architecture": "amd64",
"fsLayers": [
{
Or schema 2 response:
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"config": {
"mediaType": "application/vnd.docker.container.image.v1+json",
"size": 56952,
"digest": "sha256:5c80e2ab289647802affafc5c1efc879fe4f5b559cb7a2a1215868e84b1d6424"
},
In order to check image more reliably we check the status code
of the curl response instead.
The prod images require CI images to build provider packages. The optmisation implemented makes the CI images built only once and the prod images will just pull the images rather than build them again.
965902c to
34b00f4
Compare
|
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. |
This change slightly optimizes waiting for prod images. Waiting for images necessarily takes one slot from jobs queue, even if those jobs do nothing at all. This is unfortunate, but seems there is no easy way to do it differently because GitHub Actions does not support yet cross-workflow dependencies. This PR optimizes waiting for images in the way that PROD images and CI images waiting happen sequentially rather than in parallell. PROD images are, as of apache#13557 prepared sequentially which means that there is no point to wait for PROD images in parallel to CI images.
This change slightly optimizes waiting for prod images. Waiting for images necessarily takes one slot from jobs queue, even if those jobs do nothing at all. This is unfortunate, but seems there is no easy way to do it differently because GitHub Actions does not support yet cross-workflow dependencies. This PR optimizes waiting for images in the way that PROD images and CI images waiting happen sequentially rather than in parallell. PROD images are, as of #13557 prepared sequentially which means that there is no point to wait for PROD images in parallel to CI images.
The prod images require CI images to build provider packages. The optmisation implemented makes the CI images built only once and the prod images will just pull the images rather than build them again. (cherry picked from commit 6570df8)
This change slightly optimizes waiting for prod images. Waiting for images necessarily takes one slot from jobs queue, even if those jobs do nothing at all. This is unfortunate, but seems there is no easy way to do it differently because GitHub Actions does not support yet cross-workflow dependencies. This PR optimizes waiting for images in the way that PROD images and CI images waiting happen sequentially rather than in parallell. PROD images are, as of #13557 prepared sequentially which means that there is no point to wait for PROD images in parallel to CI images. (cherry picked from commit 0d8536c)
This change slightly optimizes waiting for prod images. Waiting for images necessarily takes one slot from jobs queue, even if those jobs do nothing at all. This is unfortunate, but seems there is no easy way to do it differently because GitHub Actions does not support yet cross-workflow dependencies. This PR optimizes waiting for images in the way that PROD images and CI images waiting happen sequentially rather than in parallell. PROD images are, as of apache#13557 prepared sequentially which means that there is no point to wait for PROD images in parallel to CI images. (cherry picked from commit 0d8536c) (cherry picked from commit 8872e7f)
Based on #13556
The prod images require CI images to build provider packages.
The optmisation implemented makes the CI images built only once
and the prod images will just pull the images rather than build
them again.
^ 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.