This is an archive of the discontinued LLVM Phabricator instance.

workflows/release-tasks: Upload lit releases to pypi
ClosedPublic

Authored by tstellar on Mar 20 2023, 7:29 PM.

Diff Detail

Event Timeline

tstellar created this revision.Mar 20 2023, 7:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2023, 7:29 PM
Herald added a subscriber: delcypher. · View Herald Transcript
tstellar requested review of this revision.Mar 20 2023, 7:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2023, 7:29 PM
kwk edited reviewers, added: kwk; removed: kkleine.Apr 19 2023, 6:13 AM
kwk requested changes to this revision.Apr 19 2023, 6:22 AM

LGTM except that I would publish to TestPyPi first. See suggestion.

.github/workflows/release-tasks.yml
96–99

I suggest to first try publishing to https://test.pypi.org/ and only if that works, use the official pypi.

This revision now requires changes to proceed.Apr 19 2023, 6:22 AM

Does lit have any test suite? In that case, I suggest the tests should be executed before uploading.

llvm/utils/lit/lit/__init__.py
6 ↗(On Diff #506817)

Not sure I love this change. If a user builds a lit version locally, it should still include the dev suffix. Maybe we could substitute this or something when building the release?

kwk added a comment.Apr 19 2023, 6:26 AM

Does lit have any test suite? In that case, I suggest the tests should be executed before uploading.

Good point. lit can be tested with: python3 lit.py tests

kwk added a comment.Apr 19 2023, 6:53 AM
This comment was removed by kwk.
.github/workflows/release-tasks.yml
86–89

This should do the trick.

kwk added inline comments.Apr 19 2023, 6:57 AM
.github/workflows/release-tasks.yml
88

This should do the trick. I missed entering the directory in my first suggestion.

tstellar added inline comments.Apr 19 2023, 8:20 AM
llvm/utils/lit/lit/__init__.py
6 ↗(On Diff #506817)

This was not meant to be part of the patch, I will remove it. There is code in the GitHub action that strips out the 'dev' before uploading.

tstellar updated this revision to Diff 516621.Apr 24 2023, 10:00 PM
tstellar marked 2 inline comments as done.
  • Do some testing before uploading.
  • Remove accidental change to __init__.py.
thieta accepted this revision.Apr 24 2023, 11:10 PM

LGTM

kwk requested changes to this revision.Apr 26 2023, 5:45 AM

Looks much better now. Thank you for applying my suggestions @tstellar ! As usual I hope the github action runs and is valid YAML. There's just one more thing where I need confirmation on: Have you tried running the Upload lit TestPyPI step? I've done releases to pypi and test.pypi in the recent past and I'm nearly 100% sure that you need a second API token for this. Here you're using LLVM_LIT_PYPI_API_TOKEN both, for the Upload lit TestPyPI step as well as the Upload lit.

.github/workflows/release-tasks.yml
101
104

I'm pretty sure you need need a different token for this than for the final upload to pypi. Try to log in to test.pypi.org and see for yourself.

107
This revision now requires changes to proceed.Apr 26 2023, 5:45 AM
tstellar updated this revision to Diff 523464.May 18 2023, 11:19 AM
tstellar marked 2 inline comments as done.

Address review comments.

tstellar marked an inline comment as done.May 18 2023, 11:20 AM
kwk added a comment.May 22 2023, 4:57 AM

LGTM. Thank you!

kwk accepted this revision.May 22 2023, 4:57 AM
This revision is now accepted and ready to land.May 22 2023, 4:57 AM
This revision was landed with ongoing or failed builds.May 31 2023, 9:25 AM
This revision was automatically updated to reflect the committed changes.