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

[Cases] RBAC on UI #99478

Merged
merged 18 commits into from
May 14, 2021
Merged

[Cases] RBAC on UI #99478

merged 18 commits into from
May 14, 2021

Conversation

cnasikas
Copy link
Member

@cnasikas cnasikas commented May 6, 2021

Summary

Resolves: #95470

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@cnasikas cnasikas added v7.8.0 Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v7.14.0 Theme: rac label obsolete Feature:Cases-RAC-RBAC labels May 6, 2021
@cnasikas cnasikas self-assigned this May 6, 2021
@cnasikas cnasikas changed the base branch from master to cases-rbac-poc May 6, 2021 14:09
@cnasikas cnasikas force-pushed the ui_rbac branch 4 times, most recently from e7f8d5b to a0deaa3 Compare May 11, 2021 17:46
@cnasikas cnasikas marked this pull request as ready for review May 12, 2021 11:03
@cnasikas cnasikas requested a review from a team as a code owner May 12, 2021 11:03
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

Copy link
Contributor

@jonathan-buttner jonathan-buttner left a comment

Choose a reason for hiding this comment

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

Mostly just nit stuff, I'll defer to @michaelolo24 for the context stuff as I'm not as familiar. Looks good to me though.

x-pack/plugins/cases/public/common/mock/test_providers.tsx Outdated Show resolved Hide resolved
@@ -74,7 +76,7 @@ const ConfigureCasesComponent: React.FC<ConfigureCasesProps> = ({ userCanCrud })
refetchCaseConfigure,
setConnector,
setClosureType,
} = useCaseConfigure();
} = useCaseConfigure(owner[0]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any chance owner could be empty? Or is it guaranteed to be populated with at least one value as part of the react context?

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right about it. I had that debate with myself. After some thought, I decided to do it as 9fc4772 (#99478). If the array is empty when using the context an error will be thrown.

Copy link
Member Author

Choose a reason for hiding this comment

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

When cases have their own UI then we should reconsider what it means to have an empty owner.

@@ -1,71 +0,0 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this unused code?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is not being used anywhere.

@@ -139,12 +140,18 @@ export interface UseGetCases extends UseGetCasesState {

const empty = {};
export const useGetCases = (
initialQueryParams: Partial<QueryParams> = empty,
initialFilterOptions: Partial<FilterOptions> = empty
params: Partial<{
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Do we need the outer Partial since each parameter is optional already?

Copy link
Member Author

@cnasikas cnasikas May 13, 2021

Choose a reason for hiding this comment

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

I think is needed because we could pass the initialQueryParams argument but with some of the QueryParams fields. For example initialQueryParams: { perPage: 10 }.

Copy link
Contributor

@jonathan-buttner jonathan-buttner May 13, 2021

Choose a reason for hiding this comment

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

Yeah but I think that's already handled by doing this Partial<QueryParams> right?

I think we'd want Partial on the outer one if we had something like:

{
  initialQueryParams: Partial<Blah>;
  initialFilterOptions: Partial<Blah2>;
  b: string;
  c: string;
}

and we want a quick way to make all of the fields in the object optional instead of adding a question mark to each.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh you mean about the outer partial? Yeap, you are right.

@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

@@ -90,7 +94,7 @@ export const AllCasesGeneric = React.memo<AllCasesGenericProps>(
setFilters,
setQueryParams,
setSelectedCases,
} = useGetCases();
} = useGetCases({ initialFilterOptions: { owner } });
Copy link
Member Author

Choose a reason for hiding this comment

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

@jonathan-buttner @michaelolo24 Do you think is best for the useGetCases hook to use useOwnerContext instead of passing it as an argument?

Copy link
Contributor

Choose a reason for hiding this comment

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

If you'll never call useGetCases without the context owner, then I say include it in the actual useGetCases call rather than passing it in, but if for some reason the owner can change from call to call, then pass it. There may be reasons I'm not thinking of, but that's how I work it out in my head

<AllCasesLazy {...props} />
</Suspense>
export const getAllCasesLazy = (props: AllCasesProps & Owner) => (
<OwnerProvider owner={props.owner}>
Copy link
Member Author

@cnasikas cnasikas May 13, 2021

Choose a reason for hiding this comment

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

@michaelolo24 Should the provider be moved inside AllCasesLazy component?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, you can ignore my other question about why the props a typed as ComponentProps & Owner. If you nove them into the components then you can combine the prop types to just ComponentProps. It's really up to you 😄. It's not hurting performance or anything either way, might just be cleaner / easier to reason about when moved in to the component. Whatever you decide to do, just be consistent across all the components 🤷🏾

As an aside, I'm not really sure if the provider is affected by being outside of the <Suspense>? Doubtful, but maybe worth double checking

@@ -47,6 +47,7 @@ const defaultInitial = {
reporters: [],
status: StatusAll,
tags: [],
owner: [],
Copy link
Contributor

Choose a reason for hiding this comment

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

Kind of the same thing here. I figure when you're in a solution, everything listed here, but the owner will actually be modifiable by the user. You can just skip passing it through here and call it directly in the useGetTags and useGetReporters calls

@@ -89,9 +89,17 @@ const CaseParamsFields: React.FunctionComponent<ActionParamsProps<CaseActionPara
actionParams.subAction,
]);

/**
* TODO: When the case connector is enabled we need to figure out
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious. What's the issue here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Case as a connector isn't supported yet (the sub cases feature). I think this TODO is stating that we don't have a configurable way to pass owner to this component yet. Below we're hardcoding it to the security solution but if we support case as a connector in other plugins (observability) we'll need to allow the owner to be passed in like the other case components.

@@ -47,7 +48,8 @@ export const FormContext: React.FC<Props> = ({
onSuccess,
}) => {
const { connectors, loading: isLoadingConnectors } = useConnectors();
const { connector: configurationConnector } = useCaseConfigure();
const owner = useOwnerContext();
const { connector: configurationConnector } = useCaseConfigure(owner[0]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing here about just calling the context in the calls. The same can probably be done for the postCase if it follows the other container architecture

export const useOwnerContext = () => {
const ownerContext = useContext(OwnerContext);

if (ownerContext.length === 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can ownerContext ever be undefined? Doesn't look like it, but just wanted to make sure

Copy link
Member Author

Choose a reason for hiding this comment

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

No, because is initialized as an empty array.

export interface CasesUiStart {
getAllCases: (props: AllCasesProps) => ReactElement<AllCasesProps>;
getAllCases: (props: AllCasesProps & Owner) => ReactElement<AllCasesProps>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not add owner to their actual props?

@@ -22,7 +23,9 @@ describe('useGetTags', () => {

it('init', async () => {
await act(async () => {
const { result, waitForNextUpdate } = renderHook<string, UseGetTags>(() => useGetTags());
const { result, waitForNextUpdate } = renderHook<string, UseGetTags>(() =>
useGetTags([SECURITY_SOLUTION_OWNER])
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that passing owner as an argument makes it much easier to test as you don't have to wrap it in a provider. 🤔

Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

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

Great job with this PR! I tried to answer your questions and generally point out stylistic things. Feel free to make the changes if they make sense to you, but it looks good! Tested locally and didn't get any weird re-renders either 👍🏾

@cnasikas cnasikas merged commit 2d8601b into elastic:cases-rbac-poc May 14, 2021
@cnasikas cnasikas deleted the ui_rbac branch May 14, 2021 13:58
@cnasikas cnasikas mentioned this pull request May 14, 2021
12 tasks
jonathan-buttner added a commit that referenced this pull request Jun 7, 2021
* Adding feature flag for auth

* Hiding SOs and adding consumer field

* First pass at adding security changes

* Consumer as the app's plugin ID

* Create addConsumerToSO migration helper

* Fix mapping's SO consumer

* Add test for CasesActions

* Declare hidden types on SO client

* Restructure integration tests

* Init spaces_only integration tests

* Implementing the cases security string

* Adding security plugin tests for cases

* Rough concept for authorization class

* Adding comments

* Fix merge

* Get requiredPrivileges for classes

* Check privillages

* Ensure that all classes are available

* Success if hasAllRequested is true

* Failure if hasAllRequested is false

* Adding schema updates for feature plugin

* Seperate basic from trial

* Enable SIR on integration tests

* Starting the plumbing for authorization in plugin

* Unit tests working

* Move find route logic to case client

* Create integration test helper functions

* Adding auth to create call

* Create getClassFilter helper

* Add class attribute to find request

* Create getFindAuthorizationFilter

* Ensure savedObject is authorized in find method

* Include fields for authorization

* Combine authorization filter with cases & subcases filter

* Fix isAuthorized flag

* Fix merge issue

* Create/delete spaces & users before and after tests

* Add more user and roles

* [Cases] Convert filters from strings to KueryNode (#95288)

* [Cases] RBAC: Rename class to scope (#95535)

* [Cases][RBAC] Rename scope to owner (#96035)

* [Cases] RBAC: Create & Find integration tests (#95511)

* [Cases] Cases client enchantment (#95923)

* [Cases] Authorization and Client Audit Logger (#95477)

* Starting audit logger

* Finishing auth audit logger

* Fixing tests and types

* Adding audit event creator

* Renaming class to scope

* Adding audit logger messages to create and find

* Adding comments and fixing import issue

* Fixing type errors

* Fixing tests and adding username to message

* Addressing PR feedback

* Removing unneccessary log and generating id

* Fixing module issue and remove expect.anything

* [Cases] Migrate sub cases routes to a client (#96461)

* Adding sub cases client

* Move sub case routes to case client

* Throw when attempting to access the sub cases client

* Fixing throw and removing user ans soclients

* [Cases] RBAC: Migrate routes' unit tests to integration tests (#96374)

Co-authored-by: Jonathan Buttner <[email protected]>

* [Cases] Move remaining HTTP functionality to client (#96507)

* Moving deletes and find for attachments

* Moving rest of comment apis

* Migrating configuration routes to client

* Finished moving routes, starting utils refactor

* Refactoring utilites and fixing integration tests

* Addressing PR feedback

* Fixing mocks and types

* Fixing integration tests

* Renaming status_stats

* Fixing test type errors

* Adding plugins to kibana.json

* Adding cases to required plugin

* [Cases] Refactoring authorization (#97483)

* Refactoring authorization

* Wrapping auth calls in helper for try catch

* Reverting name change

* Hardcoding the saved object types

* Switching ensure to owner array

* [Cases] Add authorization to configuration & cases routes (#97228)

* [Cases] Attachments RBAC (#97756)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Addressing PR comments

* Reducing operations

* [Cases] Add RBAC to remaining Cases APIs (#98762)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Working case update tests

* Addressing PR comments

* Reducing operations

* Working rbac push case tests

* Starting stats apis

* Working status tests

* User action tests and fixing migration errors

* Fixing type errors

* including error in message

* Addressing pr feedback

* Fixing some type errors

* [Cases] Add space only tests (#99409)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* [Cases] Add security only tests (#99679)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* Starting security only tests

* Adding remainder security only tests

* Using helper objects

* Fixing type error for null space

* Renaming utility variables

* Refactoring users and roles for security only tests

* Adding sub feature

* [Cases] Cleaning up the services and TODOs (#99723)

* Cleaning up the service intialization

* Fixing type errors

* Adding comments for the api

* Working test for cases client

* Fix type error

* Adding generated docs

* Adding more docs and cleaning up types

* Cleaning up readme

* More clean up and links

* Changing some file names

* Renaming docs

* Integration tests for cases privs and fixes (#100038)

* [Cases] RBAC on UI (#99478)

Co-authored-by: Kibana Machine <[email protected]>

* Fixing case ids by alert id route call

* [Cases] Fixing UI feature permissions and adding UI tests (#100074)

* Integration tests for cases privs and fixes

* Fixing ui cases permissions and adding tests

* Adding test for collection failure and fixing jest

* Renaming variables

* Fixing type error

* Adding some comments

* Validate cases features

* Fix new schema

* Adding owner param for the status stats

* Fix get case status tests

* Adjusting permissions text and fixing status

* Address PR feedback

* Adding top level feature back

* Fixing feature privileges

* Renaming

* Removing uneeded else

* Fixing tests and adding cases merge tests

* [Cases][Security Solution] Basic license security solution API tests (#100925)

* Cleaning up the fixture plugins

* Adding basic feature test

* renaming to unsecuredSavedObjectsClient (#101215)

* [Cases] RBAC Refactoring audit logging (#100952)

* Refactoring audit logging

* Adding unit tests for authorization classes

* Addressing feedback and adding util tests

* return undefined on empty array

* fixing eslint

* [Cases] Cleaning up RBAC integration tests (#101324)

* Adding tests for space permissions

* Adding tests for testing a disable feature

Co-authored-by: Christos Nasikas <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
jonathan-buttner added a commit to jonathan-buttner/kibana that referenced this pull request Jun 7, 2021
* Adding feature flag for auth

* Hiding SOs and adding consumer field

* First pass at adding security changes

* Consumer as the app's plugin ID

* Create addConsumerToSO migration helper

* Fix mapping's SO consumer

* Add test for CasesActions

* Declare hidden types on SO client

* Restructure integration tests

* Init spaces_only integration tests

* Implementing the cases security string

* Adding security plugin tests for cases

* Rough concept for authorization class

* Adding comments

* Fix merge

* Get requiredPrivileges for classes

* Check privillages

* Ensure that all classes are available

* Success if hasAllRequested is true

* Failure if hasAllRequested is false

* Adding schema updates for feature plugin

* Seperate basic from trial

* Enable SIR on integration tests

* Starting the plumbing for authorization in plugin

* Unit tests working

* Move find route logic to case client

* Create integration test helper functions

* Adding auth to create call

* Create getClassFilter helper

* Add class attribute to find request

* Create getFindAuthorizationFilter

* Ensure savedObject is authorized in find method

* Include fields for authorization

* Combine authorization filter with cases & subcases filter

* Fix isAuthorized flag

* Fix merge issue

* Create/delete spaces & users before and after tests

* Add more user and roles

* [Cases] Convert filters from strings to KueryNode (elastic#95288)

* [Cases] RBAC: Rename class to scope (elastic#95535)

* [Cases][RBAC] Rename scope to owner (elastic#96035)

* [Cases] RBAC: Create & Find integration tests (elastic#95511)

* [Cases] Cases client enchantment (elastic#95923)

* [Cases] Authorization and Client Audit Logger (elastic#95477)

* Starting audit logger

* Finishing auth audit logger

* Fixing tests and types

* Adding audit event creator

* Renaming class to scope

* Adding audit logger messages to create and find

* Adding comments and fixing import issue

* Fixing type errors

* Fixing tests and adding username to message

* Addressing PR feedback

* Removing unneccessary log and generating id

* Fixing module issue and remove expect.anything

* [Cases] Migrate sub cases routes to a client (elastic#96461)

* Adding sub cases client

* Move sub case routes to case client

* Throw when attempting to access the sub cases client

* Fixing throw and removing user ans soclients

* [Cases] RBAC: Migrate routes' unit tests to integration tests (elastic#96374)

Co-authored-by: Jonathan Buttner <[email protected]>

* [Cases] Move remaining HTTP functionality to client (elastic#96507)

* Moving deletes and find for attachments

* Moving rest of comment apis

* Migrating configuration routes to client

* Finished moving routes, starting utils refactor

* Refactoring utilites and fixing integration tests

* Addressing PR feedback

* Fixing mocks and types

* Fixing integration tests

* Renaming status_stats

* Fixing test type errors

* Adding plugins to kibana.json

* Adding cases to required plugin

* [Cases] Refactoring authorization (elastic#97483)

* Refactoring authorization

* Wrapping auth calls in helper for try catch

* Reverting name change

* Hardcoding the saved object types

* Switching ensure to owner array

* [Cases] Add authorization to configuration & cases routes (elastic#97228)

* [Cases] Attachments RBAC (elastic#97756)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Addressing PR comments

* Reducing operations

* [Cases] Add RBAC to remaining Cases APIs (elastic#98762)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Working case update tests

* Addressing PR comments

* Reducing operations

* Working rbac push case tests

* Starting stats apis

* Working status tests

* User action tests and fixing migration errors

* Fixing type errors

* including error in message

* Addressing pr feedback

* Fixing some type errors

* [Cases] Add space only tests (elastic#99409)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* [Cases] Add security only tests (elastic#99679)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* Starting security only tests

* Adding remainder security only tests

* Using helper objects

* Fixing type error for null space

* Renaming utility variables

* Refactoring users and roles for security only tests

* Adding sub feature

* [Cases] Cleaning up the services and TODOs (elastic#99723)

* Cleaning up the service intialization

* Fixing type errors

* Adding comments for the api

* Working test for cases client

* Fix type error

* Adding generated docs

* Adding more docs and cleaning up types

* Cleaning up readme

* More clean up and links

* Changing some file names

* Renaming docs

* Integration tests for cases privs and fixes (elastic#100038)

* [Cases] RBAC on UI (elastic#99478)

Co-authored-by: Kibana Machine <[email protected]>

* Fixing case ids by alert id route call

* [Cases] Fixing UI feature permissions and adding UI tests (elastic#100074)

* Integration tests for cases privs and fixes

* Fixing ui cases permissions and adding tests

* Adding test for collection failure and fixing jest

* Renaming variables

* Fixing type error

* Adding some comments

* Validate cases features

* Fix new schema

* Adding owner param for the status stats

* Fix get case status tests

* Adjusting permissions text and fixing status

* Address PR feedback

* Adding top level feature back

* Fixing feature privileges

* Renaming

* Removing uneeded else

* Fixing tests and adding cases merge tests

* [Cases][Security Solution] Basic license security solution API tests (elastic#100925)

* Cleaning up the fixture plugins

* Adding basic feature test

* renaming to unsecuredSavedObjectsClient (elastic#101215)

* [Cases] RBAC Refactoring audit logging (elastic#100952)

* Refactoring audit logging

* Adding unit tests for authorization classes

* Addressing feedback and adding util tests

* return undefined on empty array

* fixing eslint

* [Cases] Cleaning up RBAC integration tests (elastic#101324)

* Adding tests for space permissions

* Adding tests for testing a disable feature

Co-authored-by: Christos Nasikas <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	x-pack/plugins/cases/server/client/client.ts
#	x-pack/plugins/cases/server/client/mocks.ts
#	x-pack/plugins/cases/server/client/types.ts
#	x-pack/plugins/cases/server/index.ts
#	x-pack/plugins/cases/server/plugin.ts
#	x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts
#	x-pack/plugins/security_solution/server/endpoint/mocks.ts
#	x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.ts
jonathan-buttner added a commit that referenced this pull request Jun 7, 2021
* [Cases] RBAC (#95058)

* Adding feature flag for auth

* Hiding SOs and adding consumer field

* First pass at adding security changes

* Consumer as the app's plugin ID

* Create addConsumerToSO migration helper

* Fix mapping's SO consumer

* Add test for CasesActions

* Declare hidden types on SO client

* Restructure integration tests

* Init spaces_only integration tests

* Implementing the cases security string

* Adding security plugin tests for cases

* Rough concept for authorization class

* Adding comments

* Fix merge

* Get requiredPrivileges for classes

* Check privillages

* Ensure that all classes are available

* Success if hasAllRequested is true

* Failure if hasAllRequested is false

* Adding schema updates for feature plugin

* Seperate basic from trial

* Enable SIR on integration tests

* Starting the plumbing for authorization in plugin

* Unit tests working

* Move find route logic to case client

* Create integration test helper functions

* Adding auth to create call

* Create getClassFilter helper

* Add class attribute to find request

* Create getFindAuthorizationFilter

* Ensure savedObject is authorized in find method

* Include fields for authorization

* Combine authorization filter with cases & subcases filter

* Fix isAuthorized flag

* Fix merge issue

* Create/delete spaces & users before and after tests

* Add more user and roles

* [Cases] Convert filters from strings to KueryNode (#95288)

* [Cases] RBAC: Rename class to scope (#95535)

* [Cases][RBAC] Rename scope to owner (#96035)

* [Cases] RBAC: Create & Find integration tests (#95511)

* [Cases] Cases client enchantment (#95923)

* [Cases] Authorization and Client Audit Logger (#95477)

* Starting audit logger

* Finishing auth audit logger

* Fixing tests and types

* Adding audit event creator

* Renaming class to scope

* Adding audit logger messages to create and find

* Adding comments and fixing import issue

* Fixing type errors

* Fixing tests and adding username to message

* Addressing PR feedback

* Removing unneccessary log and generating id

* Fixing module issue and remove expect.anything

* [Cases] Migrate sub cases routes to a client (#96461)

* Adding sub cases client

* Move sub case routes to case client

* Throw when attempting to access the sub cases client

* Fixing throw and removing user ans soclients

* [Cases] RBAC: Migrate routes' unit tests to integration tests (#96374)

Co-authored-by: Jonathan Buttner <[email protected]>

* [Cases] Move remaining HTTP functionality to client (#96507)

* Moving deletes and find for attachments

* Moving rest of comment apis

* Migrating configuration routes to client

* Finished moving routes, starting utils refactor

* Refactoring utilites and fixing integration tests

* Addressing PR feedback

* Fixing mocks and types

* Fixing integration tests

* Renaming status_stats

* Fixing test type errors

* Adding plugins to kibana.json

* Adding cases to required plugin

* [Cases] Refactoring authorization (#97483)

* Refactoring authorization

* Wrapping auth calls in helper for try catch

* Reverting name change

* Hardcoding the saved object types

* Switching ensure to owner array

* [Cases] Add authorization to configuration & cases routes (#97228)

* [Cases] Attachments RBAC (#97756)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Addressing PR comments

* Reducing operations

* [Cases] Add RBAC to remaining Cases APIs (#98762)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Working case update tests

* Addressing PR comments

* Reducing operations

* Working rbac push case tests

* Starting stats apis

* Working status tests

* User action tests and fixing migration errors

* Fixing type errors

* including error in message

* Addressing pr feedback

* Fixing some type errors

* [Cases] Add space only tests (#99409)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* [Cases] Add security only tests (#99679)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* Starting security only tests

* Adding remainder security only tests

* Using helper objects

* Fixing type error for null space

* Renaming utility variables

* Refactoring users and roles for security only tests

* Adding sub feature

* [Cases] Cleaning up the services and TODOs (#99723)

* Cleaning up the service intialization

* Fixing type errors

* Adding comments for the api

* Working test for cases client

* Fix type error

* Adding generated docs

* Adding more docs and cleaning up types

* Cleaning up readme

* More clean up and links

* Changing some file names

* Renaming docs

* Integration tests for cases privs and fixes (#100038)

* [Cases] RBAC on UI (#99478)

Co-authored-by: Kibana Machine <[email protected]>

* Fixing case ids by alert id route call

* [Cases] Fixing UI feature permissions and adding UI tests (#100074)

* Integration tests for cases privs and fixes

* Fixing ui cases permissions and adding tests

* Adding test for collection failure and fixing jest

* Renaming variables

* Fixing type error

* Adding some comments

* Validate cases features

* Fix new schema

* Adding owner param for the status stats

* Fix get case status tests

* Adjusting permissions text and fixing status

* Address PR feedback

* Adding top level feature back

* Fixing feature privileges

* Renaming

* Removing uneeded else

* Fixing tests and adding cases merge tests

* [Cases][Security Solution] Basic license security solution API tests (#100925)

* Cleaning up the fixture plugins

* Adding basic feature test

* renaming to unsecuredSavedObjectsClient (#101215)

* [Cases] RBAC Refactoring audit logging (#100952)

* Refactoring audit logging

* Adding unit tests for authorization classes

* Addressing feedback and adding util tests

* return undefined on empty array

* fixing eslint

* [Cases] Cleaning up RBAC integration tests (#101324)

* Adding tests for space permissions

* Adding tests for testing a disable feature

Co-authored-by: Christos Nasikas <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	x-pack/plugins/cases/server/client/client.ts
#	x-pack/plugins/cases/server/client/mocks.ts
#	x-pack/plugins/cases/server/client/types.ts
#	x-pack/plugins/cases/server/index.ts
#	x-pack/plugins/cases/server/plugin.ts
#	x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts
#	x-pack/plugins/security_solution/server/endpoint/mocks.ts
#	x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.ts

* Fixing type errors

* Addressing plugin type errors
@kibanamachine
Copy link
Contributor

kibanamachine commented Jun 8, 2021

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / general / task-queue-process-12 / X-Pack Endpoint API Integration Tests.x-pack/test/security_solution_endpoint_api_int/apis/resolver/entity·ts.Endpoint plugin Resolver tests Resolver tests for the entity route winlogbeat tests "before all" hook for "returns a winlogbeat sysmon event when the event matches the schema correctly"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 1 times on tracked branches: https://dryrun

[00:00:00]       │
[00:00:00]         └-: Endpoint plugin
[00:00:00]           └-> "before all" hook in "Endpoint plugin"
[00:00:00]           └-> "before all" hook in "Endpoint plugin"
[00:00:00]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/XztiepPCSdubBrzZ51oQYw] update_mapping [_doc]
[00:00:00]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/XztiepPCSdubBrzZ51oQYw] update_mapping [_doc]
[00:00:01]             │ proc [kibana]   log   [17:59:26.947] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ proc [kibana]   log   [17:59:26.950] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ proc [kibana]   log   [17:59:26.951] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ proc [kibana]   log   [17:59:26.952] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:26 source.ip: 172.17.0.1:41890, url.original: /search?package=system&internal=true&experimental=true
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:26 source.ip: 172.17.0.1:41894, url.original: /search?package=endpoint&internal=true&experimental=true
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:26 source.ip: 172.17.0.1:41896, url.original: /search?package=elastic_agent&internal=true&experimental=true
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:26 source.ip: 172.17.0.1:41892, url.original: /search?package=fleet_server&internal=true&experimental=true
[00:00:01]             │ proc [kibana]   log   [17:59:26.996] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ proc [kibana]   log   [17:59:26.998] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ proc [kibana]   log   [17:59:26.999] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ proc [kibana]   log   [17:59:27.001] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41908, url.original: /search?package=fleet_server&internal=true&experimental=true
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41912, url.original: /search?package=system&internal=true&experimental=true
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41916, url.original: /search?package=elastic_agent&internal=true&experimental=true
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41910, url.original: /search?package=endpoint&internal=true&experimental=true
[00:00:01]             │ proc [kibana]   log   [17:59:27.004] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ proc [kibana]   log   [17:59:27.006] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ proc [kibana]   log   [17:59:27.007] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ proc [kibana]   log   [17:59:27.008] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41920, url.original: /package/fleet_server/0.2.1
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41932, url.original: /package/endpoint/0.18.0
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41928, url.original: /package/elastic_agent/0.0.6
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41930, url.original: /package/system/0.12.0
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41938, url.original: /package/endpoint/0.18.0/
[00:00:01]             │ proc [kibana]   log   [17:59:27.019] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41940, url.original: /package/fleet_server/0.2.1/
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41944, url.original: /package/elastic_agent/0.0.6/
[00:00:01]             │ proc [kibana]   log   [17:59:27.022] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41948, url.original: /epr/fleet_server/fleet_server-0.2.1.zip
[00:00:01]             │ proc [kibana]   log   [17:59:27.024] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41954, url.original: /epr/elastic_agent/elastic_agent-0.0.6.zip
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41960, url.original: /epr/endpoint/endpoint-0.18.0.zip
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41956, url.original: /package/system/0.12.0/
[00:00:01]             │ proc [kibana]   log   [17:59:27.048] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:01]             │ info [docker:registry] 2021/06/08 17:59:27 source.ip: 172.17.0.1:41964, url.original: /epr/system/system-0.12.0.zip
[00:00:03]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/XztiepPCSdubBrzZ51oQYw] update_mapping [_doc]
[00:00:03]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/XztiepPCSdubBrzZ51oQYw] update_mapping [_doc]
[00:00:03]             │ info [o.e.x.i.a.TransportPutLifecycleAction] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index lifecycle policy [.fleet-actions-results]
[00:00:03]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/XztiepPCSdubBrzZ51oQYw] update_mapping [_doc]
[00:00:03]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [.fleet-actions-results] for index patterns [.fleet-actions-results]
[00:00:04]             │ info [o.e.x.i.a.TransportPutLifecycleAction] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index lifecycle policy [logs-endpoint.collection-diagnostic]
[00:00:06]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [metrics-elastic_agent.elastic_agent-mappings]
[00:00:06]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-elastic_agent.elastic_agent] for index patterns [metrics-elastic_agent.elastic_agent-*]
[00:00:06]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-metadata-current] for index patterns [metrics-endpoint.metadata_current_*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-system.auth] for index patterns [logs-system.auth-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.core] for index patterns [metrics-system.core-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.load] for index patterns [metrics-system.load-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.fsstat] for index patterns [metrics-system.fsstat-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.process] for index patterns [metrics-system.process-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.network] for index patterns [metrics-system.network-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.memory] for index patterns [metrics-system.memory-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.process_summary] for index patterns [metrics-system.process_summary-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.filesystem] for index patterns [metrics-system.filesystem-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.diskio] for index patterns [metrics-system.diskio-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-system.application] for index patterns [logs-system.application-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.cpu] for index patterns [metrics-system.cpu-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-system.syslog] for index patterns [logs-system.syslog-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-system.security] for index patterns [logs-system.security-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-system.system] for index patterns [logs-system.system-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.uptime] for index patterns [metrics-system.uptime-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.socket_summary] for index patterns [metrics-system.socket_summary-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.events.process-mappings]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [metrics-endpoint.metrics-mappings]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.alerts-mappings]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.events.registry-mappings]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.events.file-mappings]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [metrics-endpoint.policy-mappings]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [.logs-endpoint.diagnostic.collection-mappings]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.events.library-mappings]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [metrics-endpoint.metadata-mappings]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.events.network-mappings]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.events.security-mappings]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.events.process] for index patterns [logs-endpoint.events.process-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-endpoint.metrics] for index patterns [metrics-endpoint.metrics-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.alerts] for index patterns [logs-endpoint.alerts-*]
[00:00:09]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.events.registry] for index patterns [logs-endpoint.events.registry-*]
[00:00:09]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.events.file] for index patterns [logs-endpoint.events.file-*]
[00:00:09]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-endpoint.policy] for index patterns [metrics-endpoint.policy-*]
[00:00:09]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [.logs-endpoint.diagnostic.collection] for index patterns [.logs-endpoint.diagnostic.collection-*]
[00:00:09]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.events.library] for index patterns [logs-endpoint.events.library-*]
[00:00:09]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-endpoint.metadata] for index patterns [metrics-endpoint.metadata-*]
[00:00:09]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.events.network] for index patterns [logs-endpoint.events.network-*]
[00:00:09]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.events.security] for index patterns [logs-endpoint.events.security-*]
[00:00:10]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.transform-internal-007] creating index, cause [auto(bulk api)], templates [], shards [1]/[1]
[00:00:10]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] updating number_of_replicas to [0] for indices [.transform-internal-007]
[00:00:10]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.transform-internal-007][0]]])." previous.health="YELLOW" reason="shards started [[.transform-internal-007][0]]"
[00:00:10]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.transform-notifications-000002] creating index, cause [auto(bulk api)], templates [.transform-notifications-000002], shards [1]/[1]
[00:00:10]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] updating number_of_replicas to [0] for indices [.transform-notifications-000002]
[00:00:10]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [metrics-endpoint.metadata_current_default] creating index, cause [api], templates [metrics-metadata-current], shards [1]/[1]
[00:00:10]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] updating number_of_replicas to [0] for indices [metrics-endpoint.metadata_current_default]
[00:00:10]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.transform-notifications-000002][0], [metrics-endpoint.metadata_current_default][0]]])." previous.health="YELLOW" reason="shards started [[.transform-notifications-000002][0], [metrics-endpoint.metadata_current_default][0]]"
[00:00:10]             │ info [o.e.x.t.t.TransformTask] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [endpoint.metadata_current-default-0.18.0] updating state for transform to [{"task_state":"started","indexer_state":"stopped","checkpoint":0,"should_stop_at_checkpoint":false}].
[00:00:10]             │ info [o.e.x.t.t.TransformPersistentTasksExecutor] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [endpoint.metadata_current-default-0.18.0] successfully completed and scheduled task in node operation
[00:00:12]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/XztiepPCSdubBrzZ51oQYw] update_mapping [_doc]
[00:00:13]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/XztiepPCSdubBrzZ51oQYw] update_mapping [_doc]
[00:00:14]             │ proc [kibana]   log   [17:59:40.209] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:14]             │ info [docker:registry] 2021/06/08 17:59:40 source.ip: 172.17.0.1:42024, url.original: /search?package=system&internal=true&experimental=true
[00:00:14]             │ proc [kibana]   log   [17:59:40.242] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:14]             │ info [docker:registry] 2021/06/08 17:59:40 source.ip: 172.17.0.1:42028, url.original: /search?package=system&internal=true&experimental=true
[00:00:14]             │ proc [kibana]   log   [17:59:40.254] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:14]             │ info [docker:registry] 2021/06/08 17:59:40 source.ip: 172.17.0.1:42032, url.original: /package/system/0.12.0
[00:00:14]             │ info [docker:registry] 2021/06/08 17:59:40 source.ip: 172.17.0.1:42036, url.original: /package/system/0.12.0/
[00:00:14]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/XztiepPCSdubBrzZ51oQYw] update_mapping [_doc]
[00:00:16]             │ proc [kibana]   log   [17:59:42.265] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:16]             │ info [docker:registry] 2021/06/08 17:59:42 source.ip: 172.17.0.1:42042, url.original: /search?package=fleet_server&internal=true&experimental=true
[00:00:16]             │ proc [kibana]   log   [17:59:42.288] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:16]             │ info [docker:registry] 2021/06/08 17:59:42 source.ip: 172.17.0.1:42046, url.original: /search?package=fleet_server&internal=true&experimental=true
[00:00:16]             │ proc [kibana]   log   [17:59:42.299] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:16]             │ info [docker:registry] 2021/06/08 17:59:42 source.ip: 172.17.0.1:42050, url.original: /package/fleet_server/0.2.1
[00:00:16]             │ info [docker:registry] 2021/06/08 17:59:42 source.ip: 172.17.0.1:42054, url.original: /package/fleet_server/0.2.1/
[00:00:18]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.fleet-enrollment-api-keys-7] creating index, cause [auto(bulk api)], templates [], shards [1]/[1]
[00:00:18]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] updating number_of_replicas to [0] for indices [.fleet-enrollment-api-keys-7]
[00:00:19]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.fleet-enrollment-api-keys-7][0]]])." previous.health="YELLOW" reason="shards started [[.fleet-enrollment-api-keys-7][0]]"
[00:00:20]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.fleet-policies-7] creating index, cause [auto(bulk api)], templates [], shards [1]/[1]
[00:00:20]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] updating number_of_replicas to [0] for indices [.fleet-policies-7]
[00:00:20]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.fleet-policies-7][0]]])." previous.health="YELLOW" reason="shards started [[.fleet-policies-7][0]]"
[00:00:21]           └-: Resolver tests
[00:00:21]             └-> "before all" hook in "Resolver tests"
[00:00:21]             └-: Resolver tests for the entity route
[00:00:21]               └-> "before all" hook in "Resolver tests for the entity route"
[00:00:21]               └-: winlogbeat tests
[00:00:21]                 └-> "before all" hook for "returns a winlogbeat sysmon event when the event matches the schema correctly"
[00:00:21]                 └-> "before all" hook for "returns a winlogbeat sysmon event when the event matches the schema correctly"
[00:00:21]                   │ info [endpoint/resolver/winlogbeat] Loading "mappings.json"
[00:00:21]                   │ info [endpoint/resolver/winlogbeat] Loading "data.json.gz"
[00:00:21]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [winlogbeat-7.11.0-2020.12.03-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:00:21]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="RED" message="Cluster health status changed from [YELLOW] to [RED] (reason: [index [winlogbeat-7.11.0-2020.12.03-000001] created])." previous.health="YELLOW" reason="index [winlogbeat-7.11.0-2020.12.03-000001] created"
[00:00:51]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [winlogbeat-7.11.0-2020.12.03-000001/-eowO7eJQwy03O5Ci514qA] deleting index
[00:00:51]                   │ info [endpoint/resolver/winlogbeat] Deleted existing index "winlogbeat-7.11.0-2020.12.03-000001"
[00:00:51]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [winlogbeat-7.11.0-2020.12.03-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:00:51]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="RED" message="Cluster health status changed from [YELLOW] to [RED] (reason: [index [winlogbeat-7.11.0-2020.12.03-000001] created])." previous.health="YELLOW" reason="index [winlogbeat-7.11.0-2020.12.03-000001] created"
[00:01:21]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [winlogbeat-7.11.0-2020.12.03-000001/wlYdtjV_SKitrXUFQif0fw] deleting index
[00:01:22]                   │ info [endpoint/resolver/winlogbeat] Deleted existing index "winlogbeat-7.11.0-2020.12.03-000001"
[00:01:22]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [winlogbeat-7.11.0-2020.12.03-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:01:22]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="RED" message="Cluster health status changed from [YELLOW] to [RED] (reason: [index [winlogbeat-7.11.0-2020.12.03-000001] created])." previous.health="YELLOW" reason="index [winlogbeat-7.11.0-2020.12.03-000001] created"
[00:01:52]                   └- ✖ fail: Endpoint plugin Resolver tests Resolver tests for the entity route winlogbeat tests "before all" hook for "returns a winlogbeat sysmon event when the event matches the schema correctly"
[00:01:52]                   │      ResponseError: resource_already_exists_exception
[00:01:52]                   │       at onBody (/dev/shm/workspace/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:337:23)
[00:01:52]                   │       at IncomingMessage.onEnd (/dev/shm/workspace/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:264:11)
[00:01:52]                   │       at endReadableNT (internal/streams/readable.js:1327:12)
[00:01:52]                   │       at processTicksAndRejections (internal/process/task_queues.js:80:21)
[00:01:52]                   │ 
[00:01:52]                   │ 

Stack Trace

ResponseError: resource_already_exists_exception
    at onBody (/dev/shm/workspace/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:337:23)
    at IncomingMessage.onEnd (/dev/shm/workspace/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:264:11)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  meta: {
    body: { error: [Object], status: 400 },
    statusCode: 400,
    headers: {
      'x-elastic-product': 'Elasticsearch',
      'content-type': 'application/json;charset=utf-8',
      'content-length': '481'
    },
    meta: {
      context: null,
      request: [Object],
      name: 'elasticsearch-js',
      connection: [Object],
      attempts: 1,
      aborted: false
    }
  }
}

Kibana Pipeline / general / task-queue-process-12 / X-Pack Endpoint API Integration Tests.x-pack/test/security_solution_endpoint_api_int/apis/resolver/entity·ts.Endpoint plugin Resolver tests Resolver tests for the entity route winlogbeat tests "before all" hook for "returns a winlogbeat sysmon event when the event matches the schema correctly"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:00:00]         └-: Endpoint plugin
[00:00:00]           └-> "before all" hook in "Endpoint plugin"
[00:00:00]           └-> "before all" hook in "Endpoint plugin"
[00:00:00]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/nWOnvQpSQCyoxHlsk9yyQw] update_mapping [_doc]
[00:00:00]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/nWOnvQpSQCyoxHlsk9yyQw] update_mapping [_doc]
[00:00:00]             │ proc [kibana]   log   [17:50:51.195] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.198] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.199] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.201] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.263] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.265] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.267] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.269] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.273] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.276] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.278] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.280] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.297] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.306] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.308] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ proc [kibana]   log   [17:50:51.335] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38490, url.original: /search?package=endpoint&internal=true&experimental=true
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38496, url.original: /search?package=fleet_server&internal=true&experimental=true
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38488, url.original: /search?package=system&internal=true&experimental=true
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38492, url.original: /search?package=elastic_agent&internal=true&experimental=true
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38506, url.original: /search?package=system&internal=true&experimental=true
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38512, url.original: /search?package=endpoint&internal=true&experimental=true
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38514, url.original: /search?package=fleet_server&internal=true&experimental=true
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38518, url.original: /search?package=elastic_agent&internal=true&experimental=true
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38530, url.original: /package/system/0.12.0
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38528, url.original: /package/fleet_server/0.2.1
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38526, url.original: /package/endpoint/0.18.0
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38534, url.original: /package/elastic_agent/0.0.6
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38538, url.original: /package/system/0.12.0/
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38546, url.original: /package/fleet_server/0.2.1/
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38542, url.original: /package/endpoint/0.18.0/
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38550, url.original: /package/elastic_agent/0.0.6/
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38554, url.original: /epr/fleet_server/fleet_server-0.2.1.zip
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38562, url.original: /epr/endpoint/endpoint-0.18.0.zip
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38558, url.original: /epr/elastic_agent/elastic_agent-0.0.6.zip
[00:00:00]             │ info [docker:registry] 2021/06/08 17:50:51 source.ip: 172.17.0.1:38566, url.original: /epr/system/system-0.12.0.zip
[00:00:02]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/nWOnvQpSQCyoxHlsk9yyQw] update_mapping [_doc]
[00:00:02]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/nWOnvQpSQCyoxHlsk9yyQw] update_mapping [_doc]
[00:00:02]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/nWOnvQpSQCyoxHlsk9yyQw] update_mapping [_doc]
[00:00:02]             │ info [o.e.x.i.a.TransportPutLifecycleAction] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index lifecycle policy [.fleet-actions-results]
[00:00:02]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [.fleet-actions-results] for index patterns [.fleet-actions-results]
[00:00:03]             │ info [o.e.x.i.a.TransportPutLifecycleAction] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index lifecycle policy [logs-endpoint.collection-diagnostic]
[00:00:05]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [metrics-elastic_agent.elastic_agent-mappings]
[00:00:05]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-elastic_agent.elastic_agent] for index patterns [metrics-elastic_agent.elastic_agent-*]
[00:00:05]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-metadata-current] for index patterns [metrics-endpoint.metadata_current_*]
[00:00:06]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-system.auth] for index patterns [logs-system.auth-*]
[00:00:06]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.filesystem] for index patterns [metrics-system.filesystem-*]
[00:00:06]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.fsstat] for index patterns [metrics-system.fsstat-*]
[00:00:06]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.diskio] for index patterns [metrics-system.diskio-*]
[00:00:06]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-system.security] for index patterns [logs-system.security-*]
[00:00:06]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.core] for index patterns [metrics-system.core-*]
[00:00:06]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.load] for index patterns [metrics-system.load-*]
[00:00:06]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.memory] for index patterns [metrics-system.memory-*]
[00:00:06]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.process_summary] for index patterns [metrics-system.process_summary-*]
[00:00:06]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.network] for index patterns [metrics-system.network-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.process] for index patterns [metrics-system.process-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-system.application] for index patterns [logs-system.application-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.uptime] for index patterns [metrics-system.uptime-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-system.syslog] for index patterns [logs-system.syslog-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.cpu] for index patterns [metrics-system.cpu-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-system.system] for index patterns [logs-system.system-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-system.socket_summary] for index patterns [metrics-system.socket_summary-*]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [.logs-endpoint.diagnostic.collection-mappings]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [metrics-endpoint.policy-mappings]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.events.registry-mappings]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.events.library-mappings]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.events.network-mappings]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.alerts-mappings]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [metrics-endpoint.metadata-mappings]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.events.file-mappings]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.events.security-mappings]
[00:00:07]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [metrics-endpoint.metrics-mappings]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding component template [logs-endpoint.events.process-mappings]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [.logs-endpoint.diagnostic.collection] for index patterns [.logs-endpoint.diagnostic.collection-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-endpoint.policy] for index patterns [metrics-endpoint.policy-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.events.registry] for index patterns [logs-endpoint.events.registry-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.events.library] for index patterns [logs-endpoint.events.library-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.events.network] for index patterns [logs-endpoint.events.network-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.alerts] for index patterns [logs-endpoint.alerts-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-endpoint.metadata] for index patterns [metrics-endpoint.metadata-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.events.file] for index patterns [logs-endpoint.events.file-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.events.security] for index patterns [logs-endpoint.events.security-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [metrics-endpoint.metrics] for index patterns [metrics-endpoint.metrics-*]
[00:00:08]             │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] adding index template [logs-endpoint.events.process] for index patterns [logs-endpoint.events.process-*]
[00:00:09]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.transform-internal-007] creating index, cause [auto(bulk api)], templates [], shards [1]/[1]
[00:00:09]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] updating number_of_replicas to [0] for indices [.transform-internal-007]
[00:00:09]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.transform-internal-007][0]]])." previous.health="YELLOW" reason="shards started [[.transform-internal-007][0]]"
[00:00:09]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.transform-notifications-000002] creating index, cause [auto(bulk api)], templates [.transform-notifications-000002], shards [1]/[1]
[00:00:09]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] updating number_of_replicas to [0] for indices [.transform-notifications-000002]
[00:00:09]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [metrics-endpoint.metadata_current_default] creating index, cause [api], templates [metrics-metadata-current], shards [1]/[1]
[00:00:09]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] updating number_of_replicas to [0] for indices [metrics-endpoint.metadata_current_default]
[00:00:09]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.transform-notifications-000002][0], [metrics-endpoint.metadata_current_default][0]]])." previous.health="YELLOW" reason="shards started [[.transform-notifications-000002][0], [metrics-endpoint.metadata_current_default][0]]"
[00:00:09]             │ info [o.e.x.t.t.TransformTask] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [endpoint.metadata_current-default-0.18.0] updating state for transform to [{"task_state":"started","indexer_state":"stopped","checkpoint":0,"should_stop_at_checkpoint":false}].
[00:00:09]             │ info [o.e.x.t.t.TransformPersistentTasksExecutor] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [endpoint.metadata_current-default-0.18.0] successfully completed and scheduled task in node operation
[00:00:11]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/nWOnvQpSQCyoxHlsk9yyQw] update_mapping [_doc]
[00:00:12]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/nWOnvQpSQCyoxHlsk9yyQw] update_mapping [_doc]
[00:00:13]             │ proc [kibana]   log   [17:51:04.450] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:13]             │ info [docker:registry] 2021/06/08 17:51:04 source.ip: 172.17.0.1:38626, url.original: /search?package=system&internal=true&experimental=true
[00:00:13]             │ proc [kibana]   log   [17:51:04.481] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:13]             │ info [docker:registry] 2021/06/08 17:51:04 source.ip: 172.17.0.1:38630, url.original: /search?package=system&internal=true&experimental=true
[00:00:13]             │ proc [kibana]   log   [17:51:04.493] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:13]             │ info [docker:registry] 2021/06/08 17:51:04 source.ip: 172.17.0.1:38634, url.original: /package/system/0.12.0
[00:00:13]             │ info [docker:registry] 2021/06/08 17:51:04 source.ip: 172.17.0.1:38638, url.original: /package/system/0.12.0/
[00:00:13]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.kibana_8.0.0_001/nWOnvQpSQCyoxHlsk9yyQw] update_mapping [_doc]
[00:00:15]             │ proc [kibana]   log   [17:51:06.490] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:15]             │ info [docker:registry] 2021/06/08 17:51:06 source.ip: 172.17.0.1:38644, url.original: /search?package=fleet_server&internal=true&experimental=true
[00:00:15]             │ proc [kibana]   log   [17:51:06.515] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:15]             │ info [docker:registry] 2021/06/08 17:51:06 source.ip: 172.17.0.1:38650, url.original: /search?package=fleet_server&internal=true&experimental=true
[00:00:15]             │ proc [kibana]   log   [17:51:06.525] [info][fleet][plugins] Custom registry url is an experimental feature and is unsupported.
[00:00:15]             │ info [docker:registry] 2021/06/08 17:51:06 source.ip: 172.17.0.1:38654, url.original: /package/fleet_server/0.2.1
[00:00:15]             │ info [docker:registry] 2021/06/08 17:51:06 source.ip: 172.17.0.1:38658, url.original: /package/fleet_server/0.2.1/
[00:00:18]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.fleet-enrollment-api-keys-7] creating index, cause [auto(bulk api)], templates [], shards [1]/[1]
[00:00:18]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] updating number_of_replicas to [0] for indices [.fleet-enrollment-api-keys-7]
[00:00:18]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.fleet-enrollment-api-keys-7][0]]])." previous.health="YELLOW" reason="shards started [[.fleet-enrollment-api-keys-7][0]]"
[00:00:19]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [.fleet-policies-7] creating index, cause [auto(bulk api)], templates [], shards [1]/[1]
[00:00:19]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] updating number_of_replicas to [0] for indices [.fleet-policies-7]
[00:00:19]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.fleet-policies-7][0]]])." previous.health="YELLOW" reason="shards started [[.fleet-policies-7][0]]"
[00:00:20]           └-: Resolver tests
[00:00:20]             └-> "before all" hook in "Resolver tests"
[00:00:21]             └-: Resolver tests for the entity route
[00:00:21]               └-> "before all" hook in "Resolver tests for the entity route"
[00:00:21]               └-: winlogbeat tests
[00:00:21]                 └-> "before all" hook for "returns a winlogbeat sysmon event when the event matches the schema correctly"
[00:00:21]                 └-> "before all" hook for "returns a winlogbeat sysmon event when the event matches the schema correctly"
[00:00:21]                   │ info [endpoint/resolver/winlogbeat] Loading "mappings.json"
[00:00:21]                   │ info [endpoint/resolver/winlogbeat] Loading "data.json.gz"
[00:00:21]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [winlogbeat-7.11.0-2020.12.03-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:00:21]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="RED" message="Cluster health status changed from [YELLOW] to [RED] (reason: [index [winlogbeat-7.11.0-2020.12.03-000001] created])." previous.health="YELLOW" reason="index [winlogbeat-7.11.0-2020.12.03-000001] created"
[00:00:51]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [winlogbeat-7.11.0-2020.12.03-000001/t8sJH7qGThGkD2HUautWfw] deleting index
[00:00:51]                   │ info [endpoint/resolver/winlogbeat] Deleted existing index "winlogbeat-7.11.0-2020.12.03-000001"
[00:00:51]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [winlogbeat-7.11.0-2020.12.03-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:00:51]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="RED" message="Cluster health status changed from [YELLOW] to [RED] (reason: [index [winlogbeat-7.11.0-2020.12.03-000001] created])." previous.health="YELLOW" reason="index [winlogbeat-7.11.0-2020.12.03-000001] created"
[00:01:21]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [winlogbeat-7.11.0-2020.12.03-000001/yx_Kre74StG0fO8mk40IXg] deleting index
[00:01:21]                   │ info [endpoint/resolver/winlogbeat] Deleted existing index "winlogbeat-7.11.0-2020.12.03-000001"
[00:01:21]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] [winlogbeat-7.11.0-2020.12.03-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:01:21]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-1623173835687269139] current.health="RED" message="Cluster health status changed from [YELLOW] to [RED] (reason: [index [winlogbeat-7.11.0-2020.12.03-000001] created])." previous.health="YELLOW" reason="index [winlogbeat-7.11.0-2020.12.03-000001] created"
[00:01:51]                   └- ✖ fail: Endpoint plugin Resolver tests Resolver tests for the entity route winlogbeat tests "before all" hook for "returns a winlogbeat sysmon event when the event matches the schema correctly"
[00:01:51]                   │      ResponseError: resource_already_exists_exception
[00:01:51]                   │       at onBody (/dev/shm/workspace/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:337:23)
[00:01:51]                   │       at IncomingMessage.onEnd (/dev/shm/workspace/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:264:11)
[00:01:51]                   │       at endReadableNT (internal/streams/readable.js:1327:12)
[00:01:51]                   │       at processTicksAndRejections (internal/process/task_queues.js:80:21)
[00:01:51]                   │ 
[00:01:51]                   │ 

Stack Trace

ResponseError: resource_already_exists_exception
    at onBody (/dev/shm/workspace/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:337:23)
    at IncomingMessage.onEnd (/dev/shm/workspace/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:264:11)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  meta: {
    body: { error: [Object], status: 400 },
    statusCode: 400,
    headers: {
      'x-elastic-product': 'Elasticsearch',
      'content-type': 'application/json;charset=utf-8',
      'content-length': '481'
    },
    meta: {
      context: null,
      request: [Object],
      name: 'elasticsearch-js',
      connection: [Object],
      attempts: 1,
      aborted: false
    }
  }
}

Kibana Pipeline / general / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/infra/metrics_anomalies·ts.InfraOps App Metrics UI Metrics UI Anomaly Flyout with anomalies present renders more anomalies on threshold change

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 3 times on tracked branches: https://github.com/elastic/kibana/issues/100446

[00:00:00]       │
[00:35:40]         └-: InfraOps App
[00:35:40]           └-> "before all" hook in "InfraOps App"
[00:39:50]           └-: Metrics UI
[00:39:50]             └-> "before all" hook in "Metrics UI"
[00:41:06]             └-: Metrics UI Anomaly Flyout
[00:41:06]               └-> "before all" hook in "Metrics UI Anomaly Flyout"
[00:41:06]               └-> "before all" hook in "Metrics UI Anomaly Flyout"
[00:41:06]                 │ info [empty_kibana] Loading "mappings.json"
[00:41:06]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana_pre6.5.0_001/44KZAHy0RRW0SxzKuJR-RA] deleting index
[00:41:06]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana_8.0.0_001/SnBMfxEDR-eA_R8sim_FwA] deleting index
[00:41:06]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana_task_manager_8.0.0_001/Nk2ZdwXhQVOTbLHW_4BqgQ] deleting index
[00:41:06]                 │ info [empty_kibana] Deleted existing index ".kibana_8.0.0_001"
[00:41:06]                 │ info [empty_kibana] Deleted existing index ".kibana_task_manager_8.0.0_001"
[00:41:06]                 │ info [empty_kibana] Deleted existing index ".kibana_pre6.5.0_001"
[00:41:06]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana] creating index, cause [api], templates [], shards [1]/[1]
[00:41:06]                 │ info [empty_kibana] Created index ".kibana"
[00:41:06]                 │ debg [empty_kibana] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:41:06]                 │ debg Migrating saved objects
[00:41:06]                 │ proc [kibana]   log   [18:27:48.493] [info][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET. took: 2ms.
[00:41:06]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana_task_manager_8.0.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:41:06]                 │ proc [kibana]   log   [18:27:48.498] [info][savedobjects-service] [.kibana] INIT -> LEGACY_SET_WRITE_BLOCK. took: 9ms.
[00:41:06]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] updating number_of_replicas to [0] for indices [.kibana_task_manager_8.0.0_001]
[00:41:06]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] adding block write to indices [[.kibana/LFpoenBjSNmlj9HNiN1j7A]]
[00:41:06]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] completed adding block write to indices [.kibana]
[00:41:06]                 │ proc [kibana]   log   [18:27:48.547] [info][savedobjects-service] [.kibana_task_manager] CREATE_NEW_TARGET -> MARK_VERSION_INDEX_READY. took: 54ms.
[00:41:06]                 │ proc [kibana]   log   [18:27:48.561] [info][savedobjects-service] [.kibana] LEGACY_SET_WRITE_BLOCK -> LEGACY_CREATE_REINDEX_TARGET. took: 63ms.
[00:41:06]                 │ proc [kibana]   log   [18:27:48.572] [info][savedobjects-service] [.kibana_task_manager] MARK_VERSION_INDEX_READY -> DONE. took: 25ms.
[00:41:06]                 │ proc [kibana]   log   [18:27:48.573] [info][savedobjects-service] [.kibana_task_manager] Migration completed after 82ms
[00:41:06]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana_pre6.5.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:41:06]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] updating number_of_replicas to [0] for indices [.kibana_pre6.5.0_001]
[00:41:06]                 │ proc [kibana]   log   [18:27:48.614] [info][savedobjects-service] [.kibana] LEGACY_CREATE_REINDEX_TARGET -> LEGACY_REINDEX. took: 53ms.
[00:41:06]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] 76745 finished with response BulkByScrollResponse[took=1.7ms,timed_out=false,sliceId=null,updated=0,created=0,deleted=0,batches=0,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:41:06]                 │ proc [kibana]   log   [18:27:48.621] [info][savedobjects-service] [.kibana] LEGACY_REINDEX -> LEGACY_REINDEX_WAIT_FOR_TASK. took: 7ms.
[00:41:06]                 │ proc [kibana]   log   [18:27:48.629] [info][savedobjects-service] [.kibana] LEGACY_REINDEX_WAIT_FOR_TASK -> LEGACY_DELETE. took: 8ms.
[00:41:06]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana/LFpoenBjSNmlj9HNiN1j7A] deleting index
[00:41:06]                 │ proc [kibana]   log   [18:27:48.660] [info][savedobjects-service] [.kibana] LEGACY_DELETE -> SET_SOURCE_WRITE_BLOCK. took: 31ms.
[00:41:06]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] adding block write to indices [[.kibana_pre6.5.0_001/9XHnuUbpQpGN7JW8K2M_Ng]]
[00:41:06]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] completed adding block write to indices [.kibana_pre6.5.0_001]
[00:41:06]                 │ proc [kibana]   log   [18:27:48.692] [info][savedobjects-service] [.kibana] SET_SOURCE_WRITE_BLOCK -> CREATE_REINDEX_TEMP. took: 32ms.
[00:41:06]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana_8.0.0_reindex_temp] creating index, cause [api], templates [], shards [1]/[1]
[00:41:06]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] updating number_of_replicas to [0] for indices [.kibana_8.0.0_reindex_temp]
[00:41:06]                 │ proc [kibana]   log   [18:27:48.735] [info][savedobjects-service] [.kibana] CREATE_REINDEX_TEMP -> REINDEX_SOURCE_TO_TEMP_OPEN_PIT. took: 43ms.
[00:41:06]                 │ proc [kibana]   log   [18:27:48.741] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_OPEN_PIT -> REINDEX_SOURCE_TO_TEMP_READ. took: 6ms.
[00:41:06]                 │ proc [kibana]   log   [18:27:48.748] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_CLOSE_PIT. took: 7ms.
[00:41:06]                 │ proc [kibana]   log   [18:27:48.754] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_CLOSE_PIT -> SET_TEMP_WRITE_BLOCK. took: 6ms.
[00:41:06]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] adding block write to indices [[.kibana_8.0.0_reindex_temp/Z0ONk4QoQTqVJchNzl_4Fw]]
[00:41:06]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] completed adding block write to indices [.kibana_8.0.0_reindex_temp]
[00:41:06]                 │ proc [kibana]   log   [18:27:48.789] [info][savedobjects-service] [.kibana] SET_TEMP_WRITE_BLOCK -> CLONE_TEMP_TO_TARGET. took: 35ms.
[00:41:06]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] applying create index request using existing index [.kibana_8.0.0_reindex_temp] metadata
[00:41:06]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana_8.0.0_001] creating index, cause [clone_index], templates [], shards [1]/[1]
[00:41:06]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] updating number_of_replicas to [0] for indices [.kibana_8.0.0_001]
[00:41:06]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana_8.0.0_001/P6Zzv0DATQyufp3tOCWCVg] create_mapping
[00:41:06]                 │ proc [kibana]   log   [18:27:48.863] [info][savedobjects-service] [.kibana] CLONE_TEMP_TO_TARGET -> REFRESH_TARGET. took: 74ms.
[00:41:06]                 │ proc [kibana]   log   [18:27:48.868] [info][savedobjects-service] [.kibana] REFRESH_TARGET -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 5ms.
[00:41:06]                 │ proc [kibana]   log   [18:27:48.873] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 5ms.
[00:41:06]                 │ proc [kibana]   log   [18:27:48.879] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 6ms.
[00:41:06]                 │ proc [kibana]   log   [18:27:48.884] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> UPDATE_TARGET_MAPPINGS. took: 5ms.
[00:41:06]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana_8.0.0_001/P6Zzv0DATQyufp3tOCWCVg] update_mapping [_doc]
[00:41:06]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] 76810 finished with response BulkByScrollResponse[took=1.1ms,timed_out=false,sliceId=null,updated=0,created=0,deleted=0,batches=0,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:41:06]                 │ proc [kibana]   log   [18:27:48.930] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 46ms.
[00:41:06]                 │ proc [kibana]   log   [18:27:48.938] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> MARK_VERSION_INDEX_READY. took: 8ms.
[00:41:06]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana_8.0.0_reindex_temp/Z0ONk4QoQTqVJchNzl_4Fw] deleting index
[00:41:07]                 │ proc [kibana]   log   [18:27:48.971] [info][savedobjects-service] [.kibana] MARK_VERSION_INDEX_READY -> DONE. took: 33ms.
[00:41:07]                 │ proc [kibana]   log   [18:27:48.972] [info][savedobjects-service] [.kibana] Migration completed after 483ms
[00:41:07]                 │ debg [empty_kibana] Migrated Kibana index after loading Kibana data
[00:41:07]                 │ debg [empty_kibana] Ensured that default space exists in .kibana
[00:41:07]                 │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC","visualization:visualize:legacyChartsLibrary":true}
[00:41:07]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana_8.0.0_001/P6Zzv0DATQyufp3tOCWCVg] update_mapping [_doc]
[00:41:17]               └-: with anomalies present
[00:41:17]                 └-> "before all" hook for "renders the anomaly table with anomalies"
[00:41:17]                 └-> "before all" hook for "renders the anomaly table with anomalies"
[00:41:17]                   │ info [infra/metrics_anomalies] Loading "mappings.json"
[00:41:17]                   │ info [infra/metrics_anomalies] Loading "data.json.gz"
[00:41:17]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.ml-anomalies-shared] creating index, cause [api], templates [.ml-anomalies-], shards [1]/[0]
[00:41:17]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.ml-annotations-6] creating index, cause [api], templates [], shards [1]/[1]
[00:41:17]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] updating number_of_replicas to [0] for indices [.ml-annotations-6]
[00:41:17]                   │ info [infra/metrics_anomalies] Created index ".ml-anomalies-shared"
[00:41:17]                   │ debg [infra/metrics_anomalies] ".ml-anomalies-shared" settings {"index":{"auto_expand_replicas":"0-1","hidden":"true","number_of_replicas":"0","number_of_shards":"1","translog":{"durability":"async"}}}
[00:41:17]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.ml-config] creating index, cause [api], templates [], shards [1]/[1]
[00:41:17]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] updating number_of_replicas to [0] for indices [.ml-config]
[00:41:17]                   │ info [infra/metrics_anomalies] Created index ".ml-config"
[00:41:17]                   │ debg [infra/metrics_anomalies] ".ml-config" settings {"index":{"auto_expand_replicas":"0-1","max_result_window":"10000","number_of_replicas":"0","number_of_shards":"1"}}
[00:41:17]                   │ info [infra/metrics_anomalies] Indexed 1182 docs into ".ml-anomalies-shared"
[00:41:17]                   │ info [infra/metrics_anomalies] Indexed 12 docs into ".ml-config"
[00:41:17]                   │ debg Creating saved object: {"type":"ml-job","id":"anomaly-detector-kibana-metrics-ui-default-default-hosts_memory_usage","overwrite":true,"attributes":{"job_id":"kibana-metrics-ui-default-default-hosts_memory_usage","datafeed_id":"datafeed-kibana-metrics-ui-default-default-hosts_memory_usage","type":"anomaly-detector"}}
[00:41:17]                   │ debg Creating saved object: {"type":"ml-job","id":"anomaly-detector-kibana-metrics-ui-default-default-hosts_network_out","overwrite":true,"attributes":{"job_id":"kibana-metrics-ui-default-default-hosts_network_out","datafeed_id":"datafeed-kibana-metrics-ui-default-default-hosts_network_out","type":"anomaly-detector"}}
[00:41:17]                   │ debg Creating saved object: {"type":"ml-job","id":"anomaly-detector-kibana-metrics-ui-default-default-hosts_network_in","overwrite":true,"attributes":{"job_id":"kibana-metrics-ui-default-default-hosts_network_in","datafeed_id":"datafeed-kibana-metrics-ui-default-default-hosts_network_in","type":"anomaly-detector"}}
[00:41:17]                   │ debg Creating saved object: {"type":"ml-job","id":"anomaly-detector-kibana-metrics-ui-default-default-k8s_network_out","overwrite":true,"attributes":{"job_id":"kibana-metrics-ui-default-default-k8s_network_out","datafeed_id":"datafeed-kibana-metrics-ui-default-default-k8s_network_out","type":"anomaly-detector"}}
[00:41:17]                   │ debg Creating saved object: {"type":"ml-job","id":"anomaly-detector-kibana-metrics-ui-default-default-k8s_network_in","overwrite":true,"attributes":{"job_id":"kibana-metrics-ui-default-default-k8s_network_in","datafeed_id":"datafeed-kibana-metrics-ui-default-default-k8s_network_in","type":"anomaly-detector"}}
[00:41:17]                   │ debg Creating saved object: {"type":"ml-job","id":"anomaly-detector-kibana-metrics-ui-default-default-k8s_memory_usage","overwrite":true,"attributes":{"job_id":"kibana-metrics-ui-default-default-k8s_memory_usage","datafeed_id":"datafeed-kibana-metrics-ui-default-default-k8s_memory_usage","type":"anomaly-detector"}}
[00:41:17]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana_8.0.0_001/P6Zzv0DATQyufp3tOCWCVg] update_mapping [_doc]
[00:41:17]                 └-> renders the anomaly table with anomalies
[00:41:17]                   └-> "before each" hook: global before each for "renders the anomaly table with anomalies"
[00:41:17]                   │ debg TestSubjects.click(openAnomalyFlyoutButton)
[00:41:17]                   │ debg Find.clickByCssSelector('[data-test-subj="openAnomalyFlyoutButton"]') with timeout=10000
[00:41:17]                   │ debg Find.findByCssSelector('[data-test-subj="openAnomalyFlyoutButton"]') with timeout=10000
[00:41:17]                   │ debg TestSubjects.exists(loadMLFlyout)
[00:41:17]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loadMLFlyout"]') with timeout=2500
[00:41:18]                   │ debg TestSubjects.click(anomalyFlyoutAnomaliesTab)
[00:41:18]                   │ debg Find.clickByCssSelector('[data-test-subj="anomalyFlyoutAnomaliesTab"]') with timeout=10000
[00:41:18]                   │ debg Find.findByCssSelector('[data-test-subj="anomalyFlyoutAnomaliesTab"]') with timeout=10000
[00:41:18]                   │ debg TestSubjects.click(anomaliesComboBoxType)
[00:41:18]                   │ debg Find.clickByCssSelector('[data-test-subj="anomaliesComboBoxType"]') with timeout=10000
[00:41:18]                   │ debg Find.findByCssSelector('[data-test-subj="anomaliesComboBoxType"]') with timeout=10000
[00:41:18]                   │ debg TestSubjects.click(anomaliesHostComboBoxItem)
[00:41:18]                   │ debg Find.clickByCssSelector('[data-test-subj="anomaliesHostComboBoxItem"]') with timeout=10000
[00:41:18]                   │ debg Find.findByCssSelector('[data-test-subj="anomaliesHostComboBoxItem"]') with timeout=10000
[00:41:18]                   │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:41:18]                   │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:41:18]                   │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:41:18]                   │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:41:18]                   │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:41:18]                   │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:41:18]                   │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:41:18]                   │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:41:18]                   │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:41:18]                   │ debg TestSubjects.find(superDatePickerAbsoluteDateInput)
[00:41:18]                   │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:41:19]                   │ debg TestSubjects.findAll(anomalyRow)
[00:41:19]                   │ debg Find.allByCssSelector('[data-test-subj="anomalyRow"]') with timeout=10000
[00:41:19]                   │ debg TestSubjects.click(anomaliesComboBoxType)
[00:41:19]                   │ debg Find.clickByCssSelector('[data-test-subj="anomaliesComboBoxType"]') with timeout=10000
[00:41:19]                   │ debg Find.findByCssSelector('[data-test-subj="anomaliesComboBoxType"]') with timeout=10000
[00:41:19]                   │ debg TestSubjects.click(anomaliesK8sComboBoxItem)
[00:41:19]                   │ debg Find.clickByCssSelector('[data-test-subj="anomaliesK8sComboBoxItem"]') with timeout=10000
[00:41:19]                   │ debg Find.findByCssSelector('[data-test-subj="anomaliesK8sComboBoxItem"]') with timeout=10000
[00:41:19]                   │ debg TestSubjects.findAll(anomalyRow)
[00:41:19]                   │ debg Find.allByCssSelector('[data-test-subj="anomalyRow"]') with timeout=10000
[00:41:19]                   │ debg TestSubjects.click(euiFlyoutCloseButton)
[00:41:19]                   │ debg Find.clickByCssSelector('[data-test-subj="euiFlyoutCloseButton"]') with timeout=10000
[00:41:19]                   │ debg Find.findByCssSelector('[data-test-subj="euiFlyoutCloseButton"]') with timeout=10000
[00:41:20]                   └- ✓ pass  (2.1s) "InfraOps App Metrics UI Metrics UI Anomaly Flyout with anomalies present renders the anomaly table with anomalies"
[00:41:20]                 └-> renders the anomaly table after a date change with no anomalies
[00:41:20]                   └-> "before each" hook: global before each for "renders the anomaly table after a date change with no anomalies"
[00:41:20]                   │ debg TestSubjects.click(openAnomalyFlyoutButton)
[00:41:20]                   │ debg Find.clickByCssSelector('[data-test-subj="openAnomalyFlyoutButton"]') with timeout=10000
[00:41:20]                   │ debg Find.findByCssSelector('[data-test-subj="openAnomalyFlyoutButton"]') with timeout=10000
[00:41:20]                   │ debg TestSubjects.exists(loadMLFlyout)
[00:41:20]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loadMLFlyout"]') with timeout=2500
[00:41:20]                   │ debg TestSubjects.click(anomalyFlyoutAnomaliesTab)
[00:41:20]                   │ debg Find.clickByCssSelector('[data-test-subj="anomalyFlyoutAnomaliesTab"]') with timeout=10000
[00:41:20]                   │ debg Find.findByCssSelector('[data-test-subj="anomalyFlyoutAnomaliesTab"]') with timeout=10000
[00:41:20]                   │ debg TestSubjects.click(anomaliesComboBoxType)
[00:41:20]                   │ debg Find.clickByCssSelector('[data-test-subj="anomaliesComboBoxType"]') with timeout=10000
[00:41:20]                   │ debg Find.findByCssSelector('[data-test-subj="anomaliesComboBoxType"]') with timeout=10000
[00:41:20]                   │ debg TestSubjects.click(anomaliesHostComboBoxItem)
[00:41:20]                   │ debg Find.clickByCssSelector('[data-test-subj="anomaliesHostComboBoxItem"]') with timeout=10000
[00:41:20]                   │ debg Find.findByCssSelector('[data-test-subj="anomaliesHostComboBoxItem"]') with timeout=10000
[00:41:20]                   │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:41:20]                   │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:41:20]                   │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:41:20]                   │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:41:20]                   │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:41:20]                   │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:41:20]                   │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:41:20]                   │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:41:20]                   │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:41:20]                   │ debg TestSubjects.find(superDatePickerAbsoluteDateInput)
[00:41:20]                   │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:41:21]                   │ debg TestSubjects.find(noAnomaliesFoundMsg)
[00:41:21]                   │ debg Find.findByCssSelector('[data-test-subj="noAnomaliesFoundMsg"]') with timeout=10000
[00:41:21]                   │ debg TestSubjects.click(anomaliesComboBoxType)
[00:41:21]                   │ debg Find.clickByCssSelector('[data-test-subj="anomaliesComboBoxType"]') with timeout=10000
[00:41:21]                   │ debg Find.findByCssSelector('[data-test-subj="anomaliesComboBoxType"]') with timeout=10000
[00:41:21]                   │ debg TestSubjects.click(anomaliesK8sComboBoxItem)
[00:41:21]                   │ debg Find.clickByCssSelector('[data-test-subj="anomaliesK8sComboBoxItem"]') with timeout=10000
[00:41:21]                   │ debg Find.findByCssSelector('[data-test-subj="anomaliesK8sComboBoxItem"]') with timeout=10000
[00:41:21]                   │ debg TestSubjects.find(noAnomaliesFoundMsg)
[00:41:21]                   │ debg Find.findByCssSelector('[data-test-subj="noAnomaliesFoundMsg"]') with timeout=10000
[00:41:21]                   │ debg TestSubjects.click(euiFlyoutCloseButton)
[00:41:21]                   │ debg Find.clickByCssSelector('[data-test-subj="euiFlyoutCloseButton"]') with timeout=10000
[00:41:21]                   │ debg Find.findByCssSelector('[data-test-subj="euiFlyoutCloseButton"]') with timeout=10000
[00:41:21]                   └- ✓ pass  (1.9s) "InfraOps App Metrics UI Metrics UI Anomaly Flyout with anomalies present renders the anomaly table after a date change with no anomalies"
[00:41:21]                 └-> renders more anomalies on threshold change
[00:41:21]                   └-> "before each" hook: global before each for "renders more anomalies on threshold change"
[00:41:21]                   │ debg TestSubjects.click(infrastructureNavLink_/settings)
[00:41:21]                   │ debg Find.clickByCssSelector('[data-test-subj="infrastructureNavLink_/settings"]') with timeout=10000
[00:41:21]                   │ debg Find.findByCssSelector('[data-test-subj="infrastructureNavLink_/settings"]') with timeout=10000
[00:41:22]                   │ debg Find.findByCssSelector('.euiFieldNumber.euiRangeInput.euiRangeInput--max') with timeout=10000
[00:41:22]                   │ debg TestSubjects.find(~sourceConfigurationContent)
[00:41:22]                   │ debg Find.findByCssSelector('[data-test-subj~="sourceConfigurationContent"]') with timeout=10000
[00:41:22]                   │ debg TestSubjects.findDescendant(~applySettingsButton)
[00:41:22]                   │ debg Find.descendantDisplayedByCssSelector('[data-test-subj~="applySettingsButton"]')
[00:41:22]                   │ debg TestSubjects.find(~sourceConfigurationContent)
[00:41:22]                   │ debg Find.findByCssSelector('[data-test-subj~="sourceConfigurationContent"]') with timeout=10000
[00:41:22]                   │ debg TestSubjects.findDescendant(~applySettingsButton)
[00:41:22]                   │ debg Find.descendantDisplayedByCssSelector('[data-test-subj~="applySettingsButton"]')
[00:41:22]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1623172254003692220] [.kibana_8.0.0_001/P6Zzv0DATQyufp3tOCWCVg] update_mapping [_doc]
[00:41:22]                   │ debg TestSubjects.click(infrastructureNavLink_/inventory)
[00:41:22]                   │ debg Find.clickByCssSelector('[data-test-subj="infrastructureNavLink_/inventory"]') with timeout=10000
[00:41:22]                   │ debg Find.findByCssSelector('[data-test-subj="infrastructureNavLink_/inventory"]') with timeout=10000
[00:41:23]                   │ debg TestSubjects.click(openAnomalyFlyoutButton)
[00:41:23]                   │ debg Find.clickByCssSelector('[data-test-subj="openAnomalyFlyoutButton"]') with timeout=10000
[00:41:23]                   │ debg Find.findByCssSelector('[data-test-subj="openAnomalyFlyoutButton"]') with timeout=10000
[00:41:23]                   │ debg TestSubjects.exists(loadMLFlyout)
[00:41:23]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loadMLFlyout"]') with timeout=2500
[00:41:23]                   │ debg TestSubjects.click(anomalyFlyoutAnomaliesTab)
[00:41:23]                   │ debg Find.clickByCssSelector('[data-test-subj="anomalyFlyoutAnomaliesTab"]') with timeout=10000
[00:41:23]                   │ debg Find.findByCssSelector('[data-test-subj="anomalyFlyoutAnomaliesTab"]') with timeout=10000
[00:41:23]                   │ debg TestSubjects.click(anomaliesComboBoxType)
[00:41:23]                   │ debg Find.clickByCssSelector('[data-test-subj="anomaliesComboBoxType"]') with timeout=10000
[00:41:23]                   │ debg Find.findByCssSelector('[data-test-subj="anomaliesComboBoxType"]') with timeout=10000
[00:41:23]                   │ debg TestSubjects.click(anomaliesHostComboBoxItem)
[00:41:23]                   │ debg Find.clickByCssSelector('[data-test-subj="anomaliesHostComboBoxItem"]') with timeout=10000
[00:41:23]                   │ debg Find.findByCssSelector('[data-test-subj="anomaliesHostComboBoxItem"]') with timeout=10000
[00:41:23]                   │ debg TestSubjects.findAll(anomalyRow)
[00:41:23]                   │ debg Find.allByCssSelector('[data-test-subj="anomalyRow"]') with timeout=10000
[00:41:33]                   │ info Taking screenshot "/dev/shm/workspace/parallel/22/kibana/x-pack/test/functional/screenshots/failure/InfraOps App Metrics UI Metrics UI Anomaly Flyout with anomalies present renders more anomalies on threshold change.png"
[00:41:33]                   │ info Current URL is: http://localhost:61221/app/metrics/inventory
[00:41:33]                   │ info Saving page source to: /dev/shm/workspace/parallel/22/kibana/x-pack/test/functional/failure_debug/html/InfraOps App Metrics UI Metrics UI Anomaly Flyout with anomalies present renders more anomalies on threshold change.html
[00:41:33]                   └- ✖ fail: InfraOps App Metrics UI Metrics UI Anomaly Flyout with anomalies present renders more anomalies on threshold change
[00:41:33]                   │      Error: expected 0 to equal 4
[00:41:33]                   │       at Assertion.assert (/dev/shm/workspace/parallel/22/kibana/node_modules/@kbn/expect/expect.js:100:11)
[00:41:33]                   │       at Assertion.be.Assertion.equal (/dev/shm/workspace/parallel/22/kibana/node_modules/@kbn/expect/expect.js:227:8)
[00:41:33]                   │       at Assertion.be (/dev/shm/workspace/parallel/22/kibana/node_modules/@kbn/expect/expect.js:69:22)
[00:41:33]                   │       at Context.<anonymous> (test/functional/apps/infra/metrics_anomalies.ts:96:41)
[00:41:33]                   │       at runMicrotasks (<anonymous>)
[00:41:33]                   │       at processTicksAndRejections (internal/process/task_queues.js:93:5)
[00:41:33]                   │       at Object.apply (/dev/shm/workspace/parallel/22/kibana/node_modules/@kbn/test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)
[00:41:33]                   │ 
[00:41:33]                   │ 

Stack Trace

Error: expected 0 to equal 4
    at Assertion.assert (/dev/shm/workspace/parallel/22/kibana/node_modules/@kbn/expect/expect.js:100:11)
    at Assertion.be.Assertion.equal (/dev/shm/workspace/parallel/22/kibana/node_modules/@kbn/expect/expect.js:227:8)
    at Assertion.be (/dev/shm/workspace/parallel/22/kibana/node_modules/@kbn/expect/expect.js:69:22)
    at Context.<anonymous> (test/functional/apps/infra/metrics_anomalies.ts:96:41)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at Object.apply (/dev/shm/workspace/parallel/22/kibana/node_modules/@kbn/test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)

and 4 more failures, only showing the first 3.

History

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

cc @cnasikas

jonathan-buttner added a commit that referenced this pull request Jun 22, 2021
* Adding feature flag for auth

* Hiding SOs and adding consumer field

* First pass at adding security changes

* Consumer as the app's plugin ID

* Create addConsumerToSO migration helper

* Fix mapping's SO consumer

* Add test for CasesActions

* Declare hidden types on SO client

* Restructure integration tests

* Init spaces_only integration tests

* Implementing the cases security string

* Adding security plugin tests for cases

* Rough concept for authorization class

* Adding comments

* Fix merge

* Get requiredPrivileges for classes

* Check privillages

* Ensure that all classes are available

* Success if hasAllRequested is true

* Failure if hasAllRequested is false

* Adding schema updates for feature plugin

* Seperate basic from trial

* Enable SIR on integration tests

* Starting the plumbing for authorization in plugin

* Unit tests working

* Move find route logic to case client

* Create integration test helper functions

* Adding auth to create call

* Create getClassFilter helper

* Add class attribute to find request

* Create getFindAuthorizationFilter

* Ensure savedObject is authorized in find method

* Include fields for authorization

* Combine authorization filter with cases & subcases filter

* Fix isAuthorized flag

* Fix merge issue

* Create/delete spaces & users before and after tests

* Add more user and roles

* [Cases] Convert filters from strings to KueryNode (#95288)

* [Cases] RBAC: Rename class to scope (#95535)

* [Cases][RBAC] Rename scope to owner (#96035)

* [Cases] RBAC: Create & Find integration tests (#95511)

* [Cases] Cases client enchantment (#95923)

* [Cases] Authorization and Client Audit Logger (#95477)

* Starting audit logger

* Finishing auth audit logger

* Fixing tests and types

* Adding audit event creator

* Renaming class to scope

* Adding audit logger messages to create and find

* Adding comments and fixing import issue

* Fixing type errors

* Fixing tests and adding username to message

* Addressing PR feedback

* Removing unneccessary log and generating id

* Fixing module issue and remove expect.anything

* [Cases] Migrate sub cases routes to a client (#96461)

* Adding sub cases client

* Move sub case routes to case client

* Throw when attempting to access the sub cases client

* Fixing throw and removing user ans soclients

* [Cases] RBAC: Migrate routes' unit tests to integration tests (#96374)

Co-authored-by: Jonathan Buttner <[email protected]>

* [Cases] Move remaining HTTP functionality to client (#96507)

* Moving deletes and find for attachments

* Moving rest of comment apis

* Migrating configuration routes to client

* Finished moving routes, starting utils refactor

* Refactoring utilites and fixing integration tests

* Addressing PR feedback

* Fixing mocks and types

* Fixing integration tests

* Renaming status_stats

* Fixing test type errors

* Adding plugins to kibana.json

* Adding cases to required plugin

* [Cases] Refactoring authorization (#97483)

* Refactoring authorization

* Wrapping auth calls in helper for try catch

* Reverting name change

* Hardcoding the saved object types

* Switching ensure to owner array

* [Cases] Add authorization to configuration & cases routes (#97228)

* [Cases] Attachments RBAC (#97756)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Addressing PR comments

* Reducing operations

* [Cases] Add RBAC to remaining Cases APIs (#98762)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Working case update tests

* Addressing PR comments

* Reducing operations

* Working rbac push case tests

* Starting stats apis

* Working status tests

* User action tests and fixing migration errors

* Fixing type errors

* including error in message

* Addressing pr feedback

* Fixing some type errors

* [Cases] Add space only tests (#99409)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* [Cases] Add security only tests (#99679)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* Starting security only tests

* Adding remainder security only tests

* Using helper objects

* Fixing type error for null space

* Renaming utility variables

* Refactoring users and roles for security only tests

* Adding sub feature

* [Cases] Cleaning up the services and TODOs (#99723)

* Cleaning up the service intialization

* Fixing type errors

* Adding comments for the api

* Working test for cases client

* Fix type error

* Adding generated docs

* Adding more docs and cleaning up types

* Cleaning up readme

* More clean up and links

* Changing some file names

* Renaming docs

* Integration tests for cases privs and fixes (#100038)

* [Cases] RBAC on UI (#99478)

Co-authored-by: Kibana Machine <[email protected]>

* Fixing case ids by alert id route call

* [Cases] Fixing UI feature permissions and adding UI tests (#100074)

* Integration tests for cases privs and fixes

* Fixing ui cases permissions and adding tests

* Adding test for collection failure and fixing jest

* Renaming variables

* Fixing type error

* Adding some comments

* Validate cases features

* Fix new schema

* Adding owner param for the status stats

* Fix get case status tests

* Adjusting permissions text and fixing status

* Address PR feedback

* Adding top level feature back

* Fixing feature privileges

* Renaming

* Removing uneeded else

* Fixing tests and adding cases merge tests

* [Cases][Security Solution] Basic license security solution API tests (#100925)

* Cleaning up the fixture plugins

* Adding basic feature test

* renaming to unsecuredSavedObjectsClient (#101215)

* [Cases] RBAC Refactoring audit logging (#100952)

* Refactoring audit logging

* Adding unit tests for authorization classes

* Addressing feedback and adding util tests

* return undefined on empty array

* fixing eslint

* conditional rendering the recently created cases

* Remove unnecessary Array.from

* Cleaning up overview page for permissions

* Fixing log message for attachments

* hiding add to cases button

* Disable the Cases app from the global nav

* Hide the add to cases button from detections

* Fixing merge

* Making progress on removing icons

* Hding edit icons on detail view

* Trying to get connector error msg tests working

* Removing test

* Disable error callouts

* Fixing spacing and removing cases tab one no read

* Adding read only badge

* Cleaning up and adding badge

* Wrapping in use effect

* Default toasting permissions errors

* Removing actions icon on comments

* Addressing feedback

* Fixing type

Co-authored-by: Christos Nasikas <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
jonathan-buttner added a commit that referenced this pull request Jun 22, 2021
* Adding feature flag for auth

* Hiding SOs and adding consumer field

* First pass at adding security changes

* Consumer as the app's plugin ID

* Create addConsumerToSO migration helper

* Fix mapping's SO consumer

* Add test for CasesActions

* Declare hidden types on SO client

* Restructure integration tests

* Init spaces_only integration tests

* Implementing the cases security string

* Adding security plugin tests for cases

* Rough concept for authorization class

* Adding comments

* Fix merge

* Get requiredPrivileges for classes

* Check privillages

* Ensure that all classes are available

* Success if hasAllRequested is true

* Failure if hasAllRequested is false

* Adding schema updates for feature plugin

* Seperate basic from trial

* Enable SIR on integration tests

* Starting the plumbing for authorization in plugin

* Unit tests working

* Move find route logic to case client

* Create integration test helper functions

* Adding auth to create call

* Create getClassFilter helper

* Add class attribute to find request

* Create getFindAuthorizationFilter

* Ensure savedObject is authorized in find method

* Include fields for authorization

* Combine authorization filter with cases & subcases filter

* Fix isAuthorized flag

* Fix merge issue

* Create/delete spaces & users before and after tests

* Add more user and roles

* [Cases] Convert filters from strings to KueryNode (#95288)

* [Cases] RBAC: Rename class to scope (#95535)

* [Cases][RBAC] Rename scope to owner (#96035)

* [Cases] RBAC: Create & Find integration tests (#95511)

* [Cases] Cases client enchantment (#95923)

* [Cases] Authorization and Client Audit Logger (#95477)

* Starting audit logger

* Finishing auth audit logger

* Fixing tests and types

* Adding audit event creator

* Renaming class to scope

* Adding audit logger messages to create and find

* Adding comments and fixing import issue

* Fixing type errors

* Fixing tests and adding username to message

* Addressing PR feedback

* Removing unneccessary log and generating id

* Fixing module issue and remove expect.anything

* [Cases] Migrate sub cases routes to a client (#96461)

* Adding sub cases client

* Move sub case routes to case client

* Throw when attempting to access the sub cases client

* Fixing throw and removing user ans soclients

* [Cases] RBAC: Migrate routes' unit tests to integration tests (#96374)

Co-authored-by: Jonathan Buttner <[email protected]>

* [Cases] Move remaining HTTP functionality to client (#96507)

* Moving deletes and find for attachments

* Moving rest of comment apis

* Migrating configuration routes to client

* Finished moving routes, starting utils refactor

* Refactoring utilites and fixing integration tests

* Addressing PR feedback

* Fixing mocks and types

* Fixing integration tests

* Renaming status_stats

* Fixing test type errors

* Adding plugins to kibana.json

* Adding cases to required plugin

* [Cases] Refactoring authorization (#97483)

* Refactoring authorization

* Wrapping auth calls in helper for try catch

* Reverting name change

* Hardcoding the saved object types

* Switching ensure to owner array

* [Cases] Add authorization to configuration & cases routes (#97228)

* [Cases] Attachments RBAC (#97756)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Addressing PR comments

* Reducing operations

* [Cases] Add RBAC to remaining Cases APIs (#98762)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Working case update tests

* Addressing PR comments

* Reducing operations

* Working rbac push case tests

* Starting stats apis

* Working status tests

* User action tests and fixing migration errors

* Fixing type errors

* including error in message

* Addressing pr feedback

* Fixing some type errors

* [Cases] Add space only tests (#99409)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* [Cases] Add security only tests (#99679)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* Starting security only tests

* Adding remainder security only tests

* Using helper objects

* Fixing type error for null space

* Renaming utility variables

* Refactoring users and roles for security only tests

* Adding sub feature

* [Cases] Cleaning up the services and TODOs (#99723)

* Cleaning up the service intialization

* Fixing type errors

* Adding comments for the api

* Working test for cases client

* Fix type error

* Adding generated docs

* Adding more docs and cleaning up types

* Cleaning up readme

* More clean up and links

* Changing some file names

* Renaming docs

* Integration tests for cases privs and fixes (#100038)

* [Cases] RBAC on UI (#99478)

Co-authored-by: Kibana Machine <[email protected]>

* Fixing case ids by alert id route call

* [Cases] Fixing UI feature permissions and adding UI tests (#100074)

* Integration tests for cases privs and fixes

* Fixing ui cases permissions and adding tests

* Adding test for collection failure and fixing jest

* Renaming variables

* Fixing type error

* Adding some comments

* Validate cases features

* Fix new schema

* Adding owner param for the status stats

* Fix get case status tests

* Adjusting permissions text and fixing status

* Address PR feedback

* Adding top level feature back

* Fixing feature privileges

* Renaming

* Removing uneeded else

* Fixing tests and adding cases merge tests

* [Cases][Security Solution] Basic license security solution API tests (#100925)

* Cleaning up the fixture plugins

* Adding basic feature test

* renaming to unsecuredSavedObjectsClient (#101215)

* [Cases] RBAC Refactoring audit logging (#100952)

* Refactoring audit logging

* Adding unit tests for authorization classes

* Addressing feedback and adding util tests

* return undefined on empty array

* fixing eslint

* conditional rendering the recently created cases

* Remove unnecessary Array.from

* Cleaning up overview page for permissions

* Fixing log message for attachments

* hiding add to cases button

* Disable the Cases app from the global nav

* Hide the add to cases button from detections

* Fixing merge

* Making progress on removing icons

* Hding edit icons on detail view

* Trying to get connector error msg tests working

* Removing test

* Disable error callouts

* Fixing spacing and removing cases tab one no read

* Adding read only badge

* Cleaning up and adding badge

* Wrapping in use effect

* Default toasting permissions errors

* Removing actions icon on comments

* Addressing feedback

* Fixing type

Co-authored-by: Christos Nasikas <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Christos Nasikas <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting Security Solution Threat Hunting Team Theme: rac label obsolete v7.8.0 v7.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants