Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APM] Display automatic deployment annotations correctly #102020

Merged
merged 4 commits into from
Jun 14, 2021

Conversation

dgieselaar
Copy link
Member

Closes #101760.

@dgieselaar dgieselaar added release_note:fix v7.14.0 v7.13.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Jun 14, 2021
@dgieselaar dgieselaar requested a review from a team as a code owner June 14, 2021 05:08
@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Jun 14, 2021
@elasticmachine
Copy link
Contributor

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

});
}

await es.indices.create({
Copy link
Member

Choose a reason for hiding this comment

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

Do you really need to create the index before calling the API? I thought that happened automatically

Copy link
Member Author

Choose a reason for hiding this comment

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

If you create an index template yes, otherwise you have to create it manually right?

});

const docs = dates.flatMap((date, index) => {
const defaults = {
Copy link
Member

Choose a reason for hiding this comment

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

nit: naming

Suggested change
const defaults = {
const defaultAnnotation = {

or

Suggested change
const defaults = {
const baseAnnotation = {


await es.bulk({
index: indexName,
body: docs.flatMap((doc) => [{ index: {} }, doc]),
Copy link
Member

Choose a reason for hiding this comment

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

Why are you adding an empty doc for every annotation doc?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not, I think? This is how the bulk API works: an operation (in this case index), followed by the document.

Copy link
Member

Choose a reason for hiding this comment

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

Ah yes. i forgot that's how it works. So weird that the ES client doesn't abstract that away if you ask me.

Copy link
Member

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

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

Thanks for adding a test

@sorenlouv
Copy link
Member

jenkins run the e2e

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.13
7.x

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jun 14, 2021
…102061)

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
kibanamachine added a commit that referenced this pull request Jun 14, 2021
…102062)

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
cuff-links pushed a commit to cuff-links/kibana that referenced this pull request Jun 15, 2021
@cauemarcondes
Copy link
Contributor

@dgieselaar is there an easy way to test it?

@smith smith self-assigned this Jul 16, 2021
@smith
Copy link
Contributor

smith commented Jul 16, 2021

Tests ok. Versions annotations shown at proper positions instead of how reported in original bug.
CleanShot 2021-07-16 at 16 14 17

@smith smith added the apm:test-plan-done Pull request that was successfully tested during the test plan label Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:test-plan-7.14.0 apm:test-plan-done Pull request that was successfully tested during the test plan auto-backport Deprecated - use backport:version if exact versions are needed release_note:fix Team:APM All issues that need APM UI Team support v7.13.0 v7.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Automatic deployment annotations are incorrectly displayed
6 participants