Skip to content

Conversation

@CarlSchwan
Copy link
Member

@CarlSchwan CarlSchwan commented Sep 16, 2025

Summary

This found a real bug where we were catching an Doctrine exception instead of a OCP\DB\Exception. This will be backported separately.

TODO

  • ...

Checklist

@CarlSchwan CarlSchwan self-assigned this Sep 16, 2025
@CarlSchwan CarlSchwan added the 2. developing Work in progress label Sep 16, 2025
@CarlSchwan CarlSchwan marked this pull request as ready for review September 16, 2025 16:17
@CarlSchwan CarlSchwan requested review from a team, blizzz and nickvergessen as code owners September 16, 2025 16:17
@CarlSchwan CarlSchwan requested review from ArtificialOwl, come-nc and salmart-dev and removed request for a team September 16, 2025 16:17
if (!$subject instanceof Node) {
throw new \UnexpectedValueException(
'Expected Node subject for File entity, got {class}',
['app' => Application::APP_ID, 'class' => get_class($subject)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it should be a log message instead of an exception :D

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think being an exception here is correct as giving anything else than a Node is a fatal logic error, there was just a mixup on the correct way to creates the error message.

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just not sure about the server containers, rest looks good

@nickvergessen
Copy link
Member

image

I ran integration tests on access control, and it seems to break the behaviour when creating a flow?
https://github.com/nextcloud/files_accesscontrol/actions/runs/17788621002/job/50560786165?pr=762#step:15:261

@CarlSchwan CarlSchwan force-pushed the carl/cleanup-workflowengine-app branch from 3a2a717 to fbf99bf Compare September 17, 2025 07:50
@CarlSchwan
Copy link
Member Author

I ran integration tests on access control, and it seems to break the behaviour when creating a flow? https://github.com/nextcloud/files_accesscontrol/actions/runs/17788621002/job/50560786165?pr=762#step:15:261

Fixed. The getAppValueBool('user_scope_disabled') was inverted and then the settings were not displayed for the normal users anymore.

This found a real bug where we were catching an Doctrine exception
instead of a OCP\DB\Exception. This will be backported separately.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
@CarlSchwan CarlSchwan force-pushed the carl/cleanup-workflowengine-app branch from fbf99bf to 6154bfa Compare September 17, 2025 07:57
@CarlSchwan CarlSchwan added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 17, 2025
Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good (apart of the commit message… with the right mood everything is a chore. But this is a refactor), have not tested yet. Approving in good trust, but might drive some tests this/next week unless it is merged.

@nickvergessen
Copy link
Member

Access control CI is passing now, so good to go when Cypress is unrelated

@CarlSchwan CarlSchwan changed the title chore(psalm): Fix most issues with the workflowengine refactor(psalm): Fix most issues with the workflowengine Sep 22, 2025
@CarlSchwan CarlSchwan added the ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) label Sep 22, 2025
@nickvergessen nickvergessen merged commit 00f589e into master Sep 22, 2025
228 of 233 checks passed
@nickvergessen nickvergessen deleted the carl/cleanup-workflowengine-app branch September 22, 2025 09:51
@nextcloud-bot nextcloud-bot mentioned this pull request Jan 6, 2026
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