Conversation
- Delete test/solr/ (configsets, docker-compose.yml, generate script, README);
Solr for tests now comes from the ontoportal_testkit compose stack.
- Delete run-unit-tests.sh; it sourced test/solr/generate_ncbo_configsets.sh
and referenced a long-gone ruby-agraph compose service. Replaced by
rake test:docker:{fs,ag,vo,gd}.
- Drop matching entries from .dockerignore and .gitignore.
Remove stale Solr test scaffolding superseded by ontoportal_testkit
…from auth load User#admin? was called once per serialized user via serialize_filter (added during the agroportal sync for lastLoginAt visibility), re-loading the requesting user's role on every call. With ~21k users and security enabled, GET /users?include=all took ~15 minutes; with security disabled (where &.admin? short-circuits on nil), the same call returned in ~10s. - Make admin? idempotent: bring(role: [:role]) only when role isn't loaded at the User level OR the Role objects haven't had their nested :role attribute loaded. The two-level guard handles the auth-middleware load shape, which loads :role shallowly without the nested embed_values pattern. - Auth middleware: exclude inverse attributes from the User load. attributes(:all) included :provisionalClasses, an inverse attribute that fans out across the full ProvisionalClass graph on every authenticated request. - Add test_admin_with_shallow_role_load covering the auth-middleware load shape (admin and non-admin) and the idempotency contract. Refs #285
Fix /users perf with security: idempotent admin?, drop inverse attrs from auth load
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
includes: