-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(migration): Make naming constraint fail softer on updates #43357
Conversation
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
cc6de72
Compare
Yes, this was my idea. :) The admin check will be handled in #43432 |
/backport to stable28 |
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.
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
487c33f
Compare
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
Thanks a lot for your help on this @nickvergessen ! 😊 |
/backport to stable28 |
1 similar comment
/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