Skip to content
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

Changes release image preparation to use PyPI packages #12990

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Dec 10, 2020

Since we released all teh provider packages to PyPI now in
RC version, we can now change the mechanism to prepare the
production to use released packages in case of tagged builds.

The "branch" production images are still prepared using the
CI images and .whl packages built from sources, but the
release packages are built from officially released PyPI
packages.

Also some corrections and updates were made to the release process:

  • the constraint tags when RC candidate is sent should contain
    rcn suffix.

  • there was missing step about pushing the release tag once the
    release is out

  • pushing tag to GitHub should be done after the PyPI packages
    are uploaded, so that automated image building in DockerHub
    can use those packages.

  • added a note that in case we will release some provider
    packages that depend on the just released airflow version
    they shoudl be released after airflow is in PyPI but before
    the tag is pushed to GitHub (also to allow the image to be
    build automatically from the released packages)

Fixes: #12970


^ 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
Copy link
Member Author

potiuk commented Dec 10, 2020

I am testing this still, but might be good that you start reviewing it @ashb @kaxil. Once I do and we merge it, we should cherry-pick that one to v2-0-test and we can remove the 'Updates providers versions to 1.0.0 (#12955)' as discussed in https://apache-airflow.slack.com/archives/CCPRP7943/p1607617162178600?thread_ts=1607596760.166600&cid=CCPRP7943

@potiuk potiuk force-pushed the change-the-dockerhub-build-process-to-use-pip-packages branch from a721261 to 465f5a2 Compare December 10, 2020 18:13
Copy link
Member

@kaxil kaxil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

@potiuk potiuk force-pushed the change-the-dockerhub-build-process-to-use-pip-packages branch from 465f5a2 to 29b632f Compare December 10, 2020 19:33
@potiuk
Copy link
Member Author

potiuk commented Dec 10, 2020

I tested it all, added a few fixes and it's ready to go. I used it now to rebuild and re-push all the rc prod images and it looks good.

