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

Synthrace workers and refactoring #1

Conversation

Mpdreamz
Copy link
Owner

@Mpdreamz Mpdreamz commented Mar 4, 2022

Refactor DSL

  • Naming change from being span based to entity based. E.g SpanIterable => EntityIterable
  • concat two streams together is now done through merge the resulting iterable round robins over all the streams it holds weighted by rate per minute (more on that later)
  • randomize() on Interval allows you to quickly create intervals with variable yields.
  • Included unit tests for the DSL behavior, ratePerMinute as well as weighted merging of entity generators.

Rate per minute estimates.

Both Interval and EntityIterable implementations can now report an estimated event rate per minute. This is used in various places but most notably to estimate the range needed to satisfy --maxDocs. It's also used to ensure the segmentation over workers is sufficient.

CLI improvements

  • The return of the workers, this reintroduces workers to the CLI. Thanks to the ratePerMinute() estimates you can now target any scenario and the tool will automatically select an appropriate overal range, worker ranges + concurrency settings.
  • Improves reporting e.g it now provides visual progress updates every Math.min(2000000, maxDocs /20) documents.
    • A summary for each worker is now printed at the end of the run as well.
  • Introduces --local flag
    • For local development purposes this discovers both Elasticsearch and Kibana (with current basePath).
  • An explicit --kibana flag also exists to accompay --target
  • Will automatically install the appropriate APM integration package if either --kibana or --local are used.
    • When using --cloudId we still use our own migrate API to move over.
  • Adds a --gcpRepository flag this is to aid with restoring data or snapshotting a large local dataset to share with others. See also Extend yarn es: plugin support + adding secure files to es keystore elastic/kibana#126938
  • Added a --maxDocConfidence parameter, ratePerMinute works by peeking the first document of a stream. If your traces are more variable then that you can amplify/dampen the estimates using this parameter.
  • --dryRun will simply iterate over the StreamProcessor, useful to debug processor performance.
  • The tool now assumes datastreams, you have to set --forceLegacyIndices to revert to old writeTargets behavior.
  • The CLI now also discovers the running Elasticsearch version and makes sure the documents StreamProcessor yields have an equivalent observer.version so that APM's pipeline processors accept the source documents.

