Skip to content

[Inference API] Address AuthorizationTaskExecutorIT failures#144312

Merged
dimitris-athanasiou merged 3 commits intoelastic:mainfrom
dimitris-athanasiou:address-AuthorizationTaskExecutorIT-failures
Mar 17, 2026
Merged

[Inference API] Address AuthorizationTaskExecutorIT failures#144312
dimitris-athanasiou merged 3 commits intoelastic:mainfrom
dimitris-athanasiou:address-AuthorizationTaskExecutorIT-failures

Conversation

@dimitris-athanasiou
Copy link
Copy Markdown
Contributor

This commit addresses failures in AuthorizationTaskExecutorIT.

  1. test testCreatesChatCompletion_AndThenCreatesTextEmbedding now waits for the second endpoint to be created. As the second endpoint is discovered by the AuthorizationPoller we need to wait for the new endpoint to be stored.
  2. tests based on testEndpointGetsUpdated_GivenFingerprintChanged now wait for inference system indices to be green (have their shards initialized) after the endpoint is stored. The latter guarantees the indices would have been created so that the ensureGreen call works as expected.

Closes #138012
Closes #144249

This commit addresses failures in `AuthorizationTaskExecutorIT`.

  1. test `testCreatesChatCompletion_AndThenCreatesTextEmbedding` now
  waits for the second endpoint to be created. As the second endpoint
  is discovered by the `AuthorizationPoller` we need to wait for the new
  endpoint to be stored.
  2. tests based on `testEndpointGetsUpdated_GivenFingerprintChanged` now
  wait for inference system indices to be green (have their shards initialized)
  after the endpoint is stored. The latter guarantees the indices would have
  been created so that the `ensureGreen` call works as expected.

Closes elastic#138012
Closes elastic#144249
@dimitris-athanasiou dimitris-athanasiou added >test Issues or PRs that are addressing/adding tests :SearchOrg/Inference Label for the Search Inference team v9.4.0 labels Mar 16, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/search-inference-team (Team:Search - Inference)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 2ac9112a-c61d-48be-8eb2-6e368e0aff5f

📥 Commits

Reviewing files that changed from the base of the PR and between 3516bc1 and c018446.

📒 Files selected for processing (1)
  • muted-tests.yml
💤 Files with no reviewable changes (1)
  • muted-tests.yml

📝 Walkthrough

Walkthrough

This PR removes two muted test entries for AuthorizationTaskExecutorIT, updates AuthorizationTaskExecutorIT to add a deleteEndpoints(ModelRegistry, Set<String>) helper and to wait for inference endpoints and indices (including calling ensureNoInitializingShards()) before proceeding, adjusts endpoint deletion and logging, and adds three rolling-upgrade variants of MappingSupplementaryCharacterRollingUpgradeIT for testMappingWithSupplementaryCharacterFieldName with upgradedNodes values 3, 1, and 2.

Possibly related PRs

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR addresses both linked issues [#138012, #144249] by adding synchronization mechanisms to fix race conditions in endpoint discovery and index initialization.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the intermittent test failures identified in the linked issues; no unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

assertThat(updated.endpointMetadata().internal().fingerprint(), is(updatedFingerprint));
});

deleteEndpoints(modelRegistry, Set.of(endpointId));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm is endpointId a non-preconfigured endpoint? Shouldn't it already be deleted in the shutdown()?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We chatted offline, endpointId is a random string

@dimitris-athanasiou dimitris-athanasiou merged commit 986cedc into elastic:main Mar 17, 2026
36 checks passed
mosche added a commit to mosche/elasticsearch that referenced this pull request Mar 20, 2026
Remove 6 muted-tests.yml entries where the corresponding GitHub
issue has been closed:

- elastic#138012: fixed in PR elastic#144312
- elastic#144169: fixed in PR elastic#144233
- elastic#144240: fixed in PR elastic#144233
- elastic#144246: fixed in PR elastic#144233
- elastic#144249: fixed in PR elastic#144312
- elastic#144392: fixed in PR elastic#144389

Made-with: Cursor
mosche added a commit that referenced this pull request Mar 20, 2026
Remove 6 muted-tests.yml entries where the corresponding GitHub
issue has been closed:

- #138012: fixed in PR #144312
- #144169: fixed in PR #144233
- #144240: fixed in PR #144233
- #144246: fixed in PR #144233
- #144249: fixed in PR #144312
- #144392: fixed in PR #144389

Made-with: Cursor
michalborek pushed a commit to michalborek/elasticsearch that referenced this pull request Mar 23, 2026
…#144312)

This commit addresses failures in `AuthorizationTaskExecutorIT`.

  1. test `testCreatesChatCompletion_AndThenCreatesTextEmbedding` now
  waits for the second endpoint to be created. As the second endpoint
  is discovered by the `AuthorizationPoller` we need to wait for the new
  endpoint to be stored.
  2. tests based on `testEndpointGetsUpdated_GivenFingerprintChanged` now
  wait for inference system indices to be green (have their shards initialized)
  after the endpoint is stored. The latter guarantees the indices would have
  been created so that the `ensureGreen` call works as expected.

Closes elastic#138012
Closes elastic#144249
michalborek pushed a commit to michalborek/elasticsearch that referenced this pull request Mar 23, 2026
Remove 6 muted-tests.yml entries where the corresponding GitHub
issue has been closed:

- elastic#138012: fixed in PR elastic#144312
- elastic#144169: fixed in PR elastic#144233
- elastic#144240: fixed in PR elastic#144233
- elastic#144246: fixed in PR elastic#144233
- elastic#144249: fixed in PR elastic#144312
- elastic#144392: fixed in PR elastic#144389

Made-with: Cursor
dimitris-athanasiou added a commit to dimitris-athanasiou/elasticsearch that referenced this pull request Mar 30, 2026
dimitris-athanasiou added a commit that referenced this pull request Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:SearchOrg/Inference Label for the Search Inference team Team:Search - Inference >test Issues or PRs that are addressing/adding tests v9.4.0

Projects

None yet

3 participants