Skip to content

Conversation

@hendrikmuhs
Copy link

@hendrikmuhs hendrikmuhs commented Jan 29, 2020

The audit index is re-created for every testrun and therefore potential useful debug information gets
lost. This change reads out the audit index and logs the results, which makes them available for
debugging CI issues.

relates #51549

Notes: I tried to only dump the audit index on a failure(e.g. using a TestWatcher), however that's not possible as the code always runs after the audit index has been deleted. Creating this extra logs does not seem too heavy, therefore it dumps the audit index for every test now.

@hendrikmuhs hendrikmuhs added >test Issues or PRs that are addressing/adding tests v8.0.0 :ml/Transform Transform v7.7.0 labels Jan 29, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml/Transform)

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

LGTM

Might be worth adding the same to MultiClusterYamlTestSuiteIT for debugging #51629

transformsToClean = new ArrayList<>();
waitForPendingTasks(adminClient());

// using '*' to make this lenient and do not fail if the audit index does not exist
Copy link
Member

Choose a reason for hiding this comment

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

The same can be achieved with new searchRequest.indicesOptions(IndicesOptions.LENIENT_EXPAND_OPEN)

Copy link
Author

Choose a reason for hiding this comment

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

searchAll does a index refresh which would fail if you give it an explicit index name.

@hendrikmuhs hendrikmuhs merged commit 5d0d362 into elastic:master Jan 30, 2020
@hendrikmuhs hendrikmuhs deleted the debug-transformIT-HLRC branch January 30, 2020 09:09
hendrikmuhs pushed a commit that referenced this pull request Jan 30, 2020
The audit index is re-created for every testrun and therefore potential useful debug information
gets lost. This change reads out the audit index and logs the results, which makes them available
for debugging CI issues.

relates #51549
hendrikmuhs pushed a commit that referenced this pull request Feb 18, 2020
audit messages are stored in the notifications index, so audit information is lost for integration
tests. This change forwards audit messages to logs, so they can help to debug issues.

relates: #51627
hendrikmuhs pushed a commit that referenced this pull request Feb 18, 2020
audit messages are stored in the notifications index, so audit information is lost for integration
tests. This change forwards audit messages to logs, so they can help to debug issues.

relates: #51627
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:ml/Transform Transform >test Issues or PRs that are addressing/adding tests v7.7.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants