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

Add execution context support for management plugins #128415

Merged

Conversation

alisonelizabeth
Copy link
Contributor

@alisonelizabeth alisonelizabeth commented Mar 23, 2022

Fixes #126802

This PR adds execution context support to the platform deployment management apps.

  • Ingest Pipelines
  • Index Management (Indices, Component Template, Index Template, Data Streams tabs)
  • Snapshot & Restore (Snapshots, Repositories, Policies, Restore tabs)
  • ILM
  • CCR
  • Remote clusters
  • License Management
  • Rollups
  • Watcher
  • Dev Tools (Search Profiler, Console, Painless Lab, Grokdebugger) Implemented via APM execution context - app, page, entitiy id #124996
  • Upgrade Assistant Not applicable, as UA is only enabled in 7.17 and this feature is available in 8.2+

Note: I only added this at the top-level app render, with the exception of Index Management and Snapshot + Restore which has it per tab. If we want, we can be more granular and register each route. I propose the current approach, and modify as needed once we start to analyze the data.

execution_context1

context_2
context3

How to test

Follow the "How to test this PR?" instructions in #124996 (comment).

Navigate to the list of apps above and verify the events have the correct labels.

@alisonelizabeth alisonelizabeth added chore Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes v8.2.0 labels Mar 23, 2022
@alisonelizabeth alisonelizabeth marked this pull request as ready for review March 28, 2022 22:48
@alisonelizabeth alisonelizabeth requested review from a team as code owners March 28, 2022 22:48
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

Comment on lines 32 to 33
import { executionContextServiceMock } from './execution_context/execution_context_service.mock';
export { executionContextServiceMock } from './execution_context/execution_context_service.mock';
Copy link
Contributor

Choose a reason for hiding this comment

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

Outside of the scope of the PR, but would you mind moving the import statement with the others a few lines up 🙏 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 done

Copy link
Member

@sabarasaba sabarasaba 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 working on this @alisonelizabeth, that's a lot of files! Changes lgtm, left a just one suggestion for a snapshot and restore label that looks a bit funny, but no blockers

import { EuiPageContent, EuiPageBody, EuiEmptyPrompt } from '@elastic/eui';

export class App extends Component {
Copy link
Member

Choose a reason for hiding this comment

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

🤘🏼


// Track component loaded
useEffect(() => {
uiMetricService.trackUiMetric(UIM_RESTORE_LIST_LOAD);
}, [uiMetricService]);

useExecutionContext(core.executionContext, {
type: 'application',
page: 'snapshotRestoreRestores',
Copy link
Member

Choose a reason for hiding this comment

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

this one reads a bit funny, what do you think about snapshotRestoreList or snapshotRestoreRestoreList 🤔

Copy link
Contributor Author

@alisonelizabeth alisonelizabeth Mar 29, 2022

Choose a reason for hiding this comment

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

What do you think about snapshotRestoreRestoreTab? I think I originally had snapshotRestoreRestoreList, but changed it since it actually covers any requests within the tab (not just the list view).

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I think snapshotRestoreRestoreTab sounds a lot better!

@kibana-ci
Copy link
Collaborator

💚 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
crossClusterReplication 163.1KB 163.3KB +227.0B
indexLifecycleManagement 148.2KB 148.4KB +155.0B
indexManagement 514.8KB 515.5KB +759.0B
ingestPipelines 451.4KB 451.6KB +116.0B
licenseManagement 61.1KB 61.2KB +67.0B
remoteClusters 83.3KB 83.5KB +182.0B
rollup 128.9KB 129.1KB +174.0B
snapshotRestore 258.3KB 258.8KB +488.0B
watcher 272.5KB 272.6KB +86.0B
total +2.2KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
crossClusterReplication 11.9KB 11.9KB +38.0B
indexLifecycleManagement 27.0KB 27.1KB +21.0B
ingestPipelines 13.4KB 13.5KB +54.0B
remoteClusters 7.8KB 7.8KB +38.0B
snapshotRestore 26.6KB 26.7KB +54.0B
watcher 13.6KB 13.6KB +38.0B
total +243.0B
Unknown metric groups

ESLint disabled in files

id before after diff
indexManagement 5 4 -1

Total ESLint disabled count

id before after diff
indexManagement 20 19 -1

History

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

Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

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

This is excellent - Thank you!
Once merged, all date in APM and Fullstory should be labeled with these page names - I'm sure this will really help understanding the workflows!

@alisonelizabeth alisonelizabeth merged commit b00ca41 into elastic:main Mar 31, 2022
@alisonelizabeth alisonelizabeth deleted the management_execution_context branch March 31, 2022 12:40
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Apr 4, 2022
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 128415 or prevent reminders by adding the backport:skip label.

@kibanamachine kibanamachine added backport:skip This commit does not require backporting and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting chore release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Propagate excution context from Management
7 participants