Skip to content
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

Make use of session middleware in remaining controllers #4290

Merged
merged 6 commits into from Jun 24, 2023

Conversation

juliushaertl
Copy link
Member

@juliushaertl juliushaertl commented Jun 13, 2023

Another larger backend changeset as a second part to #4266 to actually make use of it in the editing related controllers among a few cleanup tasks I did along the way.

Overall this should have some positive impact on performance as we reduce queries to fetch the session and document data to just one call in the middleware. Further way down in the the controller methods we just pass the objects around.

Let's see what cypress things about this.

  • chore: Annotate controller methods in routes.php
  • chore: Cleanup workspace controller
  • chore: Refactor remaining controllers to make use of the session middleware
  • chore: Cleanup in direct editing backend
  • chore: Cleanup psalm baseline

📝 Summary

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

@cypress
Copy link

cypress bot commented Jun 13, 2023

3 flaky tests on run #10476 ↗︎

0 147 1 0 Flakiness 3

Details:

Make use of session middleware in remaining controllers
Project: Text Commit: 84dd2d3897
Status: Passed Duration: 03:40 💡
Started: Jun 23, 2023 2:24 PM Ended: Jun 23, 2023 2:28 PM
Flakiness  sync.spec.js • 1 flaky test

View Output Video

Test Artifacts
Sync > recovers from a lost connection Output Screenshots
Flakiness  nodes/Mentions.spec.js • 1 flaky test

View Output Video

Test Artifacts
Test mentioning users > Type @ and see the user list Output Screenshots
Flakiness  api/UsersApi.spec.js • 1 flaky test

View Output Video

Test Artifacts
The user mention API > fetches users with valid session Output Screenshots

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@juliushaertl
Copy link
Member Author

Need to check why the api test is flaky, could be either due to caching of the session or maybe the close request is not properly waited for

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
…leware

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliushaertl juliushaertl merged commit 5200124 into main Jun 24, 2023
42 checks passed
@delete-merged-branch delete-merged-branch bot deleted the chore/noid/middleware-rest branch June 24, 2023 08:14
@mejo-
Copy link
Member

mejo- commented Dec 5, 2023

/backport f5963e1 to stable27

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

Successfully merging this pull request may close these issues.

Refactor ApiService to fetch session once
3 participants