Uh oh!
There was an error while loading. Please reload this page.
fix(migration): Make naming constraint fail softer on updates - #43357
Conversation
Uh oh!
There was an error while loading. Please reload this page.
joshtrichards
commented
Feb 6, 2024
Just logging it for now does seem a practical solution. Seems friendlier and doesn't require a bunch of other engineering. We could also do this in a setup check maybe? Not sure about resource usage though. The advantage there is we could provide a doc link + further encourage cleanup prior to upgrade runs. |
1e4cf27 to
cc6de72Compareszaimen
commented
Feb 7, 2024
Yes, this was my idea. :) The admin check will be handled in #43432 |
szaimen
commented
Feb 7, 2024
/backport to stable28 |
nickvergessen
left a comment
There was a problem hiding this comment.
Naming constraints:
- Index, sequence and primary key names must be unique within a Postgres Schema
It will break at least on postgres anyway. To help developers we should just not allow this and always break so they are aware.
Also logging this is of 0 help as no dev checks their logs on CI runs to look for such things.
Definitely a No from me.
Idea from Joas:
|
Only on installation we want to break hard, so that all developers notice the bugs when installing the app on any database or CI, and can work on fixing their migrations before releasing a version incompatible with Postgres. In case of updates we might be running on production instances and the administrators being faced with the error would not know how to resolve it anyway. This can also happen with instances, that had the issue before the current update, so we don't want to make their life more complicated than needed. Signed-off-by: Joas Schilling <coding@schilljs.com>
cc6de72 to
487c33fComparenickvergessen
commented
Feb 7, 2024
Went for a more simplistic approach now, with hopefully no "production" impact (unless the release is containing a new broken migration), but it still fails hard on installation: |
Dismissing my review as I did the patch now
szaimen
commented
Feb 8, 2024
Thanks a lot for your help on this @nickvergessen ! 😊 |
szaimen
commented
Feb 8, 2024
/backport to stable28 |
1 similar comment
szaimen
commented
Feb 8, 2024
/backport to stable28 |
fix(migration): Make naming constraint fail softer on updates
Follow-on to nextcloud/server#39506 & nextcloud/server#43357 Signed-off-by: Josh <josh.t.richards@gmail.com>
Follow-on to nextcloud/server#39506 & nextcloud/server#43357 Signed-off-by: Josh <josh.t.richards@gmail.com>
Follow-on to nextcloud/server#39506 & nextcloud/server#43357 Signed-off-by: Josh <josh.t.richards@gmail.com> Signed-off-by: Adriano Cataluddi <acataluddi@gmail.com>
Fix#41253
Fix#43173
Follow-up to #39506
Admin check will be handled in #43432