Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Sep 10, 2025

Backport of #54664

Warning, This backport had conflicts that were resolved with the ours merge strategy and is likely incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot backportbot bot added 3. to review Waiting for reviews ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Sep 10, 2025
@backportbot backportbot bot added this to the Nextcloud 31.0.9 milestone Sep 10, 2025
@Antreesy Antreesy force-pushed the backport/54664/stable31 branch 2 times, most recently from 300b431 to e5cd471 Compare September 11, 2025 12:04
@Antreesy Antreesy marked this pull request as ready for review September 11, 2025 12:05
@Antreesy Antreesy requested a review from kesselb September 11, 2025 12:05
@Antreesy
Copy link
Contributor

Did my best to resolve conflicts 👀 Please give it a thorough look

@Antreesy Antreesy force-pushed the backport/54664/stable31 branch from e5cd471 to 13d6ca2 Compare September 11, 2025 15:42
Carl Schwan added 2 commits September 12, 2025 15:53
UniqueConstraintViolationException is no longer throw directly but

instead is now wrapped inside a \OCP\DB\Exception. So check the

exception reason.

Signed-off-by: Carl Schwan <[email protected]>
These are nowadays also OCP\DB\Exception and if the id is not a numeric
deleting by id is also non working.

Signed-off-by: Carl Schwan <[email protected]>
@Antreesy Antreesy force-pushed the backport/54664/stable31 branch from 13d6ca2 to adb0701 Compare September 12, 2025 13:54
@kesselb
Copy link
Contributor

kesselb commented Sep 12, 2025

The test failures are related. I've only requested a backport of the UniqueConstraintViolationException commit, however IQueryBuilder.execute still throws a UniqueConstraintViolationException.

So we either need to restore catching UniqueConstraintViolationException where we're still using IQueryBuilder.execute, or also backport the IQueryBuilder.executeStatement changes. This is particularly weird in Files/Cache, where we actually use both 😆

Wdyt @CarlSchwan?

@CarlSchwan
Copy link
Member

I would actually not backport this as it is more a refactor/port from deprecated code than a bug fix, if the goal is to fix an issue, I would backport only the specific code.

@Antreesy
Copy link
Contributor

I would backport only the specific code

I'd appreciate, if you can find a time to re-backport it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants