-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update to Python 3.12.x (#5736) #5951
base: develop
Are you sure you want to change the base?
Update to Python 3.12.x (#5736) #5951
Conversation
b810ca2
to
c09e7d4
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5951 +/- ##
===========================================
- Coverage 85.35% 85.34% -0.01%
===========================================
Files 155 155
Lines 20779 20789 +10
===========================================
+ Hits 17735 17743 +8
- Misses 3044 3046 +2 ☔ View full report in Codecov by Sentry. |
c09e7d4
to
e4c1675
Compare
ed4b5e1
to
858f6fb
Compare
0762297
to
3f7f6ce
Compare
e4c1675
to
3ab9f81
Compare
3ab9f81
to
ca1c534
Compare
c6c31f6
to
9dd4804
Compare
af1fdf3
to
b2bb083
Compare
IT failure due to combination of FIPS mode & the new bookworm-based Python image can be replicated with these commands:
Terminal log:
|
310fbe5
to
ee38a8a
Compare
ee38a8a
to
70f573d
Compare
Successful test mounting to
Output:
|
Simplified version below.
|
Here's a simplified version of the reproduction as a paste-able one-liner for GitLab
This ends in
The reason is that the InRelease file from Docker's package repository contains MD5 hashes of the files in the release. It also includes a SHA1 and SHA256 hash for each file. The file is signed so when Most |
As to why the With Docker Desktop with macOS the host is not the physical machine but a VM running a minimal Linux distro (LinuxKit). This distro and kernel don't provide The key observation is that we don't need the We can Index: Dockerfile
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/Dockerfile b/Dockerfile
--- a/Dockerfile (revision 70f573de7639abf1180a0d78b575ea7b71a7a64a)
+++ b/Dockerfile (date 1730396147875)
@@ -46,7 +46,8 @@
RUN install -m 0755 -d /etc/apt/keyrings
COPY --chmod=0644 bin/keys/docker-apt-keyring.pgp /etc/apt/keyrings/docker.gpg
ARG azul_docker_version
-RUN --mount=type=bind,source=fips_enabled,target=/proc/sys/crypto/fips_enabled \
+ARG azul_proc_sys_crypto=/tmp
+RUN --mount=type=bind,source=fips_enabled,target=${azul_proc_sys_crypto}/fips_enabled \
set -o pipefail \
&& ( \
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" \ and then override Alternatively, we could disable FIPS mode on the instance. Independently, we should ask Docker to remove the MD5 hashes from their Assignee to try the first workaround on |
Resolves error with libgcrypt on bookworm: Fatal error in libgcrypt, requested algo not in md context
70f573d
to
0e71eec
Compare
docker/docker-ce-packaging#1096 I also created #6675 so that we can add a FIXME referring to it in this PR. |
Fulfills transitive requirement of distutils, which Python 3.12 removed from the standard library
For Python 3.12 support
Resolves error during `make requirements`: × Building wheel for jq (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [1390 lines of output] running bdist_wheel running build running build_ext ... jq.c:12124:55: error: no member named 'ob_digit' in 'struct _longobject' const digit* digits = ((PyLongObject*)x)->ob_digit; ~~~~~~~~~~~~~~~~~~ ^ jq.c:13608:47: error: no member named 'ob_digit' in 'struct _longobject' const digit* digits = ((PyLongObject*)b)->ob_digit; ~~~~~~~~~~~~~~~~~~ ^ 41 warnings and 7 errors generated. error: command '/usr/bin/clang' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for jq
Resolves errors originating from flake8 failing to parse f-strings under Python 3.12 E122 continuation line missing indentation or outdented E131 continuation line unaligned for hanging indent E202 whitespace before ')' E202 whitespace before ']' E202 whitespace before '}' E203 whitespace before ':' E221 multiple spaces before operator E222 multiple spaces after operator E225 missing whitespace around operator E231 missing whitespace after ',' E231 missing whitespace after ':' E231 missing whitespace after ';' E271 multiple spaces after keyword E272 multiple spaces before keyword E702 multiple statements on one line (semicolon) E713 test for membership should be 'not in' W604 backticks are deprecated, use 'repr()'
Resolves error during `make requirements_update`: 19.11 Building wheels for collected packages: fastavro 19.11 Building wheel for fastavro (pyproject.toml): started 36.96 Building wheel for fastavro (pyproject.toml): finished with status 'error' 36.97 error: subprocess-exited-with-error 36.97 36.97 × Building wheel for fastavro (pyproject.toml) did not run successfully. 36.97 │ exit code: 1 36.97 ╰─> [73 lines of output] 36.97 <string>:31: SyntaxWarning: invalid escape sequence '\(' 36.97 running bdist_wheel 36.97 running build … 36.97 gcc: internal compiler error: Illegal instruction signal terminated program as 36.97 Please submit a full bug report, 36.97 with preprocessed source if appropriate. 36.97 See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions. 36.97 error: command '/usr/bin/gcc' failed with exit code 4 36.97 [end of output]
Resolves error during test: ERROR: test_openapi (integration_test.OpenAPIIntegrationTest.test_openapi) (component='service') ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/daniel/repo/azul1/test/integration_test.py", line 1856, in test_openapi validate_spec(spec) File "/Users/daniel/repo/azul1/.venv/lib/python3.12/site-packages/openapi_spec_validator/shortcuts.py", line 17, in validate_spec return validator.validate(spec, spec_url=spec_url) ... AttributeError: '_io.BufferedReader' object has no attribute 'decode'
Resolves DeprecationWarning during schema validation: Traceback (most recent call last): File "/Users/daniel/.pyenv/versions/3.12.6/lib/python3.12/unittest/suite.py", line 306, in _tearDownPreviousClass tearDownClass() AssertionError: ["{message : DeprecationWarning('Automatically retrieving remote references can be a security vulnerability and is discouraged by the JSON Schema specifications. Relying on this behavior is deprecated and will shortly become an error. If you are sure you want to remotely retrieve your reference and that it is safe to do so, you can find instructions for doing so via referencing.Registry in the referencing documentation (https://referencing.readthedocs.org).'), category : 'DeprecationWarning', filename : '/Users/daniel/repo/azul1/.venv/lib/python3.12/site-packages/jsonschema/exceptions.py', lineno : 475, line : None}", ...]
Resolves finding during `make pep8`: F842 local variable 'cs' is annotated but never used
Resolves finding during `make pep8` E122 continuation line missing indentation or outdented
Resolves error during test: AttributeError: 'not_called' is not a valid assertion. Use a spec for the mock if 'not_called' is meant to be an attribute.
0e71eec
to
967df55
Compare
Connected issues: #5736
Checklist
Author
develop
issues/<GitHub handle of author>/<issue#>-<slug>
1 when the issue title describes a problem, the corresponding PR
title is
Fix:
followed by the issue titleAuthor (partiality)
p
tag to titles of partial commitspartial
or completely resolves all connected issuespartial
labelAuthor (chains)
base
or this PR is not chained to another PRchained
or is not chained to another PRAuthor (reindex, API changes)
r
tag to commit title or the changes introduced by this PR will not require reindexing of any deploymentreindex:dev
or the changes introduced by it will not require reindexing ofdev
reindex:anvildev
or the changes introduced by it will not require reindexing ofanvildev
reindex:anvilprod
or the changes introduced by it will not require reindexing ofanvilprod
reindex:prod
or the changes introduced by it will not require reindexing ofprod
reindex:partial
and its description documents the specific reindexing procedure fordev
,anvildev
,anvilprod
andprod
or requires a full reindex or carries none of the labelsreindex:dev
,reindex:anvildev
,reindex:anvilprod
andreindex:prod
API
or this PR does not modify a REST APIa
(A
) tag to commit title for backwards (in)compatible changes or this PR does not modify a REST APIapp.py
or this PR does not modify a REST APIAuthor (upgrading deployments)
make docker_images.json
and committed the resulting changes or this PR does not modifyazul_docker_images
, or any other variables referenced in the definition of that variableu
tag to commit title or this PR does not require upgrading deploymentsupgrade
or does not require upgrading deploymentsdeploy:shared
or does not modifydocker_images.json
, and does not require deploying theshared
component for any other reasondeploy:gitlab
or does not require deploying thegitlab
componentdeploy:runner
or does not require deploying therunner
imageAuthor (hotfixes)
F
tag to main commit title or this PR does not include permanent fix for a temporary hotfixanvilprod
andprod
) have temporary hotfixes for any of the issues connected to this PRAuthor (before every review)
develop
, squashed old fixupsmake requirements_update
or this PR does not modifyrequirements*.txt
,common.mk
,Makefile
andDockerfile
R
tag to commit title or this PR does not modifyrequirements*.txt
reqs
or does not modifyrequirements*.txt
make integration_test
passes in personal deployment or this PR does not modify functionality that could affect the IT outcomePeer reviewer (after approval)
System administrator (after approval)
demo
orno demo
no demo
no sandbox
N reviews
label is accurateOperator (before pushing merge the commit)
reindex:…
labels andr
commit title tagno demo
develop
_select dev.shared && CI_COMMIT_REF_NAME=develop make -C terraform/shared apply_keep_unused
or this PR is not labeleddeploy:shared
_select dev.gitlab && CI_COMMIT_REF_NAME=develop make -C terraform/gitlab apply
or this PR is not labeleddeploy:gitlab
_select anvildev.shared && CI_COMMIT_REF_NAME=develop make -C terraform/shared apply_keep_unused
or this PR is not labeleddeploy:shared
_select anvildev.gitlab && CI_COMMIT_REF_NAME=develop make -C terraform/gitlab apply
or this PR is not labeleddeploy:gitlab
deploy:gitlab
deploy:gitlab
System administrator
dev.gitlab
are complete or this PR is not labeleddeploy:gitlab
anvildev.gitlab
are complete or this PR is not labeleddeploy:gitlab
Operator (before pushing merge the commit)
_select dev.gitlab && make -C terraform/gitlab/runner
or this PR is not labeleddeploy:runner
_select anvildev.gitlab && make -C terraform/gitlab/runner
or this PR is not labeleddeploy:runner
sandbox
label or PR is labeledno sandbox
dev
or PR is labeledno sandbox
anvildev
or PR is labeledno sandbox
sandbox
deployment or PR is labeledno sandbox
anvilbox
deployment or PR is labeledno sandbox
sandbox
deployment or PR is labeledno sandbox
anvilbox
deployment or PR is labeledno sandbox
sandbox
or this PR does not remove catalogs or otherwise causes unreferenced indices indev
anvilbox
or this PR does not remove catalogs or otherwise causes unreferenced indices inanvildev
sandbox
or this PR is not labeledreindex:dev
anvilbox
or this PR is not labeledreindex:anvildev
sandbox
or this PR is not labeledreindex:dev
anvilbox
or this PR is not labeledreindex:anvildev
p
if the PR is also labeledpartial
Operator (chain shortening)
develop
or this PR is not labeledbase
chained
label from the blocked PR or this PR is not labeledbase
base
base
label from this PR or this PR is not labeledbase
Operator (after pushing the merge commit)
dev
anvildev
dev
dev
anvildev
anvildev
_select dev.shared && make -C terraform/shared apply
or this PR is not labeleddeploy:shared
_select anvildev.shared && make -C terraform/shared apply
or this PR is not labeleddeploy:shared
dev
anvildev
Operator (reindex)
dev
or this PR is neither labeledreindex:partial
norreindex:dev
anvildev
or this PR is neither labeledreindex:partial
norreindex:anvildev
dev
or this PR is neither labeledreindex:partial
norreindex:dev
anvildev
or this PR is neither labeledreindex:partial
norreindex:anvildev
dev
or this PR is neither labeledreindex:partial
norreindex:dev
anvildev
or this PR is neither labeledreindex:partial
norreindex:anvildev
dev
or this PR does not require reindexingdev
anvildev
or this PR does not require reindexinganvildev
dev
or this PR does not require reindexingdev
anvildev
or this PR does not require reindexinganvildev
dev
or this PR does not require reindexingdev
anvildev
or this PR does not require reindexinganvildev
Operator
deploy:shared
,deploy:gitlab
,deploy:runner
,API
,reindex:partial
,reindex:anvilprod
andreindex:prod
labels to the next promotion PRs or this PR carries none of these labelsdeploy:shared
,deploy:gitlab
,deploy:runner
,API
,reindex:partial
,reindex:anvilprod
andreindex:prod
labels, from the description of this PR to that of the next promotion PRs or this PR carries none of these labelsShorthand for review comments
L
line is too longW
line wrapping is wrongQ
bad quotesF
other formatting problem