pypa/gh-action-pypi-publish

Adaptive short-lived token expiration handling

Open

#307 opened on Nov 30, 2024

View on GitHub
 (13 comments) (0 reactions) (2 assignees)Python (118 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (1,175 stars)
PR merge metrics
 (PR metrics pending)

Description

So it happened that a short-lived token in yarl started expiring before all uploads managed to complete.

This resulted in having to yank two releases: https://pypi.org/project/yarl/1.18.2/#history

The last failure started uploading things but didn't complete in 15 minutes, eventually hitting the token expiration: https://github.com/aio-libs/yarl/actions/runs/12091091291/job/33719944175#step:9:729

The last successful upload had the step with this action running for 4 minutes https://github.com/aio-libs/yarl/actions/runs/11954909206/job/33329106474#step:9:768

@woodruffw I don't know what exactly caused the slowness, but I think that maybe we should re-request that token every couple of dists if the cumulative size of the uploads is big. I suppose that adding the attestations doubles the number of uploads, which might also affect the overall upload time.

Contributor guide