Skip to content
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

502: Bad Gateway on upload when Provides-Dist metadata is invalid instead of error messages #16452

Open
rjdbcm opened this issue Aug 10, 2024 · 2 comments
Labels

Comments

@rjdbcm
Copy link

rjdbcm commented Aug 10, 2024

I am getting bad gateway errors the past 14 hours, only from my GitHub actions runs. Wondering if this could be related to the cause of #9151 since everything else seems to be working. My local CI works with the same token on a different repo so maybe this is some sort of regional proxy service outage or something.

Edit 1: Now it is only for this repo but not for my other repos with the same GitHub workflow and token setup. I have had the same result for GitHub actions runners 12,13, and 14. Does not seem to be related to which runner I use and seems to be isolated to this package repo.

Edit 2: I have figured out the issue the core metadata specification for Provides-Dist shows a version format that will not work for warehouse as it uses packaging.requirements.Requirement to validate this header. I have opened a PR over on the spec to change the example as well pypa/packaging.python.org#1586

Uploading distributions to https://upload.pypi.org/legacy/
Uploading 
blastpipe-2024.11.32-cp310-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
WARNING  Received "502: Bad Gateway"                                            
         Package upload appears to have failed. Retry 1 of 5.                   
Uploading 
blastpipe-2024.11.32-cp310-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
WARNING  Received "502: Bad Gateway"                                            
         Package upload appears to have failed. Retry 2 of 5.                   
Uploading 
blastpipe-2024.11.32-cp310-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
WARNING  Received "502: Bad Gateway"                                            
         Package upload appears to have failed. Retry 3 of 5.                   
Uploading 
blastpipe-2024.11.32-cp310-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
WARNING  Received "502: Bad Gateway"                                            
         Package upload appears to have failed. Retry 4 of 5.                   
Uploading 
blastpipe-2024.11.32-cp310-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
WARNING  Received "502: Bad Gateway"                                            
         Package upload appears to have failed. Retry 5 of 5.                   
WARNING  Error during upload. Retry with the --verbose option for more details. 
ERROR    HTTPError: 502 Bad Gateway from https://upload.pypi.org/legacy/        
         Bad Gateway          
@rjdbcm rjdbcm added bug 🐛 requires triaging maintainers need to do initial inspection of issue labels Aug 10, 2024
@rjdbcm rjdbcm changed the title Received "502: Bad Gateway" on https://upload.pypi.org/legacy/ Provides-Dist validation implementation differs from core metadata spec causing 502: Bad Gateway on upload. Aug 12, 2024
@di
Copy link
Member

di commented Aug 12, 2024

I think we're parsing this correctly and the example in the spec is wrong, see my comment here.

That said, I think returning a 502 here is not what should be happening, as we clearly intend to return some human-readable error messages, so I'll leave this open and amend the title to reflect that.

@di di changed the title Provides-Dist validation implementation differs from core metadata spec causing 502: Bad Gateway on upload. 502: Bad Gateway on upload when Provides-Dist metadata is invalid instead of error messages Aug 12, 2024
@di di removed the requires triaging maintainers need to do initial inspection of issue label Aug 12, 2024
@woodruffw
Copy link
Member

I've asked @DarkaMaul to take a look at this 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants