Skip to content

[APM] Add log statements for flaky test#53775

Merged
sorenlouv merged 4 commits intoelastic:masterfrom
sorenlouv:log-flaky-tests
Dec 24, 2019
Merged

[APM] Add log statements for flaky test#53775
sorenlouv merged 4 commits intoelastic:masterfrom
sorenlouv:log-flaky-tests

Conversation

@sorenlouv
Copy link
Copy Markdown
Contributor

@sorenlouv sorenlouv commented Dec 23, 2019

I've been unable to reproduce a test failure that occasionally happens on CI. For details about the failure see #51764.

I have a hunch that a race condition is causing the test to fail. The test that is failing tries to verify that an existing agent config can be found when given the correct arguments. However, sometimes it is not found.
My hypothesis is the agent configuration is either not created correctly, or is created in parallel with the search request, causing the search request to be made before the config is created.

I was having problems seeing log.debug/log.info so resorted to console.log. Would prefer not using console.log though.

Important log lines indicating that the agent configuration was created:

[2019-12-23T22:54:27.872Z] Creating agent configuration
[2019-12-23T22:54:27.872Z]                │ proc [kibana] Could not get dynamic index pattern because indices "apm-*,apm-*,apm-*" don't exist
[2019-12-23T22:54:27.872Z]                │ proc [kibana]   log   [22:54:27.850] [info][apm][apm][plugins] Hitting: /api/apm/settings/agent-configuration/new with test-service/undefined
[2019-12-23T22:54:27.872Z]                │ proc [kibana]   log   [22:54:27.865] [info][apm][apm][plugins] Created agent configuration
[2019-12-23T22:54:27.872Z] Agent configuration created

Important log lines indicating that the agent configuration was found:

[2019-12-23T22:54:30.435Z] Requesting: /api/apm/settings/agent-configuration/search. Expecting: response
[2019-12-23T22:54:30.435Z]                │ proc [kibana]   log   [22:54:30.292] [info][apm][apm][plugins] Hitting: /api/apm/settings/agent-configuration/search for test-service/undefined
[2019-12-23T22:54:30.435Z]                │ proc [kibana]   log   [22:54:30.317] [info][apm][apm][plugins] Config was found for test-service/undefined
[2019-12-23T22:54:30.436Z] Responded: /api/apm/settings/agent-configuration/search
[2019-12-23T22:54:30.436Z]                └- ✓ pass  (1.3s) "apis APM apm feature controls APIs can be accessed by global_all user"

@sorenlouv sorenlouv requested a review from a team December 23, 2019 16:45
@sorenlouv sorenlouv added release_note:skip Skip the PR/issue when compiling release notes v8.0.0 labels Dec 23, 2019
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@sorenlouv sorenlouv added the Team:APM - DEPRECATED Use Team:obs-ux-infra_services. label Dec 24, 2019
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/apm-ui (Team:apm)

@dgieselaar
Copy link
Copy Markdown
Contributor

Would it help to log the output in the failing test of: whether the index exists, and a search without filters (e.g. output all documents)?

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@sorenlouv
Copy link
Copy Markdown
Contributor Author

Would it help to log the output in the failing test of: whether the index exists, and a search without filters (e.g. output all documents)?

Good idea. Adding in 6b2c986

@sorenlouv sorenlouv merged commit 53513f6 into elastic:master Dec 24, 2019
@sorenlouv sorenlouv deleted the log-flaky-tests branch December 24, 2019 11:39
gmmorris added a commit to gmmorris/kibana that referenced this pull request Dec 27, 2019
* master:
  Possibility to filter when testing scripted fields (elastic#35379) (elastic#44220)
  Update maps telemetry mappings to account for recent updates (elastic#53803)
  [Maps] Only show legend when layer is visible (elastic#53781)
  remove use of experimental fs.promises api (elastic#53346)
  [APM] Add log statements for flaky test (elastic#53775)
jloleysens added a commit to jloleysens/kibana that referenced this pull request Dec 30, 2019
…le-saved-objects

* 'master' of github.com:elastic/kibana: (250 commits)
  Allow chromeless applications to render via non-/app routes (elastic#51527)
  Add server rendering service to enable standalone route rendering (elastic#52161)
  Possibility to filter when testing scripted fields (elastic#35379) (elastic#44220)
  Update maps telemetry mappings to account for recent updates (elastic#53803)
  [Maps] Only show legend when layer is visible (elastic#53781)
  remove use of experimental fs.promises api (elastic#53346)
  [APM] Add log statements for flaky test (elastic#53775)
  [APM] Transaction page throws unhandled exception if transactions doesn't have  `http.request` (elastic#53760)
  Licensing plugin functional tests (elastic#53580)
  [Lens] Disable saving visualization until there are no changes to the document (elastic#52982)
  [Monitoring] Added safeguard for some EUI components (elastic#53318)
  [Vega] Shim new platform - cleanup vega_visualization dependencies (elastic#53605)
  Display changed field formats without requiring hard page refresh. (elastic#53746)
  Upgrade EUI to v17.3.1 (elastic#53655)
  [APM] Fix missing apm indicies (elastic#53541)
  Disable inspector for timelion (elastic#53747)
  Clean up search servie (elastic#53701)
  [Dashboard] Grid: removing double handler (elastic#53707)
  Remove SavedObjectRegistryProvider from codebase (elastic#53455)
  Move ui/courier into data shim plugin (elastic#52359)
  ...
jkelastic pushed a commit to jkelastic/kibana that referenced this pull request Jan 8, 2020
* [APM] Add log statements for flaky test

* Improve logging

* Improve logging

* Log full index on error
sorenlouv added a commit to sorenlouv/kibana that referenced this pull request Feb 6, 2020
* [APM] Add log statements for flaky test

* Improve logging

* Improve logging

* Log full index on error
sorenlouv added a commit that referenced this pull request Feb 11, 2020
* [APM] Add log statements for flaky test

* Improve logging

* Improve logging

* Log full index on error

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:APM - DEPRECATED Use Team:obs-ux-infra_services. v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants