-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Agent Builder] Setup doclinks structure #235804
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
[Agent Builder] Setup doclinks structure #235804
Conversation
| readonly datasetQuality: { | ||
| readonly failureStore: string; | ||
| }; | ||
| readonly onechat: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: agentBuilder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahhhhh man
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should change this? We still have Onechat references in code all the way through the onechat/ folder? Just wondering if we should change individual things atm or whether at some point we should do a pass and change everything onechat --> agent builder? @joemcelroy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say let's just worry about the new references for now. We'll purge onechat later on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good. I've updated the references and I've added all the links.
So, let's get this one merged in, then you can get it into your PR and consume the url's, wdyt @zacharyparikh ?
4d529e2 to
2c5c9c8
Compare
|
not sure why using |
7ac706e to
3c38cec
Compare
|
good feedback and spot! Updated 😄 |
|
CI failing because of bundle size @joemcelroy Should we up the limit again here? |
b316497 to
3ae55b1
Compare
3ae55b1 to
d815acc
Compare
jbudz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/kbn-optimizer/limits.yml LGTM
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
/ci |
1 similar comment
|
/ci |
|
Failing test is being skipped now |
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
|
Closes #235079 Lazily instantiate core mocks, to relieve memory pressure. This has the benefit of tests using less memory usage, and thus us being able to run them in parallel without upsizing our CI workers, and CPU time spent on garbage collection goes down. Here's how it affects one of the alerting plugin test files, significant improvements across the board: ```stdout Benchmark diff: cwd -> f69f92 cwd: [Jest] Lazily instantiate mocks f69f92: [Agent Builder] Setup doclinks structure (#235804) alerting-plugin-test - cwd f69f92 Δ CI Duration 6.3s ±1.7% 7.0s ±1.8% 711ms (+11.3%) 95%, +7.9%–+14.8% CPU Usage 6.5s ±2.0% 7.4s ±2.1% 852ms (+13.1%) 95%, +9.1%–+17.2% Max RSS 857.90 MB ±1.3% 977.20 MB ±2.4% 119.30 MB (+13.9%) 95%, +10.3%–+17.6% GC time 190ms ±4.4% 252ms ±3.4% 62ms (+32.6%) 95%, +23.8%–+42.0% ``` ### How it works Core mocks are instantiated using `lazyObject`. This is a helper utility that will be rewritten using a Babel plugin to create annotated getters that will only instantiate the mock when it is accessed. ### Why it helps Core mocks are eagerly created, and this means that many objects will be allocated. Specifically, jest will keep mocks in a global registry to support `jest.clearAllMocks()`. This means only when a test file completes these functions will be garbage collected. Increased memory consumption has two consequences that are relevant in this context: - they increase memory pressure, which means garbage collection has to run more frequently to prevent the process from running out of memory - our CI workers (that run Jest tests) have 16gb of memory. running jest configs in parallel means that there currently is a risk that either the processes themselves run out of memory, or the agent will. if we reduce memory usage, we can run them in parallel. --------- Co-authored-by: kibanamachine <[email protected]>
Closes elastic#235079 Lazily instantiate core mocks, to relieve memory pressure. This has the benefit of tests using less memory usage, and thus us being able to run them in parallel without upsizing our CI workers, and CPU time spent on garbage collection goes down. Here's how it affects one of the alerting plugin test files, significant improvements across the board: ```stdout Benchmark diff: cwd -> f69f92 cwd: [Jest] Lazily instantiate mocks f69f92: [Agent Builder] Setup doclinks structure (elastic#235804) alerting-plugin-test - cwd f69f92 Δ CI Duration 6.3s ±1.7% 7.0s ±1.8% 711ms (+11.3%) 95%, +7.9%–+14.8% CPU Usage 6.5s ±2.0% 7.4s ±2.1% 852ms (+13.1%) 95%, +9.1%–+17.2% Max RSS 857.90 MB ±1.3% 977.20 MB ±2.4% 119.30 MB (+13.9%) 95%, +10.3%–+17.6% GC time 190ms ±4.4% 252ms ±3.4% 62ms (+32.6%) 95%, +23.8%–+42.0% ``` ### How it works Core mocks are instantiated using `lazyObject`. This is a helper utility that will be rewritten using a Babel plugin to create annotated getters that will only instantiate the mock when it is accessed. ### Why it helps Core mocks are eagerly created, and this means that many objects will be allocated. Specifically, jest will keep mocks in a global registry to support `jest.clearAllMocks()`. This means only when a test file completes these functions will be garbage collected. Increased memory consumption has two consequences that are relevant in this context: - they increase memory pressure, which means garbage collection has to run more frequently to prevent the process from running out of memory - our CI workers (that run Jest tests) have 16gb of memory. running jest configs in parallel means that there currently is a risk that either the processes themselves run out of memory, or the agent will. if we reduce memory usage, we can run them in parallel. --------- Co-authored-by: kibanamachine <[email protected]>
Closes #235079 Lazily instantiate core mocks, to relieve memory pressure. This has the benefit of tests using less memory usage, and thus us being able to run them in parallel without upsizing our CI workers, and CPU time spent on garbage collection goes down. Here's how it affects one of the alerting plugin test files, significant improvements across the board: ```stdout Benchmark diff: cwd -> f69f92 cwd: [Jest] Lazily instantiate mocks f69f92: [Agent Builder] Setup doclinks structure (#235804) alerting-plugin-test - cwd f69f92 Δ CI Duration 6.3s ±1.7% 7.0s ±1.8% 711ms (+11.3%) 95%, +7.9%–+14.8% CPU Usage 6.5s ±2.0% 7.4s ±2.1% 852ms (+13.1%) 95%, +9.1%–+17.2% Max RSS 857.90 MB ±1.3% 977.20 MB ±2.4% 119.30 MB (+13.9%) 95%, +10.3%–+17.6% GC time 190ms ±4.4% 252ms ±3.4% 62ms (+32.6%) 95%, +23.8%–+42.0% ``` ### How it works Core mocks are instantiated using `lazyObject`. This is a helper utility that will be rewritten using a Babel plugin to create annotated getters that will only instantiate the mock when it is accessed. ### Why it helps Core mocks are eagerly created, and this means that many objects will be allocated. Specifically, jest will keep mocks in a global registry to support `jest.clearAllMocks()`. This means only when a test file completes these functions will be garbage collected. Increased memory consumption has two consequences that are relevant in this context: - they increase memory pressure, which means garbage collection has to run more frequently to prevent the process from running out of memory - our CI workers (that run Jest tests) have 16gb of memory. running jest configs in parallel means that there currently is a risk that either the processes themselves run out of memory, or the agent will. if we reduce memory usage, we can run them in parallel. --------- Co-authored-by: kibanamachine <[email protected]>
Closes elastic#235079 Lazily instantiate core mocks, to relieve memory pressure. This has the benefit of tests using less memory usage, and thus us being able to run them in parallel without upsizing our CI workers, and CPU time spent on garbage collection goes down. Here's how it affects one of the alerting plugin test files, significant improvements across the board: ```stdout Benchmark diff: cwd -> f69f92 cwd: [Jest] Lazily instantiate mocks f69f92: [Agent Builder] Setup doclinks structure (elastic#235804) alerting-plugin-test - cwd f69f92 Δ CI Duration 6.3s ±1.7% 7.0s ±1.8% 711ms (+11.3%) 95%, +7.9%–+14.8% CPU Usage 6.5s ±2.0% 7.4s ±2.1% 852ms (+13.1%) 95%, +9.1%–+17.2% Max RSS 857.90 MB ±1.3% 977.20 MB ±2.4% 119.30 MB (+13.9%) 95%, +10.3%–+17.6% GC time 190ms ±4.4% 252ms ±3.4% 62ms (+32.6%) 95%, +23.8%–+42.0% ``` ### How it works Core mocks are instantiated using `lazyObject`. This is a helper utility that will be rewritten using a Babel plugin to create annotated getters that will only instantiate the mock when it is accessed. ### Why it helps Core mocks are eagerly created, and this means that many objects will be allocated. Specifically, jest will keep mocks in a global registry to support `jest.clearAllMocks()`. This means only when a test file completes these functions will be garbage collected. Increased memory consumption has two consequences that are relevant in this context: - they increase memory pressure, which means garbage collection has to run more frequently to prevent the process from running out of memory - our CI workers (that run Jest tests) have 16gb of memory. running jest configs in parallel means that there currently is a risk that either the processes themselves run out of memory, or the agent will. if we reduce memory usage, we can run them in parallel. --------- Co-authored-by: kibanamachine <[email protected]>
Summary
Adds doclinks for the onechat app, relates to https://github.com/elastic/search-team/issues/11083