Skip to content

Develop to master merge, V7.1.1#287

Merged
alexskr merged 7 commits into
masterfrom
develop
Apr 28, 2026
Merged

Develop to master merge, V7.1.1#287
alexskr merged 7 commits into
masterfrom
develop

Conversation

@alexskr
Copy link
Copy Markdown
Member

@alexskr alexskr commented Apr 28, 2026

alexskr added 7 commits April 22, 2026 22:30
- 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
@alexskr alexskr marked this pull request as ready for review April 28, 2026 20:58
@alexskr alexskr merged commit fbcbc97 into master Apr 28, 2026
2 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant