-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
podman: add livecheck #205162
base: master
Are you sure you want to change the base?
podman: add livecheck #205162
Conversation
96f739c
to
7a3b1b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the issue is only that there can be a notable span of time between when a version is tagged and when the corresponding GitHub release is created, we can simply use the GithubLatest
strategy. I've added suggestions to bring this in line with similar checks.
Upstream created a 5.3.2 release less than an hour ago (~18 hours after the tag) but the homepage is still referring to 5.3.1. If we specifically need to match the version from the homepage instead of using the latest GitHub release, then I can add a different suggestion to bring the regex up to standard.
# checks the homepage since upstream can tag a new release for some time before | ||
# it is promoted to a new GitHub release and the homepage updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# checks the homepage since upstream can tag a new release for some time before | |
# it is promoted to a new GitHub release and the homepage updated | |
# There can be a notable gap between when a version is tagged and a | |
# corresponding release is created and upstream uses GitHub releases to | |
# indicate when a version is released, so we check the "latest" release | |
# instead of the Git tags. |
url :homepage | ||
regex(%r{Latest stable Podman.*containers/podman/releases.*?>(\d+(?:\.\d+)+)?</a}i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url :homepage | |
regex(%r{Latest stable Podman.*containers/podman/releases.*?>(\d+(?:\.\d+)+)?</a}i) | |
url :stable | |
strategy :github_latest |
Thanks for the review! My main motivation was to have livecheck consider the new version only based on what's on the website. It looks from containers/podman.io#364 like the website will similarly be not far behind a GH release, but that it's not totally automated. I see autobump PRs (for various formulae) where folks will hold off and consider it a prerelease if the website hasn't yet updated.. and then need to check back on it later. If we still want to consider the website as the best source of truth, I figured that this might be preferable over using the |
Yeah, we really need to make a decision what to do there. It was my understanding that we stopped doing GH latest because of rate limits. That's why I thought we should start using websites instead. |
That's partly where I came from as well.. our docs suggest to not use them unless we really need to, and it looks to me like in the case of podman, the website livecheck is feasible. |
FWIW the Podman team considers the upstream GH release as the official "release" time, regardless of when the tag is pushed or the website is updated. Although we do guarantee the website will be updated after the upstream release. |
Thanks! I was going to open an upstream issue to ask for clarification of the release process, so you've saved me the trouble. Short version: It sounds like Long version:
We only use Checking the upstream website is another way to address this situation and it can make sense if the website is kept up to date and they link to GitHub (ideally a specific release). If The reason why I suggested
When maintainers leave a comment like "Not the latest release yet" for a formula that's using a GitHub tag or tag tarball and the repository uses GitHub releases, that's often because livecheck is surfacing a new version from a Git tag but the GitHub release hasn't been created yet. Even though the formula only uses a tag or tag tarball, we wait for the release because some upstream projects feel comfortable retagging a version before the release is created and we would end up with a checksum mismatch. In a perfect world, we would have livecheck check GitHub releases for all projects that use them but that could lead to rate limit issues and break CI (the token is used for more than livecheck) or lead to issues when running lots of checks locally (e.g.,
We've gone through a few different phases over the years but we've been pretty consistent about only using Eventually we introduced the I haven't seen rate limit issues when checking github.com release pages for years but now |
From what I see in core most maintainers just check the releases manually because they're worried about using the latest livecheck with the way the documentation is written. If we can add more of them, I think the documentation should reflect that. If we can't, we should find a way to work around that. |
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?podman can push a tag for some time before the official release.
This
livecheck
aims to capture the version from the href that will link out to GH releases, like this:My first time doing any
livecheck
additions, LMK if there's anything unusual I'm doing here!