airflow@d88cc6f8dcc9:/opt/airflow$ airflow version
2.0.0rc1
airflow@d88cc6f8dcc9:/opt/airflow$ airflow providers list 
package_name                             | description                                                                                  | version 
=========================================+==============================================================================================+=========
apache-airflow-providers-amazon          | Amazon integration (including Amazon Web Services (AWS) https://aws.amazon.com/)             | 1.0.0rc1
apache-airflow-providers-celery          | Celery http://www.celeryproject.org/                                                         | 1.0.0rc1
apache-airflow-providers-cncf-kubernetes | Kubernetes https://kubernetes.io/                                                            | 1.0.0rc1
apache-airflow-providers-docker          | Docker https://docs.docker.com/install/                                                      | 1.0.0rc1
apache-airflow-providers-elasticsearch   | Elasticsearch https://https//www.elastic.co/elasticsearch                                    | 1.0.0rc1
apache-airflow-providers-ftp             | File Transfer Protocol (FTP) https://tools.ietf.org/html/rfc114                              | 1.0.0rc1
apache-airflow-providers-google          | Google services including:                                                                   | 1.0.0rc1
                                         |                                                                                              |         
                                         |   - Google Ads https://ads.google.com/                                                       |         
                                         |   - Google Cloud (GCP) https://cloud.google.com/                                             |         
                                         |   - Google Firebase https://firebase.google.com/                                             |         
                                         |   - Google Marketing Platform https://marketingplatform.google.com/                          |         
                                         |   - Google Workspace https://workspace.google.pl/ (formerly Google Suite)                    |         
apache-airflow-providers-grpc            | gRPC https://grpc.io/                                                                        | 1.0.0rc1
apache-airflow-providers-hashicorp       | Hashicorp including Hashicorp Vault https://www.vaultproject.io/                             | 1.0.0rc1
apache-airflow-providers-http            | Hypertext Transfer Protocol (HTTP) https://www.w3.org/Protocols/                             | 1.0.0rc1
apache-airflow-providers-imap            | Internet Message Access Protocol (IMAP) https://tools.ietf.org/html/rfc3501                  | 1.0.0rc1
apache-airflow-providers-microsoft-azure | Microsoft Azure https://azure.microsoft.com/                                                 | 1.0.0rc1
apache-airflow-providers-mysql           | MySQL https://www.mysql.com/products/                                                        | 1.0.0rc1
apache-airflow-providers-postgres        | PostgreSQL https://www.postgresql.org/                                                       | 1.0.0rc1
apache-airflow-providers-redis           | Redis https://redis.io/                                                                      | 1.0.0rc1
apache-airflow-providers-sendgrid        | Sendgrid https://sendgrid.com/                                                               | 1.0.0rc1
apache-airflow-providers-sftp            | SSH File Transfer Protocol (SFTP) https://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/ | 1.0.0rc1
apache-airflow-providers-slack           | Slack https://slack.com/                                                                     | 1.0.0rc1
apache-airflow-providers-sqlite          | SQLite https://www.sqlite.org/                                                               | 1.0.0rc1
apache-airflow-providers-ssh             | Secure Shell (SSH) https://tools.ietf.org/html/rfc4251                                       | 1.0.0rc1
airflow@d88cc6f8dcc9:/opt/airflow$ pip freeze | grep airflow
apache-airflow==2.0.0rc1
apache-airflow-providers-amazon==1.0.0rc1
apache-airflow-providers-celery==1.0.0rc1
apache-airflow-providers-cncf-kubernetes==1.0.0rc1
apache-airflow-providers-docker==1.0.0rc1
apache-airflow-providers-elasticsearch==1.0.0rc1
apache-airflow-providers-ftp==1.0.0rc1
apache-airflow-providers-google==1.0.0rc1
apache-airflow-providers-grpc==1.0.0rc1
apache-airflow-providers-hashicorp==1.0.0rc1
apache-airflow-providers-http==1.0.0rc1
apache-airflow-providers-imap==1.0.0rc1
apache-airflow-providers-microsoft-azure==1.0.0rc1
apache-airflow-providers-mysql==1.0.0rc1
apache-airflow-providers-postgres==1.0.0rc1
apache-airflow-providers-redis==1.0.0rc1
apache-airflow-providers-sendgrid==1.0.0rc1
apache-airflow-providers-sftp==1.0.0rc1
apache-airflow-providers-slack==1.0.0rc1
apache-airflow-providers-sqlite==1.0.0rc1
apache-airflow-providers-ssh==1.0.0rc1

@potiuk potiuk force-pushed the change-the-dockerhub-build-process-to-use-pip-packages branch from 29b632f to 177582c Compare December 10, 2020 19:51
@potiuk
Copy link
Member Author

potiuk commented Dec 10, 2020

And small update for test vs. stable for pre-installed packages. We will have less problems if v2-0-test diverges to0 much for a while from v2-0-stable (hopefully NOT too much).

@potiuk potiuk force-pushed the change-the-dockerhub-build-process-to-use-pip-packages branch 2 times, most recently from 4116aab to 990cc85 Compare December 11, 2020 10:43
@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.

@potiuk potiuk force-pushed the change-the-dockerhub-build-process-to-use-pip-packages branch from 990cc85 to 217a86c Compare December 11, 2020 12:38
@potiuk
Copy link
Member Author

potiuk commented Dec 11, 2020

@ashb @kaxil -> I updated this PR a little - i clarified some of the docs/parameters and added some more clarifying comments in the Dockerfile. I also changed the default values in the way than when you just run the docker build . you will get the "true" production build - build from PyPI packages and not from the sources.

This is the final step of making the "Production image" true production-ready and once 2.0 is out, it makes it suitable now to make it into the "Docker official image".

Once we release 2.0 I will complete the work on that:
#11740 -> separate read-only repo with only the image and scripts so that you can build the image without Airflow sources.
#10107 -> apply for the "official docker image" status with that repository.

@potiuk
Copy link
Member Author

potiuk commented Dec 11, 2020

I think it should be good to go @kaxil @ashb. the only failing test is quarantine I believe

@potiuk potiuk requested review from mik-laj and turbaszek December 11, 2020 14:11
@ashb
Copy link
Member

ashb commented Dec 11, 2020

No time to review before Monday most likely, if someone else can review sooner 👍

@potiuk potiuk force-pushed the change-the-dockerhub-build-process-to-use-pip-packages branch from 217a86c to f3dff00 Compare December 11, 2020 17:06
Since we released all teh provider packages to PyPI now in
RC version, we can now change the mechanism to prepare the
production to use released packages in case of tagged builds.

The "branch" production images are still prepared using the
CI images and .whl packages built from sources, but the
release packages are built from officially released PyPI
packages.

Also some corrections and updates were made to the release process:

* the constraint tags when RC candidate is sent should contain
  rcn suffix.

* there was missing step about pushing the release tag once the
  release is out

* pushing tag to GitHub should be done after the PyPI packages
  are uploaded, so that automated image building in DockerHub
  can use those packages.

* added a note that in case we will release some provider
  packages that depend on the just released airflow version
  they shoudl be released after airflow is in PyPI but before
  the tag is pushed to GitHub (also to allow the image to be
  build automatically from the released packages)

Fixes: apache#12970
@potiuk potiuk force-pushed the change-the-dockerhub-build-process-to-use-pip-packages branch from f3dff00 to faee201 Compare December 11, 2020 17:09
@potiuk potiuk added this to the Airflow 2.0rc2 milestone Dec 12, 2020
potiuk and others added 2 commits December 12, 2020 10:51
Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
@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 Dec 12, 2020
@potiuk potiuk merged commit db02773 into apache:master Dec 12, 2020
@potiuk potiuk deleted the change-the-dockerhub-build-process-to-use-pip-packages branch December 12, 2020 11:02
potiuk added a commit that referenced this pull request Dec 13, 2020
* Changes release image preparation to use PyPI packages

Since we released all teh provider packages to PyPI now in
RC version, we can now change the mechanism to prepare the
production to use released packages in case of tagged builds.

The "branch" production images are still prepared using the
CI images and .whl packages built from sources, but the
release packages are built from officially released PyPI
packages.

Also some corrections and updates were made to the release process:

* the constraint tags when RC candidate is sent should contain
  rcn suffix.

* there was missing step about pushing the release tag once the
  release is out

* pushing tag to GitHub should be done after the PyPI packages
  are uploaded, so that automated image building in DockerHub
  can use those packages.

* added a note that in case we will release some provider
  packages that depend on the just released airflow version
  they shoudl be released after airflow is in PyPI but before
  the tag is pushed to GitHub (also to allow the image to be
  build automatically from the released packages)

Fixes: #12970

* Update dev/README_RELEASE_AIRFLOW.md

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

* Update dev/README_RELEASE_AIRFLOW.md

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

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
(cherry picked from commit db02773)
kaxil pushed a commit that referenced this pull request Jan 21, 2021
* Changes release image preparation to use PyPI packages

Since we released all teh provider packages to PyPI now in
RC version, we can now change the mechanism to prepare the
production to use released packages in case of tagged builds.

The "branch" production images are still prepared using the
CI images and .whl packages built from sources, but the
release packages are built from officially released PyPI
packages.

Also some corrections and updates were made to the release process:

* the constraint tags when RC candidate is sent should contain
  rcn suffix.

* there was missing step about pushing the release tag once the
  release is out

* pushing tag to GitHub should be done after the PyPI packages
  are uploaded, so that automated image building in DockerHub
  can use those packages.

* added a note that in case we will release some provider
  packages that depend on the just released airflow version
  they shoudl be released after airflow is in PyPI but before
  the tag is pushed to GitHub (also to allow the image to be
  build automatically from the released packages)

Fixes: #12970

* Update dev/README_RELEASE_AIRFLOW.md

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

* Update dev/README_RELEASE_AIRFLOW.md

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

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
(cherry picked from commit db02773)
kaxil pushed a commit that referenced this pull request Jan 22, 2021
* Changes release image preparation to use PyPI packages

Since we released all teh provider packages to PyPI now in
RC version, we can now change the mechanism to prepare the
production to use released packages in case of tagged builds.

The "branch" production images are still prepared using the
CI images and .whl packages built from sources, but the
release packages are built from officially released PyPI
packages.

Also some corrections and updates were made to the release process:

* the constraint tags when RC candidate is sent should contain
  rcn suffix.

* there was missing step about pushing the release tag once the
  release is out

* pushing tag to GitHub should be done after the PyPI packages
  are uploaded, so that automated image building in DockerHub
  can use those packages.

* added a note that in case we will release some provider
  packages that depend on the just released airflow version
  they shoudl be released after airflow is in PyPI but before
  the tag is pushed to GitHub (also to allow the image to be
  build automatically from the released packages)

Fixes: #12970

* Update dev/README_RELEASE_AIRFLOW.md

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

* Update dev/README_RELEASE_AIRFLOW.md

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

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
(cherry picked from commit db02773)
kaxil pushed a commit that referenced this pull request Jan 22, 2021
* Changes release image preparation to use PyPI packages

Since we released all teh provider packages to PyPI now in
RC version, we can now change the mechanism to prepare the
production to use released packages in case of tagged builds.

The "branch" production images are still prepared using the
CI images and .whl packages built from sources, but the
release packages are built from officially released PyPI
packages.

Also some corrections and updates were made to the release process:

* the constraint tags when RC candidate is sent should contain
  rcn suffix.

* there was missing step about pushing the release tag once the
  release is out

* pushing tag to GitHub should be done after the PyPI packages
  are uploaded, so that automated image building in DockerHub
  can use those packages.

* added a note that in case we will release some provider
  packages that depend on the just released airflow version
  they shoudl be released after airflow is in PyPI but before
  the tag is pushed to GitHub (also to allow the image to be
  build automatically from the released packages)

Fixes: #12970

* Update dev/README_RELEASE_AIRFLOW.md

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

* Update dev/README_RELEASE_AIRFLOW.md

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

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
(cherry picked from commit db02773)
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.

Document process for creating/setting up docker images for a new version/release stream
3 participants