Skip to content

Fixes 37882: Ontology Studio duplicate rules, per-ontology saved queries, Tooltip crash and nested buttons - #37883

Merged
anuj-kumary merged 6 commits into
mainfrom
anuj-kumary/ontology-studio-testing-pending
Nov 16, 2026
Merged

anuj-kumary merged 6 commits into
mainfrom
anuj-kumary/ontology-studio-testing-pending

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #37882

Four of the five defects from #37882. The fifth (Studio offers Date, which the server rejected as xsd:date) is handled by #37911, which accepts Date properties with an om:date range; the Studio keeps offering Date. The saved-query scoping UI is in open-metadata/openmetadata-collate#8596. Merge this PR first: the Collate PR reads the new saved-query ontologyId field.

  • Duplicate rules are refused. A rule (axiom) that states what a live rule of the same subject and type already states is refused with 400 The rule '<name>' already states this; a duplicate rule adds nothing. The check sits in OntologyWorkingModel.requireValid, which every ontology write goes through: REST, change-set apply, import and pack install. Rules compare by NativeOntologyDocument.signature, the normalized signature import already uses, not by name. A new OntologyReferenceDAO.axiomsOfSubjects query reads the live rules of up to 20 changed subjects at a time; each rule is signed once.
  • Import preview agrees with apply. A rule the file repeats is now DUPLICATE ("Listed more than once in the file."), the way a repeated concept already is. It no longer passes preview and then fails at apply.
  • Saved queries can belong to an ontology. savedSparqlQuery gains an optional ontologyId, and SavedSparqlQueryService keeps it. The OSS SPARQL console never sets it. The generated TS types are regenerated.
  • Tooltip on a disabled child. The wrapper wires hover and focus through the useFocusable hook (the tab-order-excluded span already did this) instead of react-aria's <Focusable>. That component's development-only check called getComputedStyle on a node with no window inside the Tabs.List actions slot, which threw. Elsewhere it logged "<Focusable> child must have an interactive ARIA role". The disabled span stays in the tab order; excludeTriggerFromTabOrder behaves as before.
  • No nested buttons. InboxIconButton and SubRail render TooltipTrigger as the button (aria-label, className, onPress), as Rail already does. This removes the validateDOMNesting: <button> inside <button> warning in AI mode.

Type of change:

  • Bug fix

High-level design:

Every ontology write already funnels through OntologyWorkingState.mutate → OntologyWorkingModel.requireValid, so the duplicate check sits there once rather than in each entry point. It runs only for a rule whose structure changed in this write, so duplicates stored before this change don't block unrelated edits. Within one change set, two identical new rules are both written before validation, so the second is refused and the whole apply rolls back.

Saved queries are one JSON document per user, so the optional field needs no migration: a stored query without it reads as unscoped.

Alternative considered for duplicates: blocking only in the Studio UI. Rejected because the API, change sets and CSV AXIOM rows would still store them.

Tests:

Use cases covered

  • Creating a rule identical to an existing one (different name) → 400 naming the existing rule; the ontology still has one rule.
  • A CSV whose rule is listed twice → preview shows NEW then DUPLICATE and plans one operation.
  • A saved query keeps its ontologyId; one without stays unscoped.
  • A Tooltip around a disabled Button in Tabs.List actions renders, with a focusable wrapper.
  • Inbox and sub-rail buttons still navigate and show their tooltips.

Unit tests

  • NativeOntologyImportItemsTest#aRuleListedTwiceIsADuplicateAndAddsNoSecondOperation, SavedSparqlQueryServiceTest#keepsTheOntologyAQueryWasSavedIn, tooltip.test.tsx "renders a disabled child in the Tabs actions slot" (fails on the old Tooltip).
  • Run: the import unit tests (93/93) and core-components tooltip + tabs (35/35) pass. OM UI InboxIconButton + Sidebar suites pass (99/99).
  • The full core-components suite has 6 failures in application/tag/* ("should render a tooltip trigger when tooltip is passed"). They fail identically on main without this change.

Backend integration tests

  • IndependentOntologyAxiomIT#aSecondRuleStatingTheSameThingIsRefused
  • Ran locally on MySQL + Elasticsearch: IndependentOntologyAxiomIT (24/24) and NativeOntologyImportPreviewIT pass.
  • NativeOntologyEveryPackInstallIT: in the first full run, 16 of 17 packs installed and re-installed with no changes, and none hit the duplicate refusal. Brick timed out at 1381 s because the first version of the check re-read every same-subject rule for each changed rule. The check now reads 20 changed subjects per query and signs each rule once (21662fd).
  • Brick install time: 143.5 s on main, 1381 s with the per-rule check, 181.6 s with the batched check. Each was a single-pack run on MySQL + Elasticsearch on a laptop.
  • Full rerun at 20c97e6 (batched check, per-subject bound): NativeOntologyEveryPackInstallIT 17/17 pass in 824 s (brick 156.7 s, fhir 203.4 s), and IndependentOntologyAxiomIT 15/15.
  • Postgres was not run. The new query uses the same constructs as the existing ancestors / disjointAxioms queries.

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not run locally. No new Playwright spec. These fixes are covered by the unit tests above and by the Collate PR's Studio tests.

Visual regression baselines

  • Not applicable. The inbox and sub-rail buttons keep their ask-rail__item classes, but TooltipTrigger adds tw:h-max tw:w-max tw:outline-hidden, the same as the existing Rail buttons. A baseline may still need a refresh if the merge queue flags one.

UI recording

Not applicable: these are standalone bug fixes, not a UI feature.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed. (Optional field in a per-user JSON document; nothing to migrate.)
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review against REVIEW.md via pr-checklist: not run.
  • Decision check: ADR:2026-11-16-a-live-rule-is-stated-once records the duplicate-rule refusal and the ontologyId contract; 2026-10-19-native-ontology-imports-use-working-drafts gains amendment v15.

🤖 Generated with Claude Code


Summary by Gitar

  • Accessibility:
    • Added visible keyboard focus rings to inbox and sub-rail items in sidebar.less
  • Client API:
    • rdfAPI.ts preserves ontologyId when normalizing saved queries on library saves

This will update automatically on new commits.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; the failing apply-test expectation is fixed.

Summary

The PR refuses duplicate ontology rules, preserves saved queries' optional ontologyId, and fixes disabled tooltips and nested sidebar buttons.

  • Ontology writes reject duplicate rules, and import previews mark repeats as duplicates.
  • Saved SPARQL queries can keep the ontology they belong to.
  • Disabled-child tooltips work in the Tabs actions slot without crashing.
  • AI inbox and sub-rail actions use one tooltip button with visible keyboard focus.

Reviews (7) · Last reviewed commit: "Expect a native change set with two iden..." · Reviewed by Greptile

…ltip and nested buttons

- A rule that states what a live rule of the same subject already states is
  refused (400) on every ontology write. Import preview marks a rule the file
  repeats as DUPLICATE, so it no longer passes preview and fails at apply.
- Saved SPARQL queries carry an optional ontologyId, kept by the server, so
  Ontology Studio can list a query only in the ontology it was saved in.
- Tooltip wires a disabled child through useFocusable instead of react-aria's
  <Focusable>, whose development-only check threw in the Tabs actions slot.
- InboxIconButton and SubRail render TooltipTrigger as the button instead of
  nesting a <button> inside it.
@anuj-kumary
anuj-kumary requested review from a team as code owners November 16, 2026 10:24
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

… check, record the decisions

- rdfAPI keeps a saved query's ontologyId, so a save from the OSS console no
  longer unscopes Ontology Studio queries.
- The duplicate-rule check reads LIMIT + 1 same-subject rules and refuses the
  write past the working model's 10,000 limit instead of missing a duplicate.
- Regenerate settings.ts and sparqlQuerySettings.ts, which embed the
  saved-query type.
- ADR:2026-11-16-a-live-rule-is-stated-once records both rules; the import
  record gains amendment v15 for duplicate rules.
The per-rule query re-read and re-signed every same-subject rule for each
changed rule, which made a brick install take 1381 s instead of 143.5 s and
exhausted the connection pool. The check now reads the live rules of 20
changed subjects per query and signs each once; brick installs in 181.6 s.
A batch of 20 subjects whose rules together pass the 10,000 working-model
bound is halved until each part fits, so only a single subject with more than
10,000 live rules refuses the write. ADR:2026-11-16-a-live-rule-is-stated-once
v2 records the batch size, the per-subject bound and the Brick timings.

@harshach harshach left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The duplicate check is in the right place and the batching looks sound, but on MySQL the new axiomsOfSubjects read doesn't lock the way ancestors and disjointAxioms do, so two concurrent writers can still store the same rule. I'd like that read to use FOR UPDATE before this merges. I'd also like IT coverage for the change-set and PATCH paths the description promises, and a visible focus ring on the inbox and sub-rail buttons now that TooltipTrigger hides the outline. The rest are small test and ADR wording nits.

Comment on lines +132 to +137
@SqlQuery(
"SELECT a.json FROM ontology_axiom_entity a JOIN ontology_reference r "
+ "ON r.sourceId = a.id AND r.ontologyId = a.ontologyId "
+ "WHERE a.ontologyId = :ontologyId AND a.deleted = FALSE "
+ "AND r.sourceType = 'ontologyAxiom' AND r.role = 'AXIOM_SUBJECT' AND r.iriHash IN (<iriHashes>) "
+ "ORDER BY a.name, a.id LIMIT :limit")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

On MySQL (REPEATABLE READ), two writers that each add the same rule serialize on the ontology state lock. The second writer's plain SELECT can still read from a snapshot taken before the first writer committed, so both pass and the duplicate is stored. Should this query take @Define("locking") String locking and run with FOR UPDATE like ancestors and disjointAxioms? Postgres READ COMMITTED isn't affected.

requireValid already builds its Context with forUpdate = true, and ADR 2026-10-14-ontology-definitions-have-independent-entity-storage asks for locking reads on both sides of the reference/axiom join for exactly this case.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, done in 67c5b01. axiomsOfSubjects now takes @Define("locking") and requireDistinctRules passes FOR UPDATE (the same constant the working-model Context uses when forUpdate is set). A second concurrent writer on MySQL now does a current read and sees the first writer's committed rule. Recorded as v3 of ADR:2026-11-16-a-live-rule-is-stated-once, citing the independent-entity-storage ADR.

Comment on lines +69 to +74
<TooltipTrigger
aria-label={t('label.inbox')}
className={classNames('ask-rail__item', {
'ask-rail__item--active': isActive,
})}
data-testid="ai-inbox-icon-btn"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Now that TooltipTrigger is the button, keyboard focus on the inbox launcher has no visible indicator, because the trigger forces outline-hidden and .ask-rail__item defines no focus style. Could you add a :focus-visible (or [data-focus-visible]) ring to .ask-rail__item? That would also cover Rail, which shares the gap.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done in 67c5b01. .ask-rail__item draws outline: 2px solid var(--tw-border-color-brand); outline-offset: 2px on [data-focus-visible] and :focus-visible. It's unlayered LESS, so it wins over tw:outline-hidden, and the shared class covers Rail too. yarn token-audit reports no new errors.

Comment on lines +70 to +74
<TooltipTrigger
aria-label={item.label}
className={itemClassName}
data-testid={`ask-sub-rail-item-${item.key}`}
onPress={item.onClick}>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: the action-only sub-rail button also loses its visible keyboard focus ring now that it is the TooltipTrigger. Whatever focus style goes onto .ask-rail__item should also go onto .ask-sub-rail__item.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done in 67c5b01. The same focus rule is on .ask-sub-rail__item.

Comment on lines +92 to +93
@Test
void aSecondRuleStatingTheSameThingIsRefused(TestNamespace ns) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you add IT coverage for the two paths the description promises but no test exercises? (1) A change set with two identical new rules: assert 400 and that neither rule is stored. (2) A PATCH that changes an existing rule's expressions to match another live rule: assert it is refused.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added both in 67c5b01.
(1) aChangeSetWithTwoIdenticalRulesAppliesNeither: apply doesn't fail with a 400 here. Each operation is its own write, so the second rule fails, apply records the change set as APPLY_FAILED, and the first operation rolls back. That's the same contract NativeOntologyImportPreviewIT asserts for a duplicate concept. The test asserts APPLY_FAILED, statuses [ROLLED_BACK, FAILED], the "already states this" message on the failed operation, and that the ontology has no rules.
(2) editingARuleIntoAnotherLiveRuleIsRefused: a JSON PATCH replacing /expressions with the other rule's returns 400 naming 'Customer is a Party', and the patched rule keeps its original expression.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Correction, fixed in beae4b2: you were right about the 400. A native change set is validated once, after every operation, so the duplicate refuses the whole apply with 400 "The rule 'CustomerIsParty' already states this" and the transaction rolls both rules back. It isn't recorded as APPLY_FAILED. The test now asserts the 400, the message, an unchanged working revision and no stored rules. My earlier reply described the glossary change-set path, not the native one.

Comment on lines +101 to +104
() -> service.create(axiomRequest(ontology).withName("CustomerIsPartyAgain")));

assertEquals(400, refused.getStatusCode());
assertTrue(refused.getMessage().contains("Customer is a Party"), refused.getMessage());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: this assertion passes even if duplicateRule names the new rule instead of the existing one, because axiomRequest gives both the display name "Customer is a Party". Give the second request a different displayName so the test pins which rule the message names.

Suggested change
() -> service.create(axiomRequest(ontology).withName("CustomerIsPartyAgain")));
assertEquals(400, refused.getStatusCode());
assertTrue(refused.getMessage().contains("Customer is a Party"), refused.getMessage());
() -> service.create(axiomRequest(ontology).withName("CustomerIsPartyAgain").withDisplayName("Customer is a Party again")));
assertEquals(400, refused.getStatusCode());
assertTrue(refused.getMessage().contains("'Customer is a Party'"), refused.getMessage());

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Applied in 67c5b01. The second request is Customer is a Party again, and the test asserts the message contains 'Customer is a Party', so it pins the existing rule.

List.of(),
List.of(subClassOf(child, parent), subClassOf(child, parent))));

final var preview = importer.preview(source, emptySnapshot(root()));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: consider a second case where the target already stores the rule and the file lists it twice. Expect ALREADY_EXISTS then DUPLICATE and zero axiom operations. That is the case the old count-based matching planned as NEW, which then failed at apply; this test runs against an empty snapshot, so it only reaches the in-file branch.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added in 67c5b01: aStoredRuleListedTwiceAlreadyExistsThenIsADuplicate. The target already stores A ⊑ B, the file lists it twice, and the preview gives ALREADY_EXISTS then DUPLICATE with zero axiom operations. I generalised the test's imported helper into applied(root, source) to build that snapshot.

whose signature the file already stated is a `DUPLICATE` item and plans no operation; a rule whose
signature a stored rule already has is `ALREADY_EXISTS`. Applying refuses a second live rule with
the same subject, type and signature (ADR:2026-11-16-a-live-rule-is-stated-once), so planning one
would pass preview and then fail at apply. `NativeOntologyImportItemsTest` guards this behavior.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: could you add NativeOntologyImportItemsTest to the Guard line? The amendment says that test guards v15, but the header doesn't list it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done in 67c5b01. NativeOntologyImportItemsTest is on the Guard line.

… and PATCH ITs

- axiomsOfSubjects reads FOR UPDATE, so on MySQL REPEATABLE READ a second
  concurrent writer sees a rule the first just committed.
- .ask-rail__item and .ask-sub-rail__item draw a brand outline on keyboard
  focus now that TooltipTrigger hides the outline.
- ITs: a change set with two identical rules applies neither; a PATCH that
  turns a rule into another live rule is refused; the create test pins the
  name of the existing rule.
- Import test for a stored rule the file lists twice.
- ADR v3 (locking read) and wording; the import ADR's Guard lists
  NativeOntologyImportItemsTest.
…h 400

A native change set is validated once after every operation, so the duplicate
refuses the whole apply rather than recording APPLY_FAILED; the test now
asserts the 400, an unchanged working revision and no stored rules.
@gitar-bot

gitar-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🔴 High risk 3 closed / 3 findings

Adding duplicate-rule enforcement to all ontology writes changes stored-data integrity and could roll back imports or change sets containing repeated statements.

Refuses duplicate ontology rules at write time, marks repeated import rules as DUPLICATE so preview matches apply, and lets saved SPARQL queries carry an optional ontologyId. Also fixes the Tooltip crash on disabled children in the Tabs actions slot and removes nested buttons in the inbox and sub-rail. Resolved: the import duplicate handling now matches the Accepted import ADR, the savedSparqlQuery.ontologyId contract is recorded, and the 20-subject batch bound and shared 10000-row limit are documented. No issues remain open.

✅ 3 closed
✅ Quality: Import duplicate handling contradicts Accepted import ADR

📄 openmetadata-service/src/main/java/org/openmetadata/service/rdf/NativeOntologyRdfImporter.java:466-480 📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/OntologyWorkingModel.java:75-89
The Accepted record docs/decisions/2026-10-19-native-ontology-imports-use-working-drafts.md (line 15) says import "consumes duplicate equivalent axioms by count". classifyAxioms no longer does that. A repeated signature is now DUPLICATE, any stored copy absorbs every parsed copy, and OntologyWorkingModel.requireValid refuses a second live rule with the same signature on every write path. Either undo the change, or add an amendment (v15) to that record, or a superseding record, whose rule would read: "A live rule may not state what another live rule of the same subject and type states, compared by NativeOntologyDocument.signature; the server refuses it with 400 on every write path, and import lists a rule the file repeats as DUPLICATE." The description gives this rule in prose ("A rule (axiom) that states what a live rule of the same subject and type already states is refused with 400…"). It also says no record was added, and because the repo squash-merges, that prose never reaches git log.

✅ Quality: New cross-repo savedSparqlQuery.ontologyId contract has no record

📄 openmetadata-spec/src/main/resources/json/schema/api/rdf/savedSparqlQuery.json:41-44 📄 openmetadata-service/src/main/java/org/openmetadata/service/rdf/SavedSparqlQueryService.java:93-94
savedSparqlQuery.json gets an optional ontologyId, and per the description open-metadata/openmetadata-collate#8596 reads it. That makes it a JSON Schema contract another repository has to agree with. No record in docs/decisions/ covers saved-query scoping. The description's checklist leaves "no docs/decisions/ record added for … the ontologyId contract" unchecked. The record would state: "A saved SPARQL query may carry ontologyId; Ontology Studio lists a query only in the ontology it was saved in, a query without it is unscoped and is shown only outside the Studio, and the OSS console never sets it. A stored query without the field needs no migration." It could also say what happens to a query whose ontology is deleted.

✅ Quality: New 20-subject batch and shared 10000-row bound are not recorded

📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/OntologyWorkingModel.java:62 📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/OntologyWorkingModel.java:110-118 📄 openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/OntologyReferenceDAO.java:132-141
This commit adds a batch size, SUBJECTS_PER_RULE_QUERY = 20, which was a judgment call. It also changes what the WORKING_MODEL_CLOSURE (10000) bound covers. The bound used to apply to the same-type rules of one subject. Now it applies to every live rule of up to 20 subjects together, and exceeding it refuses the whole write with "Ontology validation exceeds the 10000 reference limit". ADR:2026-11-16-a-live-rule-is-stated-once is still at v1 and says nothing about either value. The description gives the rule only in prose ("reads the live rules of up to 20 changed subjects at a time; each rule is signed once") and gives the reason in the Brick timings (143.5 s / 1381 s / 181.6 s). Because the repo squash-merges, that reasoning would be lost. The ADR should get a revision that says: "The duplicate-rule check reads the live rules of at most 20 changed subjects per query, and the 10000-row working-model bound applies to that whole batch, chosen because a per-rule query made the Brick pack install take 1381 s."

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@anuj-kumary
anuj-kumary enabled auto-merge (squash) November 16, 2026 14:43
@anuj-kumary
anuj-kumary merged commit 8629cb2 into main Nov 16, 2026
66 checks passed
@anuj-kumary
anuj-kumary deleted the anuj-kumary/ontology-studio-testing-pending branch November 16, 2026 14:51
yan-3005 added a commit that referenced this pull request Nov 18, 2026
#37883 stopped planning a rule that a pack states twice; fhir repeats 731, so
its preview plans 15673 operations, not 16404.
sonika-shah pushed a commit that referenced this pull request Nov 18, 2026
… SAML adopt 500, cache markers, stale expectations) (#38013)

* test(it): read MySQL lock waits from performance_schema in DataProductDeleteRaceIT

On CI the innodb_trx statement text never matched the blocked statements,
so each race step only ended when a request hit MySQL's 50s lock-wait
timeout, and one step outlived the 60s wait. data_lock_waits joined to
data_locks names the table each blocked transaction waits on, independent
of the statement text. Locally the three races now take 1.7-3.8s on MySQL
instead of about 50s.

(cherry picked from commit 536e181)

* fix(mcp): serve the MCP app state from memory so a database outage answers 503, not a hang

McpAvailabilityFilter read the McpApplication entity on every /mcp request,
before the bearer token is checked. Once the cached entry expired, a database
outage made every MCP request block on that read for ~20s instead of reaching
the auth path that answers 503 with Retry-After (CredentialDatabaseOutageIT).

The state is now kept in memory and re-read through the entity cache every 2s
in the background; a failed re-read keeps the last state. ADR v2 records it.

* fix(sso): reload a concurrently created SAML user from the database

When two first SAML logins race, the loser adopts the winner's account. Its
reload read through the entity cache, where the loser's own earlier miss had
left a not-found marker, so with Redis enabled the adopt failed and the login
answered 500 (SsoSamlLoginIT.concurrentFirstLoginsCreateOneAccount).

* fix(migration): clear the not-found marker of a repaired context file FQN

ContextFileFqnRepair invalidated the entity caches but not the negative cache,
so a lookup of the derived FQN made before the repair kept answering 404 for
30s with Redis enabled (ContextFileFqnRepairMigrationIT).

* test(it): wait for the held OIDC token exchange before the next test

OC-17 released a held token request without waiting for it; the late answer
minted an ID token that overwrote the provider's last issued token while OC-01
was asserting on it.

* test(it): expect the fhir preview count without duplicate rules

#37883 stopped planning a rule that a pack states twice; fhir repeats 731, so
its preview plans 15673 operations, not 16404.

* test(it): let the metric approval run land before the re-ingest baseline

The reviewer PATCH starts an approval run that writes In Review
asynchronously; reading the baseline before it landed made the status
comparison flaky.
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.

Ontology Studio: date range always rejected, saved queries leak across ontologies, duplicate rules allowed, Tooltip crash in Tabs, nested inbox button

3 participants