Skip to content

Commit 607cf12

Browse files
committed
Merge remote-tracking branch 'origin' into feat-core-metadata
2 parents 1f31915 + 0bb0c6d commit 607cf12

File tree

4 files changed

+286
-15
lines changed

4 files changed

+286
-15
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ jobs:
5454
needs: [linux, macos]
5555
if: github.event_name != 'pull_request'
5656
runs-on: ubuntu-latest
57+
permissions:
58+
id-token: write
59+
contents: read
5760
steps:
5861
- uses: actions/checkout@v3
5962
- uses: actions/setup-python@v4
@@ -64,8 +67,8 @@ jobs:
6467
with:
6568
path: dist
6669
- run: python3 -um make_index --pypi-url https://pypi.devinfra.sentry.io --dest index
67-
- uses: google-github-actions/auth@v0
70+
- uses: google-github-actions/auth@ba79af03959ebeac9769e648f473a284504d9193 # v2.1.10
6871
with:
69-
credentials_json: ${{ secrets.PYPI_DEVINFRA_SENTRY_IO }}
70-
- run: yes | gcloud auth login --cred-file="$GOOGLE_APPLICATION_CREDENTIALS"
72+
workload_identity_provider: projects/868781662168/locations/global/workloadIdentityPools/prod-github/providers/github-oidc-pool
73+
service_account: [email protected]
7174
- run: python3 -uS bin/upload-artifacts

bin/upload-artifacts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import os.path
66
import shlex
77
import subprocess
88

9-
CACHE_ONE_HOUR = ("-h", "Cache-Control: public, max-age=3600") # gcs default
10-
CACHE_FIVE_MINUTES = ("-h", "Cache-Control: public, max-age=300")
11-
CACHE_NO = ("-h", "Cache-Control: no-store")
9+
CACHE_ONE_HOUR = ("--cache-control", "public, max-age=3600") # gcs default
10+
CACHE_FIVE_MINUTES = ("--cache-control", "public, max-age=300")
11+
CACHE_NO = ("--cache-control", "no-store")
1212

1313

1414
def main() -> int:
@@ -24,20 +24,20 @@ def main() -> int:
2424
cmds = (
2525
# upload wheels first before the index
2626
(
27-
"gsutil",
28-
*CACHE_ONE_HOUR, # these are immutable so cache at default
29-
"-m", # parallel
27+
"gcloud",
28+
"storage",
3029
"cp",
3130
"-n", # no-clobber
31+
*CACHE_ONE_HOUR, # these are immutable so cache at default
3232
os.path.join(args.index, "wheels", "*"),
3333
"gs://pypi.devinfra.sentry.io/wheels/",
3434
),
3535
# upload the site parts in clobber mode (may be updating pages)
3636
(
37-
"gsutil",
38-
*CACHE_FIVE_MINUTES, # shorter than default to make pip snappier
39-
"-m", # parallel
37+
"gcloud",
38+
"storage",
4039
"cp",
40+
*CACHE_FIVE_MINUTES, # shorter than default to make pip snappier
4141
"-r", # recursive
4242
*(
4343
os.path.join(args.index, name)
@@ -47,10 +47,11 @@ def main() -> int:
4747
"gs://pypi.devinfra.sentry.io",
4848
),
4949
(
50-
"gsutil",
50+
"gcloud",
51+
"storage",
52+
"cp",
5153
# the packages.json file must be consistently read so no caching
5254
*CACHE_NO,
53-
"cp",
5455
os.path.join(args.index, "packages.json"),
5556
"gs://pypi.devinfra.sentry.io",
5657
),

docker/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ wheel==0.38.4
2121

2222
# The following packages are considered to be unsafe in a requirements file:
2323
pip==23.3
24-
setuptools==70.0.0
24+
setuptools==78.1.1

0 commit comments

Comments
 (0)