Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Make golden image digests work with Python 3.9 #2098

Merged
merged 3 commits into from
May 30, 2022

Conversation

bpcreech
Copy link
Contributor

@bpcreech bpcreech commented May 28, 2022

This fixes #2097 wherein image_test fails with Python 3.9+

For future reference this commit was generated with:

bazel test tests/container:image_test
grep sha256: .../testlogs/tests/container/image_test/test.log  | grep Assertion | sed -r 's@AssertionError: .sha256:(.*). != .sha256:(.*).@s/\2/\1/@' > /tmp/seds
sed -f /tmp/seds -i tests/container/image_test.py

# then repeat the above a couple times because some of the digest errors are only exposed after you fix the first ones.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • (n/a) Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

This test fails with Python 3.9 and it looks like the best fix is to change the golden image digests to match the new reality.

Issue Number: #2097

What is the new behavior?

Just new digests in the test to match CPython 3.9 tarfile behavior.

Does this PR introduce a breaking change?

  • Yes
  • No

Technically Python 3.9 creates a breaking changes in that the image digests generated by rules_docker aren't reproducible across the upgrade from Python <=3.8, but this PR didn't create and doesn't attempt to change that situation.

Other information

@smukherj1 smukherj1 merged commit d98c136 into bazelbuild:master May 30, 2022
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 22, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 22, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 22, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 23, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 23, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 23, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 23, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 23, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 23, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 23, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 23, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 23, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 23, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
zevdg added a commit to zevdg/rules_docker that referenced this pull request Aug 23, 2022
We had to do this recently with bazelbuild#2098.  This is also useful for organisations that link against different zlib implementations (namely zlib-ng). This change makes it possible to easily swap out the hashes without modifying the test code.
Copy link

@dpward dpward left a comment

Choose a reason for hiding this comment

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

Ubuntu 21.04 was not an LTS release, and was unsupported several months before this commit...

Did you mean ubuntu2204?

AugustKarlstedt added a commit to AugustKarlstedt/rules_docker that referenced this pull request Oct 12, 2022
@AugustKarlstedt
Copy link
Contributor

ubuntu2104 no longer has dockerci installed? see bazelbuild/continuous-integration#1422
should this be reverted?

St0rmingBr4in pushed a commit to St0rmingBr4in/rules_docker that referenced this pull request Oct 17, 2022
* Make golden image digests work with Python 3.9

This fixes bazelbuild#2097

* Upgrade tests to Ubuntu 2104

* Update file_test golden digests

Co-authored-by: Ben Creech <bpcreech@google.com>
AugustKarlstedt added a commit to AugustKarlstedt/rules_docker that referenced this pull request Jan 14, 2023
AugustKarlstedt added a commit to AugustKarlstedt/rules_docker that referenced this pull request Jan 14, 2023
Update BUILD

revert some stuff from bazelbuild#2098

goldens

n

Revert "n"

This reverts commit 8c094e7.

Revert "goldens"

This reverts commit ce1ff41.

Revert "revert some stuff from bazelbuild#2098"

This reverts commit afb5787.

Revert "Update presubmit.yml"

This reverts commit bf40dad.
AugustKarlstedt added a commit to AugustKarlstedt/rules_docker that referenced this pull request Jan 14, 2023
Update presubmit.yml

Update BUILD

Update BUILD

revert some stuff from bazelbuild#2098

goldens

n

Revert "n"

This reverts commit 8c094e7.

Revert "goldens"

This reverts commit ce1ff41.

Revert "revert some stuff from bazelbuild#2098"

This reverts commit afb5787.

Revert "Update presubmit.yml"

This reverts commit bf40dad.
uhthomas pushed a commit that referenced this pull request Jan 14, 2023
Update presubmit.yml

Update BUILD

Update BUILD

revert some stuff from #2098

goldens

n

Revert "n"

This reverts commit 8c094e7.

Revert "goldens"

This reverts commit ce1ff41.

Revert "revert some stuff from #2098"

This reverts commit afb5787.

Revert "Update presubmit.yml"

This reverts commit bf40dad.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image digests change in Python 3.9, image_test fails
4 participants