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
Store and use revision in tab runtime dependencies #16152
Conversation
340dba5
to
5455c64
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.
Thanks for the PR! This will fix the problem but I think we don't really need a new field and would be good to tighten this up so we don't ignore all existing tabs, only a subset (e.g. those where the dependency has a higher revision than noted or something)
A bunch of people are reporting this every day. @MikeMcQuaid is there a chance to merge this, release and improve it further later? |
@SMillerDev Not as-is, no. I agree it's important though and, if no-one else has picked it up by Friday, I'll try to get it merged then. |
5455c64
to
429240a
Compare
@Bo98 @apainintheneck I've adjusted this to:
|
@Bo98 @apainintheneck once you're both happy: can one of you merge this? Thanks ❤️ |
0226f38
to
b174c0a
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.
I think this looks good, with this one logic tweak that should align with what was intended:
(LGTM otherwise assuming |
abbecb3
to
65d9b1f
Compare
Also pushed so we |
65d9b1f
to
585e363
Compare
Let's start storing `revision` and `pkg_version` for tab runtime dependencies and use them when available. When the `revision` is not available, use a conservative approach to deciding whether dependencies need to be upgrade. Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
585e363
to
19f27f9
Compare
Thanks for help before and after, @Bo98! |
Thanks for fixing these issues. When and how can we check if these updates will work? In my situation Homebrew/homebrew-core#153593 |
It will be released probably on Monday. The fix won't do anything to people with already broken installs, however such installs are fixable by updating your out-of-date formulae (even before this fix is released). It looks like your particular issue might be bug within |
elsif installed_version.version == minimum_version | ||
formula.revision.zero? |
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.
I think this may be causing current CI dependent failure when only revision bumping like in https://github.com/Homebrew/homebrew-core/actions/runs/6856551968/job/18644302924?pr=154195#step:3:244
Dependent test tries to install bottle for formula that was built in PR. Not sure if just checking formula.latest_version_installed?
works or if there is better option.
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.
Can you narrow this down to the specific line and, ideally, open a PR (even if it's not fully working yet)?
The formula.revision.zero?
part at least is essential here: that's basically the point of all my changes to this PR.
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.
Fixed hopefully in #16220
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.
It should be that line with reproduction by local source-building a formula with extra revision bump then trying to install deps, e.g.
$ brew bump-revision --write-only python-click
$ brew install -s python-click
$ brew install --only-dependencies airshare
...
==> Downloading https://ghcr.io/v2/homebrew/core/python-click/manifests/8.1.7_1-1
curl: (22) The requested URL returned error: 404
==> Pouring python-click--8.1.7.sonoma.bottle.1.tar.gz
Error: /usr/local/Cellar/python-click/8.1.7_1 is not a directory
Verifying latest version/revision is installed does make error go away, e.g.
elsif installed_version.version == minimum_version | |
formula.revision.zero? | |
elsif installed_version.version == minimum_version | |
formula.revision.zero? || formula.latest_version_installed? |
Should fix
brew upgrade <pkg>
producing broken installs. We were treating two packages with the same version but different revisions as compatible (because we didn't store revision info at all). This was often incorrect and lead to several reports of broken installs.