-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
Suggestion to initially pin packages that break things by automatic upgrade #20292
Comments
Well, developers spend days setting up their environment, also doing this gradually for months. And it can be broken with single upgrade command. Better not upgrade at all. It's amazing how modern software just doesn't care of being safe to upgrade. |
If you need to stay on an older version use postgresql@9.4, postgresql@9.5, or postgresql@9.6. |
@ilovezfs And still we need to go thought this: https://gist.github.com/giannisp/ebaca117ac9e44231421f04e7796d5ca Not the best things to do on weekend (or holidays). It's great that manual upgrading workflow is supported and quite smooth, but why in the first place not avoid such situations at all?! "Move fast, break things" is probably good idea for startups, but not for package managers, I believe. |
@rudyryk you may enjoy reading this https://medium.com/@mikeal/stop-supporting-old-releases-70cfa0e04b0c |
@ilovezfs Ha-ha :) Ok and what about deprecation warnings approach? I see nothing bad in showing BIG RED WARNING of deprecated package and forcing update after some grace period, that's established practice in C, Python world for example. And this is good one. |
Like I said, you can
if you need to stay on an older version. In terms of warnings about deprecations, that's primarily the function of upstream documentation. The current
If you think another sentence should be added there, feel free to open a PR and we can take a look. |
No. I need to have option to upgrade safely when it's time. Or upgrade right now after confirmation: "Yes, I understand things may break after doing this". The current default behaviour of upgrade command is like a bomb. You can't even see upfront and control what things will break after upgrading. But usually I'd expect from package manager to do safe upgrades, that's the purpose of using package manager after all. I would insist that default behaviour which 100% will break environment is wrong for package manager. Most mature package managers (except node - their package manager is one of most evil thing ever) will go interactive on dangerous upgrade. I'm not saying this feature is needed ASAP, but why not consider it instead of just ignoring? |
The As a design principle,
This is not true. Reverse dependencies are updated and rebottled at the same time, in the same PR, as their dependencies. So |
@ilovezfs Ok. That means it is up to user to know whether update is safe or not. "Hmm... is that service is safe to upgrade?.. ok, let's try! Ooops..." With PostgreSQL update is never safe, know that from (unlucky) experience :) UPD. Hard to imagine to check every of dozens package listed after |
Correct. We ship the latest stable version of each package if it, and all of its reverse dependencies, pass CI. If you consider that unsafe in the case of particular packages, then that is indeed up to your judgment. |
Hmm, not me considering that unsafe. Data format of newer PosgreSQL is by design backward incompatible with previous versions for a long-long time. Ubuntu distribs even ships with locked PosgreSQL as far as I know. So in this case we usually need to specify explicitly new version - when need new features. So now after update to PostgreSQL 10.0 I just have to |
|
Here is an example:
|
@ilovezfs Ok, I see - the problem is deeper than it seemed to me. Probably some services (like PorstgreSQL) are just not supposed to be handled like that and that's core of the problem described above. |
@rudyryk really your best bet, if you're looking for a less disruptive postgresql experience, is to use one of the @ formulae. That is our supported way of achieving "pinning" in the way you're thinking about it. When 10.1 comes out there will likely be a new postgresql@10.0 formula, which you can switch over to instead of upgrading to 10.1. |
#21244 has been merged. |
For example
brew upgrade
systematically breaks PostgreSQL installation because9.6
is not compatible with9.5
and so on. The recent10.0
update breaks things again.Having installed PostgreSQL 9.6 with non-empty databases I just run:
I would expect that under normal conditions it will just upgrade without breaking things. But with PostgreSQL it breaks every time.
I would expect to be warned and prevented from breaking upgrades.
The simplest solution as I can see would be to just pin some packages by default. User will be warned that upgrade for some packages was skipped. And it's far better (I believe) then silently break things.
The text was updated successfully, but these errors were encountered: