Skip to content

Commit ffd8ec8

Browse files
committed
update the manylinux wheel glibc version to 2.28 cherry-pick of pantsbuild#21650)
While trying to land pantsbuild#21528 to was observed that the wheel building jobs were failing during git checkout with wonderful errors like `/__e/node20/bin/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /__e/node20/bin/node)`. This appears to be the same symptoms as actions/checkout#1809 which pointed the the deprecation notice at <https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/>. If this all sounds familiar that is because we *mostly* cleaned this up in pantsbuild#21133, but kept a fewer uses of the older actions for `manylinux2014` compatibility. However, from the notice: "To opt out of this and continue using Node16 while it is still available in the runner, you can choose to set ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true as an ‘env’ in their workflow or as an environment variable on your runner machine. This will *only work until we upgrade the runner removing Node16 later in the spring*. (emphasis added)" From the wheel job failures during pantsbuild#21528 and my attempts to fiddle with all of `ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION`, `ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION`, `ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION` I think the removal time promised for the Spring has finally come, but I'm not that familiar with GitHub Actions and could be missing something. As a consequence the version of both `actions/upload-artifacts` and `actions/checkout` is bumped to `v4`. To make this testable now and in the future, wheels are now build on ci config changes. Why is bumping to `manylinux_2_28` (the next oldest manylinux) not a big deal? The "2.28" refers to glibc [2.28](https://sourceware.org/legacy-ml/libc-alpha/2018-08/msg00003.html) in 2018. That is older than Debian stable and if you need to use software that old you are presumably paying someone for an enterprise distribution. NOTE: I think we should bump the manylinux version in `main` regardless, but if my read if the situation is correct we may need to backport this any active release line. Without this or a more complex change we would also be unable to release after December 5th per pantsbuild#21616. ref pantsbuild#21195 pantsbuild#21616
1 parent 7b5186f commit ffd8ec8

File tree

4 files changed

+88
-66
lines changed

4 files changed

+88
-66
lines changed

.github/workflows/release.yaml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
jobs:
77
build_wheels_linux_arm64:
88
container:
9-
image: quay.io/pypa/manylinux2014_aarch64:latest
9+
image: quay.io/pypa/manylinux_2_28_aarch64:latest
1010
env:
1111
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
1212
PANTS_REMOTE_CACHE_READ: 'false'
@@ -23,7 +23,7 @@ jobs:
2323
- run-id=${{ github.run_id }}
2424
steps:
2525
- name: Check out code
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2727
with:
2828
fetch-depth: 10
2929
ref: ${{ needs.release_info.outputs.build-ref }}
@@ -43,6 +43,14 @@ jobs:
4343
4444
echo "/opt/python/cp39-cp39/bin" >> $GITHUB_PATH
4545
46+
echo "/opt/python/cp310-cp310/bin" >> $GITHUB_PATH
47+
48+
echo "/opt/python/cp311-cp311/bin" >> $GITHUB_PATH
49+
50+
echo "/opt/python/cp312-cp312/bin" >> $GITHUB_PATH
51+
52+
echo "/opt/python/cp313-cp313/bin" >> $GITHUB_PATH
53+
4654
'
4755
- name: Install Protoc
4856
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
@@ -58,7 +66,7 @@ jobs:
5866
- continue-on-error: true
5967
if: always()
6068
name: Upload pants.log
61-
uses: actions/upload-artifact@v3
69+
uses: actions/upload-artifact@v4
6270
with:
6371
name: logs-wheels-and-pex-Linux-ARM64
6472
overwrite: 'true'
@@ -83,7 +91,7 @@ jobs:
8391
timeout-minutes: 90
8492
build_wheels_linux_x86_64:
8593
container:
86-
image: quay.io/pypa/manylinux2014_x86_64:latest
94+
image: quay.io/pypa/manylinux_2_28_x86_64:latest
8795
env:
8896
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
8997
PANTS_REMOTE_CACHE_READ: 'false'
@@ -96,7 +104,7 @@ jobs:
96104
- ubuntu-22.04
97105
steps:
98106
- name: Check out code
99-
uses: actions/checkout@v3
107+
uses: actions/checkout@v4
100108
with:
101109
fetch-depth: 10
102110
ref: ${{ needs.release_info.outputs.build-ref }}
@@ -116,14 +124,22 @@ jobs:
116124
117125
echo "/opt/python/cp39-cp39/bin" >> $GITHUB_PATH
118126
127+
echo "/opt/python/cp310-cp310/bin" >> $GITHUB_PATH
128+
129+
echo "/opt/python/cp311-cp311/bin" >> $GITHUB_PATH
130+
131+
echo "/opt/python/cp312-cp312/bin" >> $GITHUB_PATH
132+
133+
echo "/opt/python/cp313-cp313/bin" >> $GITHUB_PATH
134+
119135
'
120136
- name: Install Protoc
121137
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
122138
with:
123139
repo-token: ${{ secrets.GITHUB_TOKEN }}
124140
version: 23.x
125141
- name: Install Go
126-
uses: actions/setup-go@v4
142+
uses: actions/setup-go@v5
127143
with:
128144
go-version: 1.19.5
129145
- env:
@@ -137,7 +153,7 @@ jobs:
137153
- continue-on-error: true
138154
if: always()
139155
name: Upload pants.log
140-
uses: actions/upload-artifact@v3
156+
uses: actions/upload-artifact@v4
141157
with:
142158
name: logs-wheels-and-pex-Linux-x86_64
143159
overwrite: 'true'

.github/workflows/test.yaml

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,14 @@ jobs:
325325
timeout-minutes: 60
326326
build_wheels_linux_arm64:
327327
container:
328-
image: quay.io/pypa/manylinux2014_aarch64:latest
328+
image: quay.io/pypa/manylinux_2_28_aarch64:latest
329329
env:
330330
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
331331
MODE: debug
332332
PANTS_REMOTE_CACHE_READ: 'false'
333333
PANTS_REMOTE_CACHE_WRITE: 'false'
334-
if: ((github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.release == 'true')) && (needs.classify_changes.outputs.docs_only
335-
!= 'true')
334+
if: ((github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.release == 'true' || needs.classify_changes.outputs.ci_config
335+
== 'true')) && (needs.classify_changes.outputs.docs_only != 'true')
336336
name: Build wheels (Linux-ARM64)
337337
needs:
338338
- classify_changes
@@ -344,7 +344,7 @@ jobs:
344344
- run-id=${{ github.run_id }}
345345
steps:
346346
- name: Check out code
347-
uses: actions/checkout@v3
347+
uses: actions/checkout@v4
348348
with:
349349
fetch-depth: 10
350350
- name: Configure Git
@@ -362,6 +362,14 @@ jobs:
362362
363363
echo "/opt/python/cp39-cp39/bin" >> $GITHUB_PATH
364364
365+
echo "/opt/python/cp310-cp310/bin" >> $GITHUB_PATH
366+
367+
echo "/opt/python/cp311-cp311/bin" >> $GITHUB_PATH
368+
369+
echo "/opt/python/cp312-cp312/bin" >> $GITHUB_PATH
370+
371+
echo "/opt/python/cp313-cp313/bin" >> $GITHUB_PATH
372+
365373
'
366374
- name: Install Protoc
367375
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
@@ -377,30 +385,30 @@ jobs:
377385
- continue-on-error: true
378386
if: always()
379387
name: Upload pants.log
380-
uses: actions/upload-artifact@v3
388+
uses: actions/upload-artifact@v4
381389
with:
382390
name: logs-wheels-and-pex-Linux-ARM64
383391
overwrite: 'true'
384392
path: .pants.d/workdir/*.log
385393
timeout-minutes: 90
386394
build_wheels_linux_x86_64:
387395
container:
388-
image: quay.io/pypa/manylinux2014_x86_64:latest
396+
image: quay.io/pypa/manylinux_2_28_x86_64:latest
389397
env:
390398
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
391399
MODE: debug
392400
PANTS_REMOTE_CACHE_READ: 'false'
393401
PANTS_REMOTE_CACHE_WRITE: 'false'
394-
if: ((github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.release == 'true')) && (needs.classify_changes.outputs.docs_only
395-
!= 'true')
402+
if: ((github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.release == 'true' || needs.classify_changes.outputs.ci_config
403+
== 'true')) && (needs.classify_changes.outputs.docs_only != 'true')
396404
name: Build wheels (Linux-x86_64)
397405
needs:
398406
- classify_changes
399407
runs-on:
400408
- ubuntu-22.04
401409
steps:
402410
- name: Check out code
403-
uses: actions/checkout@v3
411+
uses: actions/checkout@v4
404412
with:
405413
fetch-depth: 10
406414
- name: Configure Git
@@ -418,14 +426,22 @@ jobs:
418426
419427
echo "/opt/python/cp39-cp39/bin" >> $GITHUB_PATH
420428
429+
echo "/opt/python/cp310-cp310/bin" >> $GITHUB_PATH
430+
431+
echo "/opt/python/cp311-cp311/bin" >> $GITHUB_PATH
432+
433+
echo "/opt/python/cp312-cp312/bin" >> $GITHUB_PATH
434+
435+
echo "/opt/python/cp313-cp313/bin" >> $GITHUB_PATH
436+
421437
'
422438
- name: Install Protoc
423439
uses: arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9
424440
with:
425441
repo-token: ${{ secrets.GITHUB_TOKEN }}
426442
version: 23.x
427443
- name: Install Go
428-
uses: actions/setup-go@v4
444+
uses: actions/setup-go@v5
429445
with:
430446
go-version: 1.19.5
431447
- env:
@@ -439,7 +455,7 @@ jobs:
439455
- continue-on-error: true
440456
if: always()
441457
name: Upload pants.log
442-
uses: actions/upload-artifact@v3
458+
uses: actions/upload-artifact@v4
443459
with:
444460
name: logs-wheels-and-pex-Linux-x86_64
445461
overwrite: 'true'
@@ -451,8 +467,8 @@ jobs:
451467
MODE: debug
452468
PANTS_REMOTE_CACHE_READ: 'false'
453469
PANTS_REMOTE_CACHE_WRITE: 'false'
454-
if: ((github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.release == 'true')) && (needs.classify_changes.outputs.docs_only
455-
!= 'true')
470+
if: ((github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.release == 'true' || needs.classify_changes.outputs.ci_config
471+
== 'true')) && (needs.classify_changes.outputs.docs_only != 'true')
456472
name: Build wheels (macOS10-15-x86_64)
457473
needs:
458474
- classify_changes
@@ -520,8 +536,8 @@ jobs:
520536
MODE: debug
521537
PANTS_REMOTE_CACHE_READ: 'false'
522538
PANTS_REMOTE_CACHE_WRITE: 'false'
523-
if: ((github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.release == 'true')) && (needs.classify_changes.outputs.docs_only
524-
!= 'true')
539+
if: ((github.repository_owner == 'pantsbuild') && (needs.classify_changes.outputs.release == 'true' || needs.classify_changes.outputs.ci_config
540+
== 'true')) && (needs.classify_changes.outputs.docs_only != 'true')
525541
name: Build wheels (macOS11-ARM64)
526542
needs:
527543
- classify_changes

docs/notes/2.24.x.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# 2.24.x Release Series
23

34
Pants 2 is a fast, scalable, user-friendly build system for codebases of all sizes. It's currently focused on Python, Go, Java, Scala, Kotlin, Shell, and Docker, with support for other languages and frameworks coming soon.
@@ -135,6 +136,8 @@ PyO3, the interface crate between Rust and Python, has been upgraded to v0.22.x.
135136

136137
Previously `SetupKwargs` took `_allow_banned_keys` which would allow one to pass in certain critical setuptools args (ex: `install_requires`) that Pants calculates for you. If you Really Really know what you are doing you can know also use `_overwrite_banned_keys` to exclusively use your own values and ignore the Pants calculated ones.
137138

139+
The oldest [glibc version](https://www.sourceware.org/glibc/wiki/Glibc%20Timeline) supported by the published Pants wheels is now 2.28. This should have no effect unless you are running on extremely old Linux distributions. See <https://github.com/pypa/manylinux> for background context on Python wheels and C libraries.
140+
138141
## Full Changelog
139142

140143
For the full changelog, see the individual GitHub Releases for this series: <https://github.com/pantsbuild/pants/releases>

src/python/pants_release/generate_github_workflows.py

Lines changed: 31 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,27 @@
1818
from pants_release.common import die
1919

2020

21-
def action(name: str, node16_compat: bool = False) -> str:
22-
# Versions of actions compatible with node16 and the `ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION` setting.
23-
# glibc 2.17 is required to build manylinux_2014 wheels, but node.js does do not ship glibc 2.17 compatible
24-
# binaries for node >= v17.
25-
if node16_compat:
26-
version_map = {
27-
"checkout": "actions/checkout@v3",
28-
"upload-artifact": "actions/upload-artifact@v3",
29-
"setup-go": "actions/setup-go@v4",
30-
}
31-
else:
32-
version_map = {
33-
"action-send-mail": "dawidd6/action-send-mail@v3.8.0",
34-
"cache": "actions/cache@v4",
35-
"checkout": "actions/checkout@v4",
36-
"download-artifact": "actions/download-artifact@v4",
37-
"github-action-required-labels": "mheap/github-action-required-labels@v4.0.0",
38-
"rust-cache": "benjyw/rust-cache@5ed697a6894712d2854c80635bb00a2496ea307a",
39-
"setup-go": "actions/setup-go@v5",
40-
"setup-java": "actions/setup-java@v4",
41-
"setup-node": "actions/setup-node@v4",
42-
"setup-protoc": "arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9",
43-
"setup-python": "actions/setup-python@v5",
44-
"slack-github-action": "slackapi/slack-github-action@v1.24.0",
45-
"upload-artifact": "actions/upload-artifact@v4",
46-
}
21+
def action(name: str) -> str:
22+
version_map = {
23+
"action-send-mail": "dawidd6/action-send-mail@v3.8.0",
24+
"cache": "actions/cache@v4",
25+
"checkout": "actions/checkout@v4",
26+
"download-artifact": "actions/download-artifact@v4",
27+
"github-action-required-labels": "mheap/github-action-required-labels@v4.0.0",
28+
"rust-cache": "benjyw/rust-cache@5ed697a6894712d2854c80635bb00a2496ea307a",
29+
"setup-go": "actions/setup-go@v5",
30+
"setup-java": "actions/setup-java@v4",
31+
"setup-node": "actions/setup-node@v4",
32+
"setup-protoc": "arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9",
33+
"setup-python": "actions/setup-python@v5",
34+
"slack-github-action": "slackapi/slack-github-action@v1.24.0",
35+
"upload-artifact": "actions/upload-artifact@v4",
36+
}
4737
try:
4838
return version_map[name]
4939
except KeyError as e:
50-
configured_version = (
51-
"Node 16 compatible version configured" if node16_compat else "version configured"
52-
)
5340
raise ValueError(
54-
f"Requested github action '{name}' does not have a {configured_version}.\n"
41+
f"Requested github action '{name}' does not have a version configured.\n"
5542
f"Current known versions: {version_map}"
5643
) from e
5744

@@ -126,7 +113,7 @@ def hash_files(path: str) -> str:
126113
PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.12", "3.13", "3.11"]
127114

128115
DONT_SKIP_RUST = "needs.classify_changes.outputs.rust == 'true'"
129-
DONT_SKIP_WHEELS = "needs.classify_changes.outputs.release == 'true'"
116+
DONT_SKIP_WHEELS = "needs.classify_changes.outputs.release == 'true' || needs.classify_changes.outputs.ci_config == 'true'"
130117
IS_PANTS_OWNER = "github.repository_owner == 'pantsbuild'"
131118

132119
# NB: This overrides `pants.ci.toml`.
@@ -238,7 +225,7 @@ def checkout(
238225
# We need to fetch a few commits back, to be able to access HEAD^2 in the PR case.
239226
{
240227
"name": "Check out code",
241-
"uses": action("checkout", node16_compat=containerized),
228+
"uses": action("checkout"),
242229
"with": {
243230
**fetch_depth_opt,
244231
**({"ref": ref} if ref else {}),
@@ -367,10 +354,10 @@ def install_jdk() -> Step:
367354
}
368355

369356

370-
def install_go(node16_compat: bool = False) -> Step:
357+
def install_go() -> Step:
371358
return {
372359
"name": "Install Go",
373-
"uses": action("setup-go", node16_compat=node16_compat),
360+
"uses": action("setup-go"),
374361
"with": {"go-version": "1.19.5"},
375362
}
376363

@@ -584,10 +571,10 @@ def bootstrap_pants(self) -> Sequence[Step]:
584571
self.native_binaries_upload(),
585572
]
586573

587-
def upload_log_artifacts(self, name: str, node16_compat: bool = False) -> Step:
574+
def upload_log_artifacts(self, name: str) -> Step:
588575
return {
589576
"name": "Upload pants.log",
590-
"uses": action("upload-artifact", node16_compat=node16_compat),
577+
"uses": action("upload-artifact"),
591578
"if": "always()",
592579
"continue-on-error": True,
593580
"with": {
@@ -836,9 +823,9 @@ def build_wheels_job(
836823
# the code, install rustup and expose Pythons.
837824
# TODO: Apply rust caching here.
838825
if platform == Platform.LINUX_X86_64:
839-
container = {"image": "quay.io/pypa/manylinux2014_x86_64:latest"}
826+
container = {"image": "quay.io/pypa/manylinux_2_28_x86_64:latest"}
840827
elif platform == Platform.LINUX_ARM64:
841-
container = {"image": "quay.io/pypa/manylinux2014_aarch64:latest"}
828+
container = {"image": "quay.io/pypa/manylinux_2_28_aarch64:latest"}
842829
else:
843830
container = None
844831

@@ -853,6 +840,10 @@ def build_wheels_job(
853840
echo "/opt/python/cp37-cp37m/bin" >> $GITHUB_PATH
854841
echo "/opt/python/cp38-cp38/bin" >> $GITHUB_PATH
855842
echo "/opt/python/cp39-cp39/bin" >> $GITHUB_PATH
843+
echo "/opt/python/cp310-cp310/bin" >> $GITHUB_PATH
844+
echo "/opt/python/cp311-cp311/bin" >> $GITHUB_PATH
845+
echo "/opt/python/cp312-cp312/bin" >> $GITHUB_PATH
846+
echo "/opt/python/cp313-cp313/bin" >> $GITHUB_PATH
856847
"""
857848
),
858849
},
@@ -891,11 +882,7 @@ def build_wheels_job(
891882
"steps": [
892883
*initial_steps,
893884
install_protoc(), # for prost crate
894-
*(
895-
[]
896-
if platform == Platform.LINUX_ARM64
897-
else [install_go(node16_compat=bool(container))]
898-
),
885+
*([] if platform == Platform.LINUX_ARM64 else [install_go()]),
899886
{
900887
"name": "Build wheels",
901888
"run": "./pants run src/python/pants_release/release.py -- build-wheels",
@@ -906,7 +893,7 @@ def build_wheels_job(
906893
"run": "./pants package src/python/pants:pants-pex",
907894
"env": helper.platform_env(),
908895
},
909-
helper.upload_log_artifacts(name="wheels-and-pex", node16_compat=bool(container)),
896+
helper.upload_log_artifacts(name="wheels-and-pex"),
910897
*(
911898
[
912899
{

0 commit comments

Comments
 (0)