* [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>
* adds missing buildRuleMessage to debug logs to display rule id, name, etc. in logs
* add buildRuleMessage fn to params
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* df exploration page: handle default isTraining filter in url
* default training query updated to match what the searchBar would produce. fixes evaluate panel dataset label
* clear defaultIsTraining filter from url once applied
* Add KibanaLogic store/mount
* Update usage of setBreadcrumbs/setDocTitle to KibanaLogic
* Update usage of Kibana config context to KibanaLogic
* Update usage of navigateToUrl context to KibanaLogic
* 🔥 Remove unused shallow_usecontext mocks, repurpose file to shallow_useeffect
- The file is now no longer used to mock useContext, only unseEffect, hence the rename
* 🔥 Delete/repurpose mount with context helpers
- Remove mountWithKibanaContext completely
- Change mountWithContext to mountWithIntl, since that's the only context remaining, and move it to its own file
- Change mountWithAsyncContext to just mountAsync and move it to its own file
+ add an option to pair it w/ mountWithIntl for formatted date/number support
* 🔥 Delete KibanaContext and mockKibanaContext
+ minor newline linting/grouping tweaks
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Working on package update functionality
* Correctly installing package
* Moving upgrade component and working upgrade
* Doing permissions check
* Cleaning up imports
* Adding bulk upgrade api
* Addressing comments
* Removing todo
* Changing body field
* Adding helper for getting the bulk install route
* Adding request spec
* Using bulk install endpoint from ingest
* Moving component to a hook
* Addressing feedback
* Add deprecation message to coordinate map and region map
* clean up text
* add default distro link and view in maps link
* move url generation into onClick handler
* create tile map layer descritor
* set metrics and color and scaling
* lazy load createTileMapLayerDescriptor
* tslint fixes
* tslint cleanup for OSS code
* add region map deprecation message
* tslint cleanup
* consolidate logic into LegacyMapDeprecationMessage
* fix jest test
* fix tile-map and region_map in OSS distro
* tslint fixes
* assert urlGenerator exists
* update message text
* ensure legacy-ids get correctly evaluated (#37)
* handle 6.x region map saved objects
* turn off field meta
* fix type
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Thomas Neirynck <thomas@elastic.co>