Skip to content

[Entity Analytics] Fix CSV upload test to stop automated-resolution maintainer#264061

Closed
maxcold wants to merge 1 commit intomainfrom
fix/csv-upload-test-stop-resolution-maintainer
Closed

[Entity Analytics] Fix CSV upload test to stop automated-resolution maintainer#264061
maxcold wants to merge 1 commit intomainfrom
fix/csv-upload-test-stop-resolution-maintainer

Conversation

@maxcold
Copy link
Copy Markdown
Contributor

@maxcold maxcold commented Apr 17, 2026

Summary

Fixes the FTR test should link matching entities to a target in resolution_csv_upload.ts that is consistently failing after PR #263732 (init on install).

PR #263732 moved entity maintainers initialization into the Entity Store install flow. The CSV upload test previously relied on enableEntityStoreV2() (without maintainer init) to prevent the automated-resolution maintainer from racing with test assertions. With the new behavior, maintainers are initialized during install regardless, so the test now explicitly stops the automated-resolution maintainer in the before hook.

The stopMaintainer call is wrapped in a try/catch for backward compatibility — on builds where #263732 hasn't merged yet, the maintainer task may not exist and the stop call is safely ignored.

Related: #263732, #263728

Checklist

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

Low risk — test-only change. Adds a stopMaintainer call in the test before hook with a try/catch fallback, so it's a no-op when the maintainer doesn't exist.

…aintainer

After PR #263732 (init on install), entity maintainers are initialized
during the Entity Store install flow. The CSV upload test relied on
maintainers not being initialized, causing a race condition where the
automated-resolution maintainer links entities before the test can
assert. Stop the maintainer explicitly in the before hook with a
try/catch for backward compatibility.
@maxcold maxcold added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Entity Analytics Security Entity Analytics Team labels Apr 17, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Apr 17, 2026

Catch flakiness early (recommended)

Recommended before merge: run the flaky test runner against this PR to catch flakiness early.

Trigger a run with the Flaky Test Runner UI or post this comment on the PR:

/flaky ftrConfig:x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/entity_resolution/trial_license_complete_tier/configs/ess.config.ts:30 ftrConfig:x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/entity_resolution/trial_license_complete_tier/configs/serverless.config.ts:30

This check is experimental. Share your feedback in the #appex-qa channel.

Posted via Macroscope — Flaky Test Runner nudge

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #68 / Serverless Observability - Deployment-agnostic Synthetics API integration tests SyntheticsAPITests PrivateLocationCreateMonitor handles auto upgrading policies

Metrics [docs]

✅ unchanged

@maxcold
Copy link
Copy Markdown
Contributor Author

maxcold commented Apr 17, 2026

/flaky ftrConfig:x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/entity_resolution/trial_license_complete_tier/configs/ess.config.ts:30

@maxcold
Copy link
Copy Markdown
Contributor Author

maxcold commented Apr 17, 2026

/flaky ftrConfig:x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/entity_resolution/trial_license_complete_tier/configs/serverless.config.ts:30

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner

✅ Build triggered - kibana-flaky-test-suite-runner#11708

  • x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/entity_resolution/trial_license_complete_tier/configs/serverless.config.ts x30

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#11708

[✅] x-pack/solutions/security/test/security_solution_api_integration/test_suites/entity_analytics/entity_resolution/trial_license_complete_tier/configs/serverless.config.ts: 30/30 tests passed.

see run history

@maxcold maxcold marked this pull request as ready for review April 17, 2026 21:35
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Apr 17, 2026

Pinging @elastic/security-entity-analytics (Team:Entity Analytics)

@maxcold maxcold requested a review from chennn1990 April 17, 2026 21:35
@maxcold maxcold requested review from a team as code owners April 17, 2026 21:35
@maxcold maxcold requested a review from tcalopes April 17, 2026 21:35
@chennn1990
Copy link
Copy Markdown
Contributor

chennn1990 commented Apr 19, 2026

@maxcold lets close this one, the change is already covered by #264061

@maxcold
Copy link
Copy Markdown
Contributor Author

maxcold commented Apr 20, 2026

closing as this change already a part of #263732

@maxcold maxcold closed this Apr 20, 2026
@maxcold maxcold deleted the fix/csv-upload-test-stop-resolution-maintainer branch April 30, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Entity Analytics Security Entity Analytics Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants