juriscraper icon indicating copy to clipboard operation
juriscraper copied to clipboard

Don't release tagged code to pypi until merged to main

Open flooie opened this issue 3 years ago • 7 comments

Looks like we bumped the version number on pypi, without bumping the version in the setup.py, which is wild in my opinion.

I think we may need to use some sorta check to stop that from happening.

flooie avatar Sep 05 '22 17:09 flooie

cc @albertisfu

flooie avatar Sep 05 '22 17:09 flooie

I see, this is weird. I submitted the PR to bump to 2.5.14 but it's not supposed to bump on PyPI because it hasn't been merged yet into the main: https://github.com/freelawproject/juriscraper/pull/552/commits/88ef41ba3a4caaf68630144bc96d63d8b90a3135

On the commit, I updated the setup.py

Maybe an issue with the pypi release action?

Also, the version released is not up to date because I made additional changes to the PR. I think it was released the first time I tagged the commit and uploaded it.

albertisfu avatar Sep 05 '22 17:09 albertisfu

@albertisfu it's not your fault, but when it was just @mlissner and I it was easy enough to keep straight.

I couldn't figure out a way to only bump on PRs to main, so when I bump I only bump with pushes with tags directly to main.

A push to a branch with the tag will trigger pypi. And I think it ran before you submitted the higher version number. Its okay though, I have a small juriscraper bump coming today so I'll iterate it.

flooie avatar Sep 05 '22 18:09 flooie

  1. We need to come up with a better method to not bump branches though, so I will leave this issue open for now.

flooie avatar Sep 05 '22 18:09 flooie

Got it, thanks for the clarification, now I'll avoid pushing PRs with a tag version if it's not ready to be merged.

albertisfu avatar Sep 05 '22 19:09 albertisfu

I forget what the complicated thing was about this. This stackoverflow answer has two ways to make sure that a Github Action only runs on main: https://stackoverflow.com/a/58142412/64911.

@flooie, do you remember the missing piece?

mlissner avatar Sep 06 '22 21:09 mlissner

Oh, and one other thing, when we have a fix for this, we also need to:

  • [ ] Apply this fix to other repos that auto-load to pypi

I think that includes reporters-db, x-ray, and probably a few others? Eyecite, maybe? We'll have to do a quick check.

mlissner avatar Sep 06 '22 21:09 mlissner