MUSE_OS icon indicating copy to clipboard operation
MUSE_OS copied to clipboard

[BUG] Release workflow is failing to publish to PyPI

Open alexdewar opened this issue 1 year ago • 9 comments

Currently the publish.yml workflow is failing to publish to PyPI. (In case the CI logs disappear, I've pasted the error message below.)

This might have been broken by #231, as this changed the name of the workflow file, and you have to specify in your PyPI user settings which workflows are allowed to publish packages (as a security measure). This PR was merged after our last release. Alternatively, it may be because the name of the GitHub org has been changed.

Does anyone know who has access to the PyPI account for MUSE? @ahawkes? @dalonsoa?


Trusted publishing exchange failure:

Token request failed: the server refused the request for the following reasons:

invalid-publisher: valid token, but no corresponding publisher (All lookup strategies exhausted) This generally indicates a trusted publisher configuration error, but could also indicate an internal error on GitHub or PyPI's part.

The claims rendered below are for debugging purposes only. You should not use them to configure a trusted publisher unless they already match your expectations.

If a claim is not present in the claim set, then it is rendered as MISSING.

sub: repo:EnergySystemsModellingLab/MUSE_OS:ref:refs/tags/v1.2.0rc1 repository: EnergySystemsModellingLab/MUSE_OS repository_owner: EnergySystemsModellingLab repository_owner_id: 11629231 job_workflow_ref: EnergySystemsModellingLab/MUSE_OS/.github/workflows/publish.yml@refs/tags/v1.2.0rc1 ref: refs/tags/v1.2.0rc1 See https://docs.pypi.org/trusted-publishers/troubleshooting/ for more help.

You're seeing this because the action wasn't given the inputs needed to perform password-based or token-based authentication. If you intended to perform one of those authentication methods instead of trusted publishing, then you should double-check your secret configuration and variable names.

Read more about trusted publishers at https://docs.pypi.org/trusted-publishers/

Read more about how this action uses trusted publishers at https://github.com/marketplace/actions/pypi-publish#trusted-publishing

alexdewar avatar Aug 05 '24 15:08 alexdewar

I do not know who has this access… A


From: Alex Dewar @.> Sent: Monday, August 5, 2024 6:04:49 PM To: EnergySystemsModellingLab/MUSE_OS @.> Cc: Hawkes, Adam D @.>; Mention @.> Subject: [EnergySystemsModellingLab/MUSE_OS] [BUG] Release workflow is failing to publish to PyPI (Issue #443)

This email from @.*** originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders listhttps://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address.

Currently the publish.yml workflow is failing to publish to PyPIhttps://github.com/EnergySystemsModellingLab/MUSE_OS/actions/runs/10158629866. (In case the CI logs disappear, I've pasted the error message below.)

This might have been broken by #231https://github.com/EnergySystemsModellingLab/MUSE_OS/pull/231, as this changed the name of the workflow file, and you have to specify in your PyPI user settings which workflows are allowed to publish packages (as a security measure). This PR was merged after our last release. Alternatively, it may be because the name of the GitHub org has been changed.

Does anyone know who has access to the PyPI account for MUSE? @ahawkeshttps://github.com/ahawkes? @dalonsoahttps://github.com/dalonsoa?


Trusted publishing exchange failure:

Token request failed: the server refused the request for the following reasons:

invalid-publisher: valid token, but no corresponding publisher (All lookup strategies exhausted) This generally indicates a trusted publisher configuration error, but could also indicate an internal error on GitHub or PyPI's part.

The claims rendered below are for debugging purposes only. You should not use them to configure a trusted publisher unless they already match your expectations.

If a claim is not present in the claim set, then it is rendered as MISSING.

sub: repo:EnergySystemsModellingLab/MUSE_OS:ref:refs/tags/v1.2.0rc1 repository: EnergySystemsModellingLab/MUSE_OS repository_owner: EnergySystemsModellingLab repository_owner_id: 11629231 job_workflow_ref: @.***/tags/v1.2.0rc1 ref: refs/tags/v1.2.0rc1 See https://docs.pypi.org/trusted-publishers/troubleshooting/ for more help.

You're seeing this because the action wasn't given the inputs needed to perform password-based or token-based authentication. If you intended to perform one of those authentication methods instead of trusted publishing, then you should double-check your secret configuration and variable names.

Read more about trusted publishers at https://docs.pypi.org/trusted-publishers/

Read more about how this action uses trusted publishers at https://github.com/marketplace/actions/pypi-publish#trusted-publishing

— Reply to this email directly, view it on GitHubhttps://github.com/EnergySystemsModellingLab/MUSE_OS/issues/443, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC37JLM4MRXNA6MGKW2GDKDZP6IBDAVCNFSM6AAAAABMAPXZEKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ2DQNZYGU4TGOI. You are receiving this because you were mentioned.Message ID: @.***>

ahawkes avatar Aug 05 '24 15:08 ahawkes

No worries. I was wondering if it might be @sgiarols? But it's probably @dalonsoa. I'll ask him when he gets back.

alexdewar avatar Aug 06 '24 07:08 alexdewar

Just a reminder that we should do #224 once we've fixed this!

alexdewar avatar Aug 12 '24 14:08 alexdewar

I've updated the configuration for TestPyPI and PyPI to match the current repo configuration. I appear to be the sole owner of the repo in both places, which is really a bad idea.

Moving forward, it will be best if @ahawkes could open an account in both, https://pypi.org/ and in https://test.pypi.org/, then pass me the username and then I will add him as owner as well. Additionally, I'll link MUSE_OS to the imperial-rse-account both in TestPyPI and PyPI, rather than to my personal account, so it can be access by the team if needed down the line, regardless of me being around or not.

Anyway, trying to make a release now should work... I think :)

dalonsoa avatar Aug 13 '24 07:08 dalonsoa

Thanks – I have created the accounts in pypi and test.pypi – username is ahawkes.

From: Diego Alonso Álvarez @.> Sent: Tuesday, August 13, 2024 8:45 AM To: EnergySystemsModellingLab/MUSE_OS @.> Cc: Hawkes, Adam D @.>; Mention @.> Subject: Re: [EnergySystemsModellingLab/MUSE_OS] [BUG] Release workflow is failing to publish to PyPI (Issue #443)

This email from @.@.> originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders listhttps://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address.

I've updated the configuration for TestPyPI and PyPI to match the current repo configuration. I appear to be the sole owner of the repo in both places, which is really a bad idea.

Moving forward, it will be best if @ahawkeshttps://github.com/ahawkes could open an account in both, https://pypi.org/ and in https://test.pypi.org/, then pass me the username and then I will add him as owner as well. Additionally, I'll link MUSE_OS to the imperial-rse-account both in TestPyPI and PyPI, rather than to my personal account, so it can be access by the team if needed down the line, regardless of me being around or not.

Anyway, trying to make a release now should work... I think :)

— Reply to this email directly, view it on GitHubhttps://github.com/EnergySystemsModellingLab/MUSE_OS/issues/443#issuecomment-2285573879, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC37JLKFRKS6WGTS5NOHSELZRG2OBAVCNFSM6AAAAABMAPXZEKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBVGU3TGOBXHE. You are receiving this because you were mentioned.Message ID: @.@.>>

ahawkes avatar Aug 13 '24 10:08 ahawkes

@ahawkes , I've invited to be owner of both services. You will need to accept the invitation. I've also transfer the ownership from my account to imperial-rse-team.

dalonsoa avatar Aug 13 '24 15:08 dalonsoa

Anyway, trying to make a release now should work... I think :)

It has indeed! Thanks :smile:

alexdewar avatar Aug 13 '24 15:08 alexdewar

The previous RC also went through 7h ago, aparently... image

dalonsoa avatar Aug 13 '24 15:08 dalonsoa

Hmm... not sure what happened there :shrug:

alexdewar avatar Aug 13 '24 15:08 alexdewar