Skip to content

Conversation

@martijnvg
Copy link
Member

Change tests to use monitor bulk api on elected master node before verifying watcher index exists.
Sometimes the monitor service on the elected master doesn't yet export monitor documents resulting in tests using the ensureInitialLocalResources(...) method to fail.
Cluster alerts watcher are only installed when local exporter tries to resolve local bulk.

Relates to #66586

Change tests to use monitor bulk api on elected master node before verifying watcher index exists.
Sometimes the monitor service on the elected master doesn't yet export monitor documents resulting in tests using the `ensureInitialLocalResources(...)` method to fail.
Cluster alerts watcher are only installed when local exporter tries to resolve local bulk.

Relates to elastic#66586
@martijnvg martijnvg added >test Issues or PRs that are addressing/adding tests :Data Management/Monitoring v8.0.0 v7.12.0 labels Feb 17, 2021
@martijnvg martijnvg requested a review from jakelandis February 17, 2021 17:11
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Feb 17, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (Team:Core/Features)

Copy link
Contributor

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

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

LGTM

@jakelandis
Copy link
Contributor

@elasticmachine update branch
(recent release caused bwc to build wrong verison)

@martijnvg martijnvg merged commit de2598c into elastic:master Feb 18, 2021
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Feb 22, 2021
…elastic#69139)

Change tests to use monitor bulk api on elected master node before verifying watcher index exists.
Sometimes the monitor service on the elected master doesn't yet export monitor documents resulting in tests using the `ensureInitialLocalResources(...)` method to fail.
Cluster alerts watcher are only installed when local exporter tries to resolve local bulk.

Relates to elastic#66586
martijnvg added a commit that referenced this pull request Feb 22, 2021
…69326)

Re-enabled TransportMonitoringMigrateAlertsActionTests#testLocalAlertsRemoval and TransportMonitoringMigrateAlertsActionTests#testRepeatedLocalAlertsRemoval on 7.x branch.

Includes changes from #69139 and #68752
Relates to #66586

Included commits:
* Add more trace logging when installing monitor watches and (#68752)

unmute TransportMonitoringMigrateAlertsActionTests#testLocalAlertsRemoval and
TransportMonitoringMigrateAlertsActionTests#testRepeatedLocalAlertsRemoval tests

Somehow during these tests the monitor watches are not installed. Both
tests use the local exporter and this exporter only installs the watches
under specific conditions via the elected master node. I suspect the
conditions are never met. The http exporter is more relaxed when attempting
to install monitor watches and the tests using the http exporter seem
not to be prone by the fact that tests fail because monitor watches have
not been installed.

Relates to #66586

* Manually trigger local exporter to open a bulk in some monitor tests. (#69139)

Change tests to use monitor bulk api on elected master node before verifying watcher index exists.
Sometimes the monitor service on the elected master doesn't yet export monitor documents resulting in tests using the `ensureInitialLocalResources(...)` method to fail.
Cluster alerts watcher are only installed when local exporter tries to resolve local bulk.

Relates to #66586
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Monitoring Team:Data Management Meta label for data/management team >test Issues or PRs that are addressing/adding tests v7.12.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants