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

TypeScript project references for APM #90049

Merged
merged 38 commits into from
Feb 12, 2021
Merged

Conversation

smith
Copy link
Contributor

@smith smith commented Feb 2, 2021

There are a few workarounds for a bug in TypeScript 4.2, which can be removed once we've upgraded to that (we're tracking this in #90788.)

Because we're emitting declarations a few extra interfaces need to be exported.

The optimization scripts have been removed.

The scripts directory previously had its own tsconfig, but now everything is under one config, so a few changes were made there.

Change all spelling of "throuput" to "throughput"

Fixes #81003. References #80508.

@kibanamachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

History

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

@smith smith added release_note:skip Skip the PR/issue when compiling release notes v7.12.0 labels Feb 9, 2021
@smith
Copy link
Contributor Author

smith commented Feb 9, 2021

retest

@smith smith requested a review from dgieselaar February 9, 2021 21:19
@smith
Copy link
Contributor Author

smith commented Feb 10, 2021

@elasticmachine merge upstream

.gitignore Outdated
@@ -61,9 +61,6 @@ npm-debug.log*
.ci/bash_standard_lib.sh
.gradle

# apm plugin
/x-pack/plugins/apm/tsconfig.json
Copy link
Member

Choose a reason for hiding this comment

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

I had a look, and completionInfo() is still twice as fast with the optimized tsconfig, and project start up time also seems to be slower. I'm not sure if I'm doing something wrong. What do you think about leaving this in for now and removing it later if we feel like it's no longer worth it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we would be better served by concentrating any effort on further performance kibana-wide, rather than having a different setup for APM. I'm ok with leaving it in, but don't think we should.

Copy link
Member

Choose a reason for hiding this comment

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

I agree in not spending any effort to improve this. So if it's causing issues let's remove it. But it worked well before, and I would like us to keep it around for a bit longer to compare the two different setups.

@smith
Copy link
Contributor Author

smith commented Feb 11, 2021

@elasticmachine merge upstream

@smith smith added the auto-backport Deprecated - use backport:version if exact versions are needed label Feb 11, 2021
[SPAN_SUBTYPE]: string;
'span.destination.service.resource': string;
'span.type': string;
'span.subtype': string;
Copy link
Member

Choose a reason for hiding this comment

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

Is it not possible to use the variables anymore?

Copy link
Member

Choose a reason for hiding this comment

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

It's a bug in 4.1 that will be fixed in 4.2. There's some explanation in the comment above this code.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 5.2MB 5.2MB +22.0B

History

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

Copy link
Member

@dgieselaar dgieselaar left a comment

Choose a reason for hiding this comment

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

Thanks Nathan!

@dgieselaar dgieselaar merged commit f980405 into elastic:master Feb 12, 2021
@kibanamachine
Copy link
Contributor

Backport result

{"level":"info","message":"POST https://api.github.com/graphql (status: 200)"}
{"level":"info","message":"POST https://api.github.com/graphql (status: 200)"}
{"meta":{"labels":["Team:apm","Team:uptime","auto-backport","release_note:skip","v7.12.0","v8.0.0"],"branchLabelMapping":{"^v8.0.0$":"master","^v7.12.0$":"7.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"},"existingTargetPullRequests":[]},"level":"info","message":"Inputs when calculating target branches:"}
{"meta":["7.x"],"level":"info","message":"Target branches inferred from labels:"}
{"meta":{"killed":false,"code":2,"signal":null,"cmd":"git remote rm kibanamachine","stdout":"","stderr":"error: No such remote: 'kibanamachine'\n"},"level":"info","message":"exec error 'git remote rm kibanamachine':"}
{"meta":{"killed":false,"code":2,"signal":null,"cmd":"git remote rm elastic","stdout":"","stderr":"error: No such remote: 'elastic'\n"},"level":"info","message":"exec error 'git remote rm elastic':"}
{"level":"info","message":"Backporting [{\"sourceBranch\":\"master\",\"targetBranchesFromLabels\":[\"7.x\"],\"sha\":\"f9804057c85a0357698fa8ef708d14cdbd6342f0\",\"formattedMessage\":\"TypeScript project references for APM (#90049)\",\"originalMessage\":\"TypeScript project references for APM (#90049)\\n\\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>\\r\\nCo-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>\",\"pullNumber\":90049,\"existingTargetPullRequests\":[]}] to 7.x"}

Backporting to 7.x:
{"level":"info","message":"Backporting via filesystem"}
{"meta":{"killed":false,"code":1,"signal":null,"cmd":"git cherry-pick f9804057c85a0357698fa8ef708d14cdbd6342f0","stdout":"Auto-merging x-pack/plugins/apm/server/lib/transaction_groups/fetcher.ts\nAuto-merging x-pack/plugins/apm/server/lib/traces/get_trace_items.ts\nAuto-merging x-pack/plugins/apm/server/lib/services/get_service_metadata_icons.ts\nAuto-merging x-pack/plugins/apm/server/lib/services/get_service_metadata_details.ts\nAuto-merging x-pack/plugins/apm/server/lib/index_pattern/get_dynamic_index_pattern.ts\nAuto-merging x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/index.ts\nCONFLICT (content): Merge conflict in x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/index.ts\nRemoving x-pack/plugins/apm/scripts/tsconfig.json\n","stderr":"error: could not apply f9804057c85... TypeScript project references for APM (#90049)\nhint: after resolving the conflicts, mark the corrected paths\nhint: with 'git add <paths>' or 'git rm <paths>'\nhint: and commit the result with 'git commit'\n"},"level":"info","message":"exec error 'git cherry-pick f9804057c85a0357698fa8ef708d14cdbd6342f0':"}
{"meta":{"killed":false,"code":2,"signal":null,"cmd":"git --no-pager diff --check","stdout":"x-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/index.ts:42: leftover conflict marker\nx-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/index.ts:49: leftover conflict marker\nx-pack/plugins/apm/server/lib/helpers/create_es_client/create_apm_event_client/index.ts:54: leftover conflict marker\n","stderr":""},"level":"info","message":"exec error 'git --no-pager diff --check':"}
Commit could not be cherrypicked due to conflicts

spalger added a commit to spalger/kibana that referenced this pull request Feb 13, 2021
dgieselaar added a commit to dgieselaar/kibana that referenced this pull request Feb 14, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
dgieselaar added a commit that referenced this pull request Feb 15, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>

Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Migrate Kibana plugins (that depend on APM) to TS project references
7 participants