Skip to content

[TEST] Wait for internal inference indices to be created in authorization IT#143885

Merged
dimitris-athanasiou merged 10 commits intoelastic:mainfrom
dimitris-athanasiou:unmute-AuthorizationTaskExecutorIT
Mar 12, 2026
Merged

[TEST] Wait for internal inference indices to be created in authorization IT#143885
dimitris-athanasiou merged 10 commits intoelastic:mainfrom
dimitris-athanasiou:unmute-AuthorizationTaskExecutorIT

Conversation

@dimitris-athanasiou
Copy link
Copy Markdown
Contributor

@dimitris-athanasiou dimitris-athanasiou commented Mar 9, 2026

After #143866, this is a better attempt at fixing those tests.

ensureGreen calls the cluster _health API. With providing the index pattern, this returns green
when no matching index exists.

We actually want to ensure the inference indices are created. Calling the GET _inference API does that.

Closes #140849

Unmutes AuthorizationTaskExecutorIT tests after the fix elastic#143866.

Even though that fix does not target elastic#138012 directly, there could
be an underlying connection. Thus, I am also unmuting that test too.
For the very least, it would be useful to see if the failure remains
the same.
@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 9, 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 9, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This pull request mutes four failing tests in AuthorizationTaskExecutorIT and updates the test class's initialization logic. The changes remove unused imports, modify the createComponents() method to declare throws Exception, and replace a synchronous ensureGreen call with an asynchronous assertBusy wait mechanism to verify that EIS endpoints exist during test setup.

Possibly related PRs

  • PR #143866: Both PRs modify AuthorizationTaskExecutorIT's test setup to ensure inference system readiness, with related approaches to managing endpoint and index initialization timing.
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR correctly addresses both linked issues by ensuring inference indices are created before tests run, eliminating timing-related intermittent failures.
Out of Scope Changes check ✅ Passed All changes are scoped to test setup improvements: removing unused imports, updating method signatures, and adding async wait logic for inference indices.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

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

@dimitris-athanasiou dimitris-athanasiou enabled auto-merge (squash) March 10, 2026 10:25
@dimitris-athanasiou dimitris-athanasiou changed the title [TEST] Unmute AuthorizationTaskExecutorIT tests [TEST] Wait for internal inference indices to be created in authorization IT Mar 10, 2026
@dimitris-athanasiou
Copy link
Copy Markdown
Contributor Author

@DonalEvans I've revamped this PR. Could you please take another look?

@dimitris-athanasiou dimitris-athanasiou merged commit 627a7c4 into elastic:main Mar 12, 2026
36 checks passed
@dimitris-athanasiou dimitris-athanasiou deleted the unmute-AuthorizationTaskExecutorIT branch March 12, 2026 11:08
szybia added a commit to szybia/elasticsearch that referenced this pull request Mar 12, 2026
…elocations

* upstream/main: (49 commits)
  CCS logging fixes (elastic#144070)
  Improve CPS cluster exclusion handling (elastic#143488)
  Remove snapshot condition now that node_reduce phase is in non-snapshot builds (elastic#144090)
  Drop deprecation warnings when updating a mapping in the cluster state applier (elastic#143884) (elastic#144040)
  Add ensureGreenAndNoInitializingShards helper (elastic#144044)
  Removed unnecessary applies_to blocks from deprecated query (elastic#144096)
  [CPS] Use single CrossProjectModeDecider instance (elastic#144030)
  Fix ESQL TS requests with LIMIT 0 (elastic#144031)
  ESQL: Remove `create` methods in aggs (elastic#144098)
  ES|QL: Refactor ChangeLimitOperator (elastic#144017)
  Add Paginated Hit Source Tests (elastic#142592)
  Fix test failure not preferred (elastic#144019)
  Remove serialization logic from EIS authorization response (elastic#144021)
  ESQL: CSV schema inference and parsing enhancements (elastic#144050)
  ESQL: Fix incorrectly optimized fork with nullify unmapped_fields (elastic#143030)
  Fix MMR release test using subqueries (elastic#144087)
  Refactoring `UserAgentPlugin` (elastic#140712)
  Drop non-finite samples in Prometheus remote write (elastic#144055)
  [TEST] Wait for internal inference indices to be created in authorization IT (elastic#143885)
  Disable ndjson datasource QA tests in release-tests (elastic#143992)
  ...
michalborek pushed a commit to michalborek/elasticsearch that referenced this pull request Mar 23, 2026
…tion IT (elastic#143885)

After elastic#143866, this is a better attempt at fixing those tests.

ensureGreen calls the cluster _health API. With providing the index pattern, this returns green
when no matching index exists.

We actually want to ensure the inference indices are created. Calling the GET _inference API does that.

Closes elastic#140849
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

Development

Successfully merging this pull request may close these issues.

[CI] AuthorizationTaskExecutorIT testCreatesEisChatCompletionEndpoint failing

3 participants