Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Jan 7, 2022

There was some "junk" output generated by the scripts that are
used in Airflow image building. The junk has been cleaned up so
that no unnecessary warnings are generated.

This change includes:

  • making sure that when everything is fine, there are no
    warnnings generated by PROD docker build proces

  • making sure that when CI image is build the only remaining
    warning is "Using root" - this warning cannot be silenced
    Add an opt-out for the “running as root” warning pypa/pip#10556 and instead
    in CI build we explain in green that this is invalid warning

  • the "scripted" steps of docker build have nicely blue headers
    that visually separate steps of building the iamge and give
    more information on what's going on

  • the current way of printing ouput will play very nicely with
    BUILDKIT UI where Blue color indicates progress in building

Separated out from #20238


^ 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 mik-laj as code owners January 7, 2022 13:11
@boring-cyborg boring-cyborg bot added area:dev-tools area:production-image Production image improvements and fixes labels Jan 7, 2022
@potiuk
Copy link
Member Author

potiuk commented Jan 7, 2022

This PR is based on #20744, so please only check last commit until the previous PR is merged.

@potiuk potiuk requested a review from uranusjr January 7, 2022 13:13
@potiuk potiuk force-pushed the cleaner-output-in-docker-builds branch 3 times, most recently from b82d349 to 7a260e5 Compare January 7, 2022 16:25
@potiuk potiuk force-pushed the cleaner-output-in-docker-builds branch 2 times, most recently from 3cf035a to 9e4ddeb Compare January 8, 2022 17:54
@potiuk
Copy link
Member Author

potiuk commented Jan 8, 2022

Here are some screenshots of the results:

This is the "clean" output (no warning + blue separators for steps in PROD image). I managed to have "red-free" build in normal circumstances (will be important when our image will be come "official image").

image

This is an example of the CI build where we cannot get rid of the 'root' warning - I just added explanation (once). This is less important to avoid warnings in this case becasue it is purely internal. And while not ideal, it's also not as crucial as PROD image:

image

There was some "junk" output generated by the scripts that are
used in Airflow image building. The junk has been cleaned up so
that no unnecessary warnings are generated.

This change includes:

* making sure that when everything is fine, there are no
  warnnings generated by PROD docker build proces

* making sure that when CI image is build the only remaining
  warning is "Using root" - this warning cannot be silenced
  pypa/pip#10556 and instead
  in CI build we explain in green that this is invalid warning

* the "scripted" steps of docker build have nicely blue headers
  that visually separate steps of building the iamge and give
  more information on what's going on

* the current way of printing ouput will play very nicely with
  BUILDKIT UI where Blue color indicates progress in building

Separated out from apache#20238
@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 main 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 Jan 10, 2022
@potiuk potiuk merged commit 4d33ebf into apache:main Jan 10, 2022
@potiuk potiuk deleted the cleaner-output-in-docker-builds branch January 10, 2022 05:46
@potiuk potiuk linked an issue Jan 10, 2022 that may be closed by this pull request
@potiuk potiuk added this to the Airflow 2.2.4 milestone Jan 20, 2022
@potiuk potiuk added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jan 22, 2022
potiuk added a commit that referenced this pull request Jan 22, 2022
There was some "junk" output generated by the scripts that are
used in Airflow image building. The junk has been cleaned up so
that no unnecessary warnings are generated.

This change includes:

* making sure that when everything is fine, there are no
  warnnings generated by PROD docker build proces

* making sure that when CI image is build the only remaining
  warning is "Using root" - this warning cannot be silenced
  pypa/pip#10556 and instead
  in CI build we explain in green that this is invalid warning

* the "scripted" steps of docker build have nicely blue headers
  that visually separate steps of building the iamge and give
  more information on what's going on

* the current way of printing ouput will play very nicely with
  BUILDKIT UI where Blue color indicates progress in building

Separated out from #20238

(cherry picked from commit 4d33ebf)
jedcunningham pushed a commit that referenced this pull request Jan 27, 2022
There was some "junk" output generated by the scripts that are
used in Airflow image building. The junk has been cleaned up so
that no unnecessary warnings are generated.

This change includes:

* making sure that when everything is fine, there are no
  warnnings generated by PROD docker build proces

* making sure that when CI image is build the only remaining
  warning is "Using root" - this warning cannot be silenced
  pypa/pip#10556 and instead
  in CI build we explain in green that this is invalid warning

* the "scripted" steps of docker build have nicely blue headers
  that visually separate steps of building the iamge and give
  more information on what's going on

* the current way of printing ouput will play very nicely with
  BUILDKIT UI where Blue color indicates progress in building

Separated out from #20238

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

Labels

area:dev-tools area:production-image Production image improvements and fixes changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) 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.

Make sure that stderr is "clean" while building the images.

3 participants