[Obs AI Assistant] Fix no-params log categories assertion after #290244 - #290504
[Obs AI Assistant] Fix no-params log categories assertion after #290244#290504kibanamachine wants to merge 1 commit into
Conversation
Update the "no params" test to match the contract from #290244: with no entity filters, no log categories are returned. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
⏭️ Flaky-fix verification skippedThe failing assertion is deterministic — corrected to match the contract change in #290244 — so required CI is the whole verdict and repeated flaky-runner passes would add no signal. Applied Why the flaky test runner wasn't usedThe How release-note and backport labels were chosenApplied
|
💔 Build Failed
Failed CI Steps
Metrics [docs]
Test Failures
History |
Fixes #290494
Summary
returns no service summary and the service + container log categories when no params are specifiedasserted two log categories for a query with no entity params, but now receives[], so it fails deterministically onmain.toStrictEqual([])and renames the test toreturns no service summary and no log categories when no params are specified.Relevant history
if (hasEntityFilters)inget_observability_alert_details_context/index.ts, so an unscoped query ({}) never produces thelogCategoriesitem — turning the pre-existing assertion into a stale expectation.Context
hasEntityFiltersisserviceName || hostName || containerId || kubernetesPodName, allundefinedfor the no-params case, sogetLogCategories()returns[]. The three sibling tests each supply an entity param and remain unaffected.kibana-on-merge - mainfor bothlocal-serverless-observability_completeandlocal-stateful-classictargets; the run finished in 0.50s with an empty result rather than timing out, consistent with a deterministic contract change rather than a race.Verification
Verified locally
node scripts/eslint x-pack/solutions/observability/plugins/observability/test/scout/api/tests/alert_details_context_logs_with_service_name.spec.tsNot verified locally
Note
Share feedback in #kibana-qa. Mention
@copilotto make quick changes.