* telemetry
* [Vega] Add vega maps statistics to usage collector
Closes: #78269
* add tests
* ignore sample data visualizations
* fix PR comment
* get default vega vis from home plugin
* match_phrase doesn't work for full text search
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Prevent multiple call to backend from UI
- Prevent multiple calls to backend from UI on updating the filters
* Committing the fix
- Watch only for the combined change in typesFilter and actionTypesFilter
* UseEffect on string of typeFilter and actionTypeFilter
- We are only concerned about the values of the two
props and not whether the object references change.
In other words, two separate empty arrays should be
same for us.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* When the user views related events for a node, fetch them from the server.
* In code related to showing event, filtered by category, for a given node: changed variable and function names from `eventType` to `eventCategory` to better present the actual behavior.
* In the query string value that holds the panel parameters: changed `eventType` to `eventCategory` to better represent the value.
* DRY out createHref helper
- that navigateToUrl will shortly also use
+ fix mockHistory type complaint
* KibanaLogic: Update navigateToUrl to use createHref helper
+ add param.history value, since we're technically supposed to be using Kibana's passed history over anything from useHistory
* Update breadcrumbs & eui link helpers w/ new KibanaLogic changes
- navigateToUrl is now double-dipping createHref, so we update it to not do so
- remove useHistory in favor of grabbing history from KibanaLogic
* [Optional?] Update FlashMessages to grab history from KibanaLogic
- since we're now storing it there, we might as well grab it as well instead of passing in props?
* [Misc] Fix failing tests due to react router mock
* [Security Solution][Resolver]Add test subj to crumb
* J Buttner review: camel case name
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* 78024: move transform out of dataset
* Change index prefix
* 78024: fix tests, remove vestiges
* 78024: remove index defined in the transform when transform is removed.
* 78024: clean up
* 78024: fix build
* 78024: add comment
* 78024: remove test I added
* 78024: more removal, will add in next PR
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* improves 'Creates and activates a new custom rule' test
* fixes constant problem
* improves 'Creates and activates a new custom rule with override option' test
* improves 'Creates and activates a new threshold rule' test
* refactor
* fixes type check issue
* improves assertions
* removes unused code
* changes variables for constants
* improves 'waitForTheRuleToBeExecuted' test
* improves readability
* fixes jenkins error
* refactor
* refactor
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [TSVB] Different field format on different series is ignored
Closes#74951
* Replace formatter of Y axis with simple value instead of formatter of the first series
* Add a condition to Y-axis tickFormatter to display formatted value if there's only one series
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* RFC: Improve saved object migrations
* Added rolling upgrades as alternative
* Clarify advantage of re-using index for avoiding max shards open errors
* Add more detail about how dry run migrations and invalid document exports will be exposed to users
* Add separate section to highlight assumptions and tradeoffs
* Apply nits from code review
Co-authored-by: Josh Dover <me@joshdover.com>
* Move 'Single node migrations coordinated through a lease/lock' under alternatives
* Fix 5.2.2 document lock algorithm step 3.2
* Minor clarificiations
* Minimizing data loss with mixed Kibana versions: move 7.x algorithm into alternatives and clarify 8.x algorithm
* Adds impact idempotent restrictions have on upcoming/requested migration features
* nit: clarify 4.3.1.2.3
Clarify that if documents already exist, they aren't overwritten.
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
* Update 4.5.2: we need only one version-specific alias, not separate read/write aliases
* Add 4.0.4 the assumption that a saved object type will only ever be registered by one plugin
* Updates 4.3.1.2: Adds mappings compatibility check, adds soft deletes to prevent lost deletes, add note about data loss with mixed plugins on the same kibana version
* Don't try to minimize data loss for unsupported configurations, update index mappings during 8.x migration
- Move "4.5.2 Minimizing data loss with mixed Kibana versions (9.0)" to
alternatives section. Expand this section with a more detailed algorithm as
well as enumerating some data loss scenarios that could still occur.
- Add the supported upgrade procedure which guarantees no undetected data loss.
- Update "4.5.1 Migration algorithm (8.0)"
- Added a step to update index mappings
- If there's update version mismatch errors, complete all batches before
restarting the migration to improve performance.
* Flesh out upgrade and rollback procedure with gracefull shutdown
* New migration algorithm, upgrade procedure based on index cloning and new ES features
* Minor: clarify that index cloning algorithm solves (2.6) but (2.7) is out of scope
* Move 'Tag objects as invalid if their transformation fails' to the alternatives section
* Don't migrate when there's orphan documents so that rollback is always possible. Updates: 4.2.1.2 Migration algorithm: Cloned index per version & 4.2.1.4 Handling documents that belong to a disabled plugin
* Link to new Elasticsearch features required for the implementation
* 4.2.1.2 Clarify the purpose of the target index postfix
* Add open questions around mappings growing over time. Fix rollback index example
* minor: fix formatting
* Update assumptions and tradeoffs to match latest algorithm
* Review feedback
- Remove 4.0.2 since the latest algorithm resolves the tradeoff
- 4.2.1.2 should handle v6 `.kibana` indexes
* More alternatives for 4.2.1.4 Handling documents that belong to a disabled plugin. Don't introduce breaking changes in 7.x
* Handle new ES cluster without any indices. Fix clone API parameters
* Update 4.2.1.2: transform outdated documents on every startup, only fail for unknown types in 8.x
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
* Change progress bar to spinner
* Add progress bar option for full screen mode
* Update snapshots for router test
* Update snapshots for loading indicator test
* Update header snapshot
* Change progress bar position to fix full screen
* [QA][Code Coverage] Coverage teams lookup
* Fix test per cr.
* Drop unused fn's.
* Add integration test to prove that the sys does indeed
strip the CC prefix and still walks the fs.
* Cleanup "todo" list.
* Use import, like Dima's previous suggestion.
* Add coverage teams only definitions to CODEOWNERS per Lee.
* Add coverage teams for logstash, reporting and security.
* Update description.
* Update names per Lee.
* Drop mutation.
* Fix dupes.
* Add the file check, per Dima
* Add more teams
* Update regex to only match on "build/" and add test.
* More teams
* More teams
* Add print statement of the canonical timestamp,
so we can lookup stuff in gcp during errors.
* CR fixups
During development of https://github.com/elastic/kibana/pull/75553,
some issues came up with the optimistic concurrency control (OCC) we
were using internally within the alertsClient, via the `version`
option/property of the saved object. The referenced PR updates new
fields in the alert from the taskManager task after the alertType
executor runs. In some alertsClient methods, OCC is used to update
the alert which are requested via user requests. And so in some
cases, version conflict errors were coming up when the alert was
updated by task manager, in the middle of one of these methods. Note:
the SIEM function test cases stress test this REALLY well.
In this PR, we wrap all the methods using OCC with a function that
will retry them, a short number of times, with a short delay in
between. If the original method STILL has a conflict error, it
will get thrown after the retry limit. In practice, this eliminated
the version conflict calls that were occurring with the SIEM tests,
once we started updating the saved object in the executor.
For cases where we know only attributes not contributing to AAD are
being updated, a new function is provided that does a partial update
on just those attributes, making partial updates for those attributes
a bit safer. That will be also used by PR #75553.
* Adding bulk upgrade api
* Addressing comments
* Removing todo
* Changing body field
* Adding helper for getting the bulk install route
* Adding request spec
* Pulling in Johns changes
* Removing test for same package upgraded multiple times
* Adding upgrade to setup route
* Adding setup integration test
* Clean up error handling
* Beginning to add tests
* Failing jest mock tests
* Break up tests & modules for easier testing.
Deal with issue described in https://github.com/facebook/jest/issues/1075#issuecomment-221771095
epm/packages/install has functions a, b, c which are independent but a can also call b and c
function a() {
b();
c();
}
The linked FB issue describes the cause and rationale (Jest works on "module" boundary) but TL;DR: it's easier if you split up your files
Some related links I found during this journey
* https://medium.com/@qjli/how-to-mock-specific-module-function-in-jest-715e39a391f4
* https://stackoverflow.com/questions/52650367/jestjs-how-to-test-function-being-called-inside-another-function
* https://stackoverflow.com/questions/50854440/spying-on-an-imported-function-that-calls-another-function-in-jest/50855968#50855968
* Add test confirming update error result will throw
* Keep orig error. Add status code in http handler
* Leave error as-is
* Removing accidental code changes. File rename.
* Missed a function when moving to a new file
* Add missing type imports
* Lift .map lambda into named outer function
* Adding additional test
* Fixing type error
Co-authored-by: John Schulz <john.schulz@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>