[TEST] Ensure-green inference system indices in AuthorizationTaskExecutorIT#143866
Conversation
…utorIT There are failures in the tests in AuthorizationTaskExecutorIT. We get the `all shards fail` error some times when we try to get models with `ModelRegistry.getAllModels`. After looking into this, I believe the cause is that the inference system indices may not manage to initialize properly by the time the test runs. This calls the `ensureGreen()` method before any of those tests run. This should fix this potential issue. Closes elastic#140802 Closes elastic#140849 Closes elastic#143845 Relates elastic#137911 Relates elastic#138012
|
Pinging @elastic/search-inference-team (Team:Search - Inference) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis change modifies the AuthorizationTaskExecutorIT test class to add environment readiness checks during test component creation. The update calls ensureGreen on InferenceIndex.INDEX_PATTERN and InferenceSecretsIndex.INDEX_PATTERN to verify indices are ready before proceeding. Two new imports are added for InferenceIndex and InferenceSecretsIndex. No public API signatures are affected. 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@dimitris-athanasiou It looks like I just missed the boat on this, but should the muted tests be unmuted? Both #140802 and #143845 have muted tests associated with them. |
|
ah, I'll follow up. thanks for catching this! |
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.
…tion IT (#143885) 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
…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
There are failures in the tests in AuthorizationTaskExecutorIT. We get the
all shards failerror some times when we try to get models withModelRegistry.getAllModels. After looking into this, I believe the cause is that the inference system indices may not manage to initialize properly by the time the test runs.This calls the
ensureGreen()method before any of those tests run. This should fix this potential issue.Closes #140802
Closes #140849
Closes #143845
Relates #137911
Relates #138012