@Mpdreamz Mpdreamz force-pushed the feature/synthtrace-stream-processing-improvements-workers branch from 8d30692 to 5c4f064 Compare March 8, 2022 09:51
darnautov and others added 29 commits April 1, 2022 09:48
…y select (elastic#128915)

* Remove deprecated and unused attribute

* Do not accept attachments as part of allcaseslist component props

* Attach attachment in the hook

* Add tests for useCasesAddToExistingCaseModal postComment hook

* remove comment

* Add tests for postcomment hook

* Update tests for useCasesAddToExistingCaseModal hook

* Add tests for toast messages in the postComment hook

* Additional toast error validation

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…n rule is running (elastic#129151)

* Excluding execute-start events from exec log

* Fixing checks

* Adding functional tests
…ault' (elastic#128829)

* Enterprise Search causes local failure

* convert the rest of the tests using the es_archive

* add another kbn_archive for custom space saved objects

* This test needed a doc from the es_archive
There appears to be a brief moment after kibana starts where we are
listening for http connections but immediately closing requests to the
status API.  The return code by ansible here is -1, so this adds that as
a valid response to retry.
…build (elastic#128803)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…execution (elastic#128891)

* Adding telemetry for number of scheduled actions

* Adding percentile by type types

* Parsing percentiles by rule type and adding tests

* Adding functional tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Security Solution] Changed landing page navigation

* made all landings big

* removed getting started from the main left menu; centered empty page content for security template

* fixed linting rules

* fixed linting rules

* fixed tests

* fixed tests

* fixed tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…28277)

* [SharedUX] Migrate PageTemplate > SolutionNavAvatar

* [SharedUX] Migrate PageTemplate > NoDataPage > ActionCards

* [SharedUX] Migrate PageTemplate > NoDataPage > SolutionNav

* Updating snapshot

* Fix i18n

* Fix index.tsx

* Fix failing test

* Remove unnecessary export

* Change folder structure of solution_nav_avatar

* [SharedUX] Migrate PageTemplate > NoDataPage > ActionCards

* [SharedUX] Migrate PageTemplate > NoDataPage > SolutionNav

* Updating snapshot

* Fix index.tsx

* Fix failing test

* Remove unnecessary export

* Fix comment

* Renaming component

* Fix folder structure

* Fix storybook

* Style fix

* Fix SolutionAvatar reference

* Fix failing test

* Fix failing snapshot

* Applying PR comments

* Updating failing snapshot

* Extract i18n

* collapsed > isCollapsed

* Applying PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* add error log on details page + snooze

* refresh table in details page

* fix type

* add + fix jest test

* add test for error log

* remove console

* update functional test + delete flaky jest test + fix i18n

* review I

* remove skip

* review II

* remove disable panel

* clean up design

* fix check

* fix types

* Design tweaks to header, status dropdown, mobile

* remove dead code

* jest test

* fix actions layout

* review III

Co-authored-by: Ryan Keairns <contactryank@gmail.com>
The exclamation mark prefix doesn't have any effect in the `files` list.
You instead need to override the matched path later with a different
rule in order to change the behavior.
* Update @elastic/elasticsearch to v8.2.0-canary.2

* fix core violation

* add optional properties to our type

* update generated doc

* add another ts-ignore

* remove unused ts-expect-error

* add ts-expect-error for type typo

* add ts-expect-error infra code

* fix more errors
…age (elastic#129064)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* wip: start refactoring test helpers

* commit using @elastic.co

* Fix more tests

* Finish off refactoring all cits

* Add docs

* Fix linter issues

* Fix ts issues
…on' (elastic#128924)

* Move authentication table, server, and hooks to 'public/common'
* Rename all the things

* Fixing checks

* Removing unnecessary change

* Fixing checks
…ibana console form history. (elastic#127430)

* release_note:fix issue elastic#12053

* removed empty spaces

* [Console] fix pretier errors

* [Console] fixing ci

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [APM] Convert DB statement code box to EuiCode
Closes elastic#76849

* added a target_blank attribute to the link

* added target attribute and removed more code from the db statement
cauemarcondes and others added 24 commits April 12, 2022 11:40
…configuration (elastic#129929)

* fixing env selected

* lets see if it works now

* fixing test
* Add fixtures for 7.17, 8.0, and 8.1

* Compress fixtures
* Add murmur3 type to fields list

To fix elastic#129007 , naive approach.

* Add murmur3 type to fields list

* Add murmur3 type to fields list

* removed translations

* disable field preview

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* change icon

* add specific murmur3 message

* fix test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
…ng calendar event (elastic#130000)

* [ML] Fix Single Metric Viewer chart load if no points during calendar event

* [ML] Type fix
* Grant fleet privileges and capabilities to power user

* Add e2e for integration policy

* Fix selector for Tail-based

* Remove e2e releated to Fleet code

* Decouple tests

* Clean up assertion

* Fix flaky test
* Upgrade EUI to v54.0.0

* [Discover] Remove deprecated closePopover call
- for closeCellPopover ref API

* [Lens] Remove deprecated closePopover call
- for closeCellPopover ref API

* [Security/Timelines] Remove deprecated closePopover call
- for closeCellPopover ref API

* [Security/Timeline] Update Timeline datagrid to accept/pass `visibleCellActions` prop

+ update Security to show 3 visible cell actions

* [APM] Account for removed EUI theme avatar sizes

* Update emotion dependencies to latest

* Remove styles from being rendered in emotion serializer

* Update snapshots affected by emotion serializer `includeStyles: false` change

* Update snapshot changes caused by EuiFormControlLayout changes

* Update snapshot changes caused by EuiAvatar CSS-in-JS conversion

* consolidate yarn.lock

* [Spaces] Fix failing test due to new EuiAvatar emotion wrapper

- which, due to mount() causes .first() to no longer work as expected - targeting .last() instead gets the actual div element which works

* [Security] Fix cell expansion popover actions

- EUI added 2 `.euiPopoverFooter`s for overflowing cell actions, and Security's CSS to hide the first 2 cell actions (replaced by their own custom cell actions) was unintentionally affecting other actions

* Clean up spaces test snapshots

* [Security feedback] Revert 793d208 and hard-code visibleCellActions

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
Co-authored-by: Joe Portner <joseph.portner@elastic.co>
* clean up casecontext

* update snapshot
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…lastic#130042)

* fix: remove the cell actions for agent status

As discussed in elastic#127010, the agent.status should not have hover actions

* chore: use object-lookup instead of array.includes
* chore(NA): upgrades rules_node_js to v5.4.0

* chore(NA): include expunge on bootstrap --force-install
## Summary

Adds API docs for value lists

### Checklist

- [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
…c#128773)

* Fixes wrong text for downgrade license docs link on blocklist.

* Fixes license downgraded banner for blocklist including the docs link

* Updates i18n keys for blocklist to be singular

* Removes unused param name

Co-authored-by: Ashokaditya <1849116+ashokaditya@users.noreply.github.com>
Co-authored-by: kevinlog <kevin.logan@elastic.co>
* Migrated Discover visualize tests to use CCS.

* Fixed.

* Forgot to add the config file to the functional tests command,

* Fixed nits in PR.

* Removed unused references.

* Removed unused references.

* Removed test file that was removed in the merge.

* Added saved_queries test to run when CCS is enabled and put test that wasn't supposed to be removed back.

* Used conditional in index pattern.
…re is a change on cases plugin (elastic#129992)

* when a change is done on the cases plugin, just the cases cypress are executed

* moves attach alert to a case into the cases folder for simplicity
…ments-workers

# Conflicts:
#	packages/elastic-apm-synthtrace/src/index.ts
#	x-pack/plugins/apm/dev_docs/local_setup.md
#	x-pack/plugins/apm/ftr_e2e/cypress/plugins/index.ts
Mpdreamz pushed a commit that referenced this pull request Apr 13, 2022
* UI Polish for Session viewer frame + buttons

* UI Update for Session Viewer + Toolbar

* added Left Borders on Details panel + Fix Details panel button behaviour

* Details Panel UI Polish + PR Comments

* Find results interaction UI Polish, Def/Min/Max width for details panel, Timestamp bug fix

* more conflict fixes

* removed unused variable

* fix for failed checks on buildkite #1

* Addressing PR comments

* PR Comments + Search bar UI bug fix

* pr comments

Co-authored-by: Karl Godard <karl.godard@elastic.co>
Mpdreamz pushed a commit that referenced this pull request Jul 13, 2022
* Initial commit for EUI 57.0.0 upgrade

* Handle i18n changes

* Resolved type errors in DatePicker and Markdown Editor

* Resolve test failures in Jest Test Suite #1. Updated multiple snapshots for euiLink and euiTitle as they have been converted to Emotion

* Resolved failing tests for Jest Suite #2. Updated snapshots for euiHealth, euiAvatar, euiSpacer, euiTitle, and euiLink as they have recently been converted to Emotion

* Resolved failing tests for Jest Suite 3. Updated failing snapshots as EuiSpacer, EuiText, EuiCallout, EuiHorizontalRule, EuiTitle, and EuiLink have been converted to Emotion. Updated the i18n translation snapshots

* Upgrade EUI verion to 58.0.0

* Resolved tests failures from Jest Test Suite 4. Updated snapshots as EuiLink, EuiTitle, EuiHorizontalRule, EuiSpace, and EuiCallout have been converted to Emotion

* Resolved failing test cases for Jest Test Suite 5. Updated snapshots as EuiLoader has been converted to Emotion

* Resolved failing tests in Jest Test Suite 6. Updated snapshots as EuiSpacer, EuiHorizontalRule, Eui Callout, and EuiLink have been converted to Emotion

* Resolved type errors for EuiDatePicker component

* Resolved type error within EuiContextMenu by removing the watchedItemProps prop. It was recently deprecated in EUI PR# 5880 (elastic/eui#5880) as is no longer needed

* Resolved type error within EuiContextMenu by removing the watchedItemProps prop. It was recently deprecated in EUI PR# 5880 (elastic/eui#5880) as is no longer needed

* Resolved type error within EuiContextMenu by removing the watchedItemProps prop. It was recently deprecated in EUI PR# 5880 (elastic/eui#5880) as is no longer needed

* Resolved type errors by updating the popoverPlacement prop for the EuiDatePicket component with new / valid values. A list of values were deprecated and new values were added in EUI PR elastic#5868 (elastic/eui#5868)

* Resolved type error within EuiTabs by removing instances of display: condensed as it is no longer a part of the Amsterdam theme via EUI PR elastic#5868(elastic/eui#5868)

* Remove deprecated `display` prop from EuiTabs

* Deprecate `.eui-textOverflowWrap`

* Deprecate EuiSuggestItem `labelDisplay` prop

* [EuiStepsHorizontal] Replace deprecated `isComplete`/`isSelected` with `status`

* Update last EuiStepsHorizontal `status` migration

- this one was more complex than the previous commit due to existing `status` usage and conditional steps. Some amount of logic was simplified via `completedStep`

* Resolved type error within EuiTabs by removing instances of display: condensed as it is no longer a part of the Amsterdam theme via EUI PR elastic#5868(elastic/eui#5868)

* Resolved failing test cases in Jest Test Suite 5. Updated snapshots as EuiTitle has been converted to Emotion

* Resovlved failing test cases in Jest Test Suite 4. Updated snapshots as EuiTitle and EuiSpacer have been converted to Emotion. Resolved failing tests for EuiLink click simlulations by esuring the test is referencing the correct element.

* Resolved failing test cases in Jest Test Suite 3. Updated snapshots as EuiLink, EuiSpacr, and EuiTItle have been converted to Emotion. Updated various test cases to ensure that the references to EuiLink are correct

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Resolved failing test cases in Jest Test Suite 1. Updated snapshots as EUI text utilities have been converted to Emotion. Updated referenes to EuiLink to ensure test are simulating clicks on the correct elements

* Resolved failing test for Jet Test Suite 2. Updated required snapshots. Updated references to EuiLink to ensure that tests are simulating clicks on the correct elements

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Resolved failing test cases for Jest Test Suite 5. Updated references to EuiLink to ensure tests are targeting the correct element

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Resolved failing test cases across the Jest Test Suites. Updated required snaphots for components recently converted to Emotion. Updated test cases to ensure that tests targeting EuiLink are using the correct element.

* Resolved failing tests from multiple Jest test suites. Updated snapshots for components that have recently been converted to Emotion. Updated tests that reference the EuiLink component to ensure the correct element is being targeted

* Updated the getEuiStepsHorizontal function. Previously, this function used the .euiStepHorizontal-isSelected class (now deprecated) to determine which step was current. The function has been updated to use the status prop.

* Updated Jest integration test snapshots to account for the recent conversion of EuiLoader to Emotion

* Resolved failing tests in Jest suites 2 and 4. Updated required snapshots and references for tests using EuiLink

* Removed a console statement. Extracted a nested turnary operation into its own function.

* Rollback new turnary function and replace it with a simple if/else

* Rollback new turnary function and replace it with a simple if/else

* Rollback new turnary function and replace it with a simple if/else

* Rollback new turnary function and replace it with a simple if/else

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Resolved failing test cases in Jest Suites 3 and 5 by updating required snapshots

* revert doc_viewer_source test and snapshot changes

* Take care of merge conflict in license_checker:

* Reverted .render() change for analytics_no_data_page.component.test.tsx. Restored snapshot

* Reverted .render() change for analytics_no_data_page.component.test.tsx. Restored snapshot

Co-authored-by: Constance Chen <constance.chen@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
@Mpdreamz Mpdreamz closed this Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.