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

[SavedObjects] Add aggregations support #96292

Merged
merged 76 commits into from
Apr 16, 2021

Conversation

pgayvallet
Copy link
Contributor

@pgayvallet pgayvallet commented Apr 6, 2021

Summary

Taking over @XavierM's amazing work in #64002.

This PR adds an initial ES aggregation support to the savedObjects find API.
Closes #81009

Technical design and aggregation validation

Implementing aggs for saved objects comes with two main technical challenges:

Using the SO abstraction schema

We don't want to leak the actual underlying ES schema when performing aggs on saved objects, so we have to validate and rewrite the attribute paths inside the aggregation terms, similarly to what we did when rewriting KQL queries provided via the filter option of the find API.

  • to query a root field, the {type}.{rootField} syntax must be used.

e.g dashboard.updated_at

  • to query an attribute field, the {type}.attributes.{attributePath} syntax must be used.

e.g alert.attributes.actions.group

Avoiding security risks

Aggregations are a very powerful ES feature, but exposing the whole API would come with some security risks that we need to avoid. For example, we want to forbid the usage of the script option available for some aggregations to block this potential attack vector that consumers of the SO api could use.

After discussions with the Core and Security teams, the consensus was to use an allowlist for the attributes. The main argument being that using a blocklist instead could potentially lead to forget to add 'dangerous' fields to the blocklist when implementing new aggregations.

In practice, that means we are validating the structure of all implemented aggregations to ensure that only the allowed subset of the aggregations properties are used. This is done using self-maintained schemas for each implemented aggregation, and explains why all aggregations are not directly usable with this initial PR.

Supported aggregations

The initial set of supported aggregations is:

  • Bucket aggregations
    • filter
    • histogram
    • terms
  • Metrics aggregations
    • avg
    • cardinality
    • min
    • max
    • sum
    • top_hits
    • weighted_avg

Adding new aggregations is quite straightforward and only requires implementing the associated validation schema.

Usage examples

Aggregating on type attributes

Similar to the filter syntax, querying on attribute fields must be done using the {type}.attributes.{attrPath} syntax.

const { aggregations } = savedObjectClient.find({
  type: 'dashboard',
  aggs: {
     maxVersion: {
       max: {
         field: 'dashboard.attributes.version'
       }
     }
   }
});
// aggregations.maxVersion.value

Aggregating on root attributes

Similar to the filter syntax, querying on attribute fields must be done using the {type}.{attr} syntax.

const { aggregations } = savedObjectClient.find({
  type: 'dashboard',
  aggs: {
     lastUpdate: {
       max: {
         field: 'dashboard.updated_at'
       }
     }
   }
});
// aggregations.lastUpdate.value

Nested aggregations

Apart from the special field syntax and the ban of some aggregation options, the whole aggs API is available, such as nested aggregations.

const { aggregations } = savedObjectClient.find({
  type: 'myType',
  aggs: {
     filtered: {
       filter: {
         term: {
           'myType.attributes.foo': 'bar',
         }
       },
       aggs: {
         colors: {
            terms: {
               field: 'myType.attributes.color'
            }
         }
       }
     }
   }
});
// aggregations.filtered.colors.buckets....

Type support

Input

The SavedObjectFindOptions.aggs is leveraging the estypes.AggregationContainer type coming from the ES client library (@elastic/elasticsearch), meaning that there is full typescript support on the shape of the aggregations.

// no ts error
savedObjectClient.find({
  aggs: {
     myAgg: {
        max: { field: 'myType.attribute.someNumber'}
     }
  }
})
savedObjectClient.find({
  aggs: {
     myAgg: {
        max: { unknownField: 'invalid'} // TS ERROR
     }
  }
})

NOTE ON BANNED FIELDS: We're directly using the es library types, meaning that for typescript, banned fields such as script are valid. Using such fields will only cause failures during runtime. This is an acceptable compromise as we just don't want to expose our own custom types for aggregations.

Output

There isn't currently any type inference between the input and output of an aggregation (as the ES lib doesn't support it), meaning that response.aggregation has no default shape. a second generic parameter has been added to SavedObjectClient.find to let consumers specify the expected shape of the aggregation response.

type MyAggShape = {
   lastUpdate: { value: number }
}

const { aggregations } = savedObjectClient.find<unknown, MyAggShape>({
  type: 'dashboard',
  aggs: {
     lastUpdate: {
       max: {
         field: 'dashboard.updated_at'
       }
     }
   }
});

Checklist

XavierM and others added 30 commits April 14, 2020 17:12
Copy link
Contributor Author

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

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

Self-review.

Comment on lines +46 to +51
filter: s.object({
term: s.recordOf(s.string(), s.oneOf([s.string(), s.boolean(), s.number()])),
}),
histogram: s.object({
field: s.maybe(s.string()),
interval: s.maybe(s.number()),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some fields / shapes could easily be factorized (e.g extended_bounds and hard_bounds are the same TS type in AggregationContainer), but I'd rather do that later when we'll get some feedback on the usability of the API.

Comment on lines +112 to +120
} else if (ast.type === 'literal' && ast.value && typeof ast.value === 'string') {
const key = ast.value.replace('.attributes', '');
const mappingKey = 'properties.' + key.split('.').join('.properties.');
const field = get(indexMapping, mappingKey);
if (field != null && field.type === 'nested') {
localNestedKeys = ast.value;
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Quite out of the scope of the main goal of the PR, but the initial PR was also fixing #81009 via this change, so I kept it.

Tell me if we want to properly extract this change to its own PR instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

it is just a little bundle!

Comment on lines +60 to +67
export const isObjectTypeAttribute = (
attributePath: string,
indexMapping: IndexMapping,
allowedTypes: string[]
): boolean => {
const error = hasFilterKeyError(attributePath, allowedTypes, indexMapping);
return error == null;
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The logic behind that function is quite complex, and was already implemented for KQL filters. However it did not want to directly use hasFilterKeyError in the higher-level validation, so I wrapped it and added specific unit tests, in case we need to change the underlying implementation.

Same goes with isRootLevelAttribute and the call to fieldDefined

Comment on lines +176 to +177
export interface SavedObjectsFindResponse<T = unknown, A = unknown> {
aggregations?: A;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can't (at least easily) change SavedObjectsFindResponse to have the aggregations property only defined when the aggs input parameter was provided.

The initial PR defined it as an optional property. I wonder if having the property always present and populating it with {} when no aggs input is provided wouldn't be a better developer experience, as atm any usage of response.aggregations requires to check for existence or use !. OTOH removing the optional nature of the property may force to adapt a lot of test code returning 'mock' responses. wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

My 2cents: I would aim for a better DX. But there's already a lot going on in this PR. We can do follow-ups to improve the typing logic.

Comment on lines +137 to +138
*
* @alpha
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Original PR flagged the option with @alpha. I don't think we're using that elsewhere in core, especially on an option instead of an API. Should we keep it, or should we just document the aggs option as experimental?

Copy link
Member

Choose a reason for hiding this comment

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

I dont mind the @alpha tag but IMO we should document the option as experimental regardless

Comment on lines +297 to +308
it('should return 200 with valid response for a valid aggregation', async () =>
await supertest
.get(
`/api/saved_objects/_find?type=visualization&per_page=0&aggs=${encodeURIComponent(
JSON.stringify({
type_count: { max: { field: 'visualization.attributes.version' } },
})
)}`
)
.expect(200)
.then((resp) => {
expect(resp.body).to.eql({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wasn't sure if it made sense to add too much api integration tests, as the feature is already correctly unit tested and as there is a thin line between testing the feature and testing the ES aggregation API. Tell me if you see tests I should be adding here.

Comment on lines +38 to +43
export const validateAndConvertAggregations = (
allowedTypes: string[],
aggs: Record<string, estypes.AggregationContainer>,
indexMapping: IndexMapping
): Record<string, estypes.AggregationContainer> => {
return validateAggregations(aggs, {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please have as much fun reviewing this file as I did writing it. (and no, I did NOT use a pure visitor pattern here, the aggrRecord / aggrStructure two stages validation is way easier to both understand and maintain)

@pgayvallet pgayvallet marked this pull request as ready for review April 8, 2021 09:14
@pgayvallet pgayvallet requested review from a team as code owners April 8, 2021 09:14
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

Copy link
Member

@azasypkin azasypkin left a comment

Choose a reason for hiding this comment

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

Changes in Security team owned SO wrappers LGTM, code-review only. Thanks!

@afharo afharo self-requested a review April 9, 2021 16:30
Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

What an amazing effort! I see you had fun there! I added a few NITs. Feel free to dismiss them :)

Comment on lines +176 to +177
export interface SavedObjectsFindResponse<T = unknown, A = unknown> {
aggregations?: A;
Copy link
Member

Choose a reason for hiding this comment

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

My 2cents: I would aim for a better DX. But there's already a lot going on in this PR. We can do follow-ups to improve the typing logic.

@afharo afharo requested a review from a team April 9, 2021 16:31
Copy link
Member

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

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

LGTM

@pgayvallet pgayvallet merged commit 106afd4 into elastic:master Apr 16, 2021
pgayvallet added a commit to pgayvallet/kibana that referenced this pull request Apr 16, 2021
* step 1 to add aggs in the find function of saved object

* setp 2 - add specific unit test to aggs + fix bug found during integrations

* step 3 - add security api_integration arounds aggs

* fix types

* unit test added for aggs_utils

* add documentation

* fix docs

* review I

* doc

* try to fix test

* add the new property to the saved object globaltype

* fix types

* delete old files

* fix types + test api integration

* type fix + test

* Update src/core/server/saved_objects/types.ts

Co-authored-by: Rudolf Meijering <[email protected]>

* review I

* change our validation to match discussion with Pierre and Rudolph

* Validate multiple items nested filter query through KueryNode

* remove unused import

* review + put back test

* migrate added tests to new TS file

* fix documentation

* fix license header

* move stuff

* duplicating test mappings

* rename some stuff

* move ALL the things

* cast to aggregation container

* update generated doc

* add deep nested validation

* rewrite the whole validation mechanism

* some cleanup

* minor cleanup

* update generated doc

* adapt telemetry client

* fix API integ tests

* fix doc

* TOTO-less

* remove xpack tests

* list supported / unsupported aggregations

* typo fix

* extract some validation function

* fix indent

* add some unit tests

* adapt FTR assertions

* update doc

* fix doc

* doc again

* cleanup test names

* improve tsdoc on validation functions

* perf nit

Co-authored-by: Xavier Mouligneau <[email protected]>
Co-authored-by: Rudolf Meijering <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
pgayvallet added a commit that referenced this pull request Apr 16, 2021
* step 1 to add aggs in the find function of saved object

* setp 2 - add specific unit test to aggs + fix bug found during integrations

* step 3 - add security api_integration arounds aggs

* fix types

* unit test added for aggs_utils

* add documentation

* fix docs

* review I

* doc

* try to fix test

* add the new property to the saved object globaltype

* fix types

* delete old files

* fix types + test api integration

* type fix + test

* Update src/core/server/saved_objects/types.ts

Co-authored-by: Rudolf Meijering <[email protected]>

* review I

* change our validation to match discussion with Pierre and Rudolph

* Validate multiple items nested filter query through KueryNode

* remove unused import

* review + put back test

* migrate added tests to new TS file

* fix documentation

* fix license header

* move stuff

* duplicating test mappings

* rename some stuff

* move ALL the things

* cast to aggregation container

* update generated doc

* add deep nested validation

* rewrite the whole validation mechanism

* some cleanup

* minor cleanup

* update generated doc

* adapt telemetry client

* fix API integ tests

* fix doc

* TOTO-less

* remove xpack tests

* list supported / unsupported aggregations

* typo fix

* extract some validation function

* fix indent

* add some unit tests

* adapt FTR assertions

* update doc

* fix doc

* doc again

* cleanup test names

* improve tsdoc on validation functions

* perf nit

Co-authored-by: Xavier Mouligneau <[email protected]>
Co-authored-by: Rudolf Meijering <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Xavier Mouligneau <[email protected]>
Co-authored-by: Rudolf Meijering <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Copy link
Contributor

@rudolf rudolf left a comment

Choose a reason for hiding this comment

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

I'm late to the party, but tested it and it works great!

@kibanamachine
Copy link
Contributor

kibanamachine commented Apr 16, 2021

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / general / X-Pack API Integration Tests.x-pack/test/api_integration/apis/security_solution/feature_controls·ts.apis SecuritySolution Endpoints feature controls APIs can't be accessed by user with dashboard "all" privileges

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook in "apis"
[00:06:04]           └-: SecuritySolution Endpoints
[00:06:04]             └-> "before all" hook in "SecuritySolution Endpoints"
[00:07:15]             └-: feature controls
[00:07:15]               └-> "before all" hook for "APIs can't be accessed by user with no privileges"
[00:07:15]               └-> APIs can't be accessed by user with no privileges
[00:07:15]                 └-> "before each" hook: global before each for "APIs can't be accessed by user with no privileges"
[00:07:15]                 │ debg creating role logstash_read
[00:07:15]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] added role [logstash_read]
[00:07:15]                 │ debg creating user logstash_read
[00:07:15]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] added user [logstash_read]
[00:07:15]                 │ debg created user logstash_read
[00:07:15]                 │ proc [kibana]   log   [13:46:17.559] [warning][api-authorization][plugins][security] User not authorized for "/api/solutions/security/graphql": responding with 403
[00:07:15]                 │ debg deleting role logstash_read
[00:07:15]                 │ debg deleting user logstash_read
[00:07:15]                 │ debg deleted user logstash_read
[00:07:15]                 └- ✓ pass  (371ms) "apis SecuritySolution Endpoints feature controls APIs can't be accessed by user with no privileges"
[00:07:15]               └-> APIs can be accessed user with global "all" privileges
[00:07:15]                 └-> "before each" hook: global before each for "APIs can be accessed user with global "all" privileges"
[00:07:15]                 │ debg creating role global_all
[00:07:15]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] added role [global_all]
[00:07:15]                 │ debg creating user global_all
[00:07:15]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] added user [global_all]
[00:07:15]                 │ debg created user global_all
[00:07:16]                 │ debg deleting role global_all
[00:07:16]                 │ debg deleting user global_all
[00:07:16]                 │ debg deleted user global_all
[00:07:16]                 └- ✓ pass  (441ms) "apis SecuritySolution Endpoints feature controls APIs can be accessed user with global "all" privileges"
[00:07:16]               └-> APIs can't be accessed by user with dashboard "all" privileges
[00:07:16]                 └-> "before each" hook: global before each for "APIs can't be accessed by user with dashboard "all" privileges"
[00:07:16]                 │ debg creating role dashboard_all
[00:07:16]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] added role [dashboard_all]
[00:07:16]                 │ debg creating user dashboard_all
[00:07:16]                 │ info java.lang.OutOfMemoryError: Java heap space
[00:07:16]                 │      Dumping heap to data/java_pid191947.hprof ...
[00:07:17]                 │ info Heap dump file created [675145353 bytes in 1.349 secs]
[00:07:18]                 │ info [o.e.b.ElasticsearchUncaughtExceptionHandler] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] fatal error in thread [elasticsearch[kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811][system_read][T#1]], exiting
[00:07:18]                 │      java.lang.OutOfMemoryError: Java heap space
[00:07:18]                 │      	at java.util.Arrays.copyOf(Arrays.java:3536) ~[?:?]
[00:07:18]                 │      	at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:100) ~[?:?]
[00:07:18]                 │      	at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:130) ~[?:?]
[00:07:18]                 │      	at com.fasterxml.jackson.core.json.UTF8JsonGenerator._flushBuffer(UTF8JsonGenerator.java:2137) ~[jackson-core-2.10.4.jar:2.10.4]
[00:07:18]                 │      	at com.fasterxml.jackson.core.json.UTF8JsonGenerator._writeStringSegments(UTF8JsonGenerator.java:1279) ~[jackson-core-2.10.4.jar:2.10.4]
[00:07:18]                 │      	at com.fasterxml.jackson.core.json.UTF8JsonGenerator.writeString(UTF8JsonGenerator.java:502) ~[jackson-core-2.10.4.jar:2.10.4]
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.json.JsonXContentGenerator.writeString(JsonXContentGenerator.java:270) ~[elasticsearch-x-content-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.value(XContentBuilder.java:703) ~[elasticsearch-x-content-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.lambda$static$14(XContentBuilder.java:112) ~[elasticsearch-x-content-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder$$Lambda$49/0x0000000800c2e550.write(Unknown Source) ~[?:?]
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:860) ~[elasticsearch-x-content-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:940) ~[elasticsearch-x-content-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:915) ~[elasticsearch-x-content-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.action.index.IndexRequest.source(IndexRequest.java:360) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.action.update.UpdateRequest.doc(UpdateRequest.java:625) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.xpack.core.async.AsyncTaskIndexService.updateResponse(AsyncTaskIndexService.java:209) ~[?:?]
[00:07:18]                 │      	at org.elasticsearch.xpack.search.TransportSubmitAsyncSearchAction.onFinalResponse(TransportSubmitAsyncSearchAction.java:178) ~[?:?]
[00:07:18]                 │      	at org.elasticsearch.xpack.search.TransportSubmitAsyncSearchAction$1$1.lambda$onResponse$1(TransportSubmitAsyncSearchAction.java:102) ~[?:?]
[00:07:18]                 │      	at org.elasticsearch.xpack.search.TransportSubmitAsyncSearchAction$1$1$$Lambda$7189/0x0000000801b8d660.accept(Unknown Source) ~[?:?]
[00:07:18]                 │      	at org.elasticsearch.xpack.search.AsyncSearchTask.executeCompletionListeners(AsyncSearchTask.java:308) ~[?:?]
[00:07:18]                 │      	at org.elasticsearch.xpack.search.AsyncSearchTask$Listener.onResponse(AsyncSearchTask.java:441) ~[?:?]
[00:07:18]                 │      	at org.elasticsearch.xpack.search.AsyncSearchTask$Listener.onResponse(AsyncSearchTask.java:365) ~[?:?]
[00:07:18]                 │      	at org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:31) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$applyInternal$2(SecurityActionFilter.java:163) ~[?:?]
[00:07:18]                 │      	at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter$$Lambda$5080/0x000000080180ef38.accept(Unknown Source) ~[?:?]
[00:07:18]                 │      	at org.elasticsearch.action.ActionListener$DelegatingFailureActionListener.onResponse(ActionListener.java:217) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.action.ActionListener$RunAfterActionListener.onResponse(ActionListener.java:339) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.sendSearchResponse(AbstractSearchAsyncAction.java:657) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.action.search.ExpandSearchPhase.run(ExpandSearchPhase.java:109) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:424) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:418) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │      	at org.elasticsearch.action.search.FetchSearchPhase.moveToNextPhase(FetchSearchPhase.java:219) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:18]                 │ERROR fatal error in thread [elasticsearch[kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811][system_read][T#1]], exiting
[00:07:18]                 │      
[00:07:18]                 │ERROR java.lang.OutOfMemoryError: Java heap space
[00:07:18]                 │      	at java.base/java.util.Arrays.copyOf(Arrays.java:3536)
[00:07:18]                 │      	at java.base/java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:100)
[00:07:18]                 │      	at java.base/java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:130)
[00:07:18]                 │      	at com.fasterxml.jackson.core.json.UTF8JsonGenerator._flushBuffer(UTF8JsonGenerator.java:2137)
[00:07:18]                 │      	at com.fasterxml.jackson.core.json.UTF8JsonGenerator._writeStringSegments(UTF8JsonGenerator.java:1279)
[00:07:18]                 │      	at com.fasterxml.jackson.core.json.UTF8JsonGenerator.writeString(UTF8JsonGenerator.java:502)
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.json.JsonXContentGenerator.writeString(JsonXContentGenerator.java:270)
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.value(XContentBuilder.java:703)
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.lambda$static$14(XContentBuilder.java:112)
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder$$Lambda$49/0x0000000800c2e550.write(Unknown Source)
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:860)
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:940)
[00:07:18]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:915)
[00:07:18]                 │      	at org.elasticsearch.action.index.IndexRequest.source(IndexRequest.java:360)
[00:07:18]                 │      	at org.elasticsearch.action.update.UpdateRequest.doc(UpdateRequest.java:625)
[00:07:18]                 │      	at org.elasticsearch.xpack.core.async.AsyncTaskIndexService.updateResponse(AsyncTaskIndexService.java:209)
[00:07:18]                 │      	at org.elasticsearch.xpack.search.TransportSubmitAsyncSearchAction.onFinalResponse(TransportSubmitAsyncSearchAction.java:178)
[00:07:18]                 │      	at org.elasticsearch.xpack.search.TransportSubmitAsyncSearchAction$1$1.lambda$onResponse$1(TransportSubmitAsyncSearchAction.java:102)
[00:07:18]                 │      	at org.elasticsearch.xpack.search.TransportSubmitAsyncSearchAction$1$1$$Lambda$7189/0x0000000801b8d660.accept(Unknown Source)
[00:07:18]                 │      	at org.elasticsearch.xpack.search.AsyncSearchTask.executeCompletionListeners(AsyncSearchTask.java:308)
[00:07:18]                 │      	at org.elasticsearch.xpack.search.AsyncSearchTask$Listener.onResponse(AsyncSearchTask.java:441)
[00:07:18]                 │      	at org.elasticsearch.xpack.search.AsyncSearchTask$Listener.onResponse(AsyncSearchTask.java:365)
[00:07:18]                 │      	at org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:31)
[00:07:18]                 │      	at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$applyInternal$2(SecurityActionFilter.java:163)
[00:07:18]                 │      	at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter$$Lambda$5080/0x000000080180ef38.accept(Unknown Source)
[00:07:18]                 │      	at org.elasticsearch.action.ActionListener$DelegatingFailureActionListener.onResponse(ActionListener.java:217)
[00:07:18]                 │      	at org.elasticsearch.action.ActionListener$RunAfterActionListener.onResponse(ActionListener.java:339)
[00:07:18]                 │      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.sendSearchResponse(AbstractSearchAsyncAction.java:657)
[00:07:18]                 │      	at org.elasticsearch.action.search.ExpandSearchPhase.run(ExpandSearchPhase.java:109)
[00:07:18]                 │      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:424)
[00:07:18]                 │      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:418)
[00:07:18]                 │      	at org.elasticsearch.action.search.FetchSearchPhase.moveToNextPhase(FetchSearchPhase.java:219)
[00:07:18]                 │      
[00:07:18]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] added user [dashboard_all]
[00:07:18]                 │ debg created user dashboard_all
[00:07:18]                 │ proc [kibana]   log   [13:46:20.410] [info][authentication][plugins][security] Authentication attempt failed: socket hang up
[00:07:18]                 │ proc [kibana]   log   [13:46:20.415] [error][elasticsearch] Request error, retrying
[00:07:18]                 │ proc [kibana] GET http://localhost:6182/_xpack?accept_enterprise=true => socket hang up
[00:07:18]                 │ proc [kibana]   log   [13:46:20.416] [warning][elasticsearch] Unable to revive connection: http://localhost:6182/
[00:07:18]                 │ proc [kibana]   log   [13:46:20.416] [warning][elasticsearch] No living connections
[00:07:18]                 │ proc [kibana]   log   [13:46:20.416] [warning][licensing][plugins] License information could not be obtained from Elasticsearch due to Error: No Living connections error
[00:07:18]                 │ proc [kibana]   log   [13:46:20.420] [info][plugins][searchprofiler] You cannot use searchprofiler because license information is not available at this time.
[00:07:18]                 │ proc [kibana]   log   [13:46:20.420] [info][painlessLab][plugins] You cannot use painlessLab because license information is not available at this time.
[00:07:18]                 │ proc [kibana]   log   [13:46:20.424] [info][plugins][snapshotRestore] You cannot use snapshot_restore because license information is not available at this time.
[00:07:18]                 │ proc [kibana]   log   [13:46:20.424] [info][indexManagement][plugins] You cannot use index_management because license information is not available at this time.
[00:07:18]                 │ proc [kibana]   log   [13:46:20.424] [info][plugins][rollup] You cannot use rollup because license information is not available at this time.
[00:07:18]                 │ proc [kibana]   log   [13:46:20.424] [info][plugins][remoteClusters] You cannot use Remote Clusters because license information is not available at this time.
[00:07:18]                 │ proc [kibana]   log   [13:46:20.424] [info][indexLifecycleManagement][plugins] You cannot use index_lifecycle_management because license information is not available at this time.
[00:07:18]                 │ proc [kibana]   log   [13:46:20.425] [info][plugins][transform] You cannot use transform because license information is not available at this time.
[00:07:18]                 │ proc [kibana]   log   [13:46:20.425] [info][ingestPipelines][plugins] You cannot use ingest_pipelines because license information is not available at this time.
[00:07:18]                 │ proc [kibana]   log   [13:46:20.434] [info][kibana-monitoring][monitoring][monitoring][plugins] Monitoring status upload endpoint is not enabled in Elasticsearch:Monitoring stats collection is stopped
[00:07:18]                 │ debg deleting role dashboard_all
[00:07:18]                 │ proc [kibana]   log   [13:46:20.447] [warning][plugins][securitySolution] Unable to verify endpoint policies in line with license change: failed to fetch package policies: connect ECONNREFUSED 127.0.0.1:6182
[00:07:19]                 │ proc [kibana]   log   [13:46:20.882] [error][savedobjects-service] Unable to retrieve version information from Elasticsearch nodes.
[00:07:19]                 │ proc [kibana]   log   [13:46:20.888] [error][authentication][plugins][security] License is not available, authentication is not possible.
[00:07:19]                 │ proc [kibana]   log   [13:46:20.891] [warning][elasticsearch] Unable to revive connection: http://localhost:6182/
[00:07:19]                 │ proc [kibana]   log   [13:46:20.892] [warning][elasticsearch] No living connections
[00:07:19]                 │ proc [kibana]   log   [13:46:20.892] [warning][licensing][plugins] License information could not be obtained from Elasticsearch due to Error: No Living connections error
[00:07:19]                 └- ✖ fail: apis SecuritySolution Endpoints feature controls APIs can't be accessed by user with dashboard "all" privileges
[00:07:19]                 │      Error: Request failed with status code 503
[00:07:19]                 │       at createError (/dev/shm/workspace/parallel/8/kibana/node_modules/axios/lib/core/createError.js:16:15)
[00:07:19]                 │       at settle (/dev/shm/workspace/parallel/8/kibana/node_modules/axios/lib/core/settle.js:17:12)
[00:07:19]                 │       at IncomingMessage.handleStreamEnd (/dev/shm/workspace/parallel/8/kibana/node_modules/axios/lib/adapters/http.js:260:11)
[00:07:19]                 │       at endReadableNT (internal/streams/readable.js:1327:12)
[00:07:19]                 │       at processTicksAndRejections (internal/process/task_queues.js:80:21)
[00:07:19]                 │ 
[00:07:19]                 │ 

Stack Trace

Error: Request failed with status code 503
    at createError (/dev/shm/workspace/parallel/8/kibana/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/dev/shm/workspace/parallel/8/kibana/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/dev/shm/workspace/parallel/8/kibana/node_modules/axios/lib/adapters/http.js:260:11)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  config: {
    url: 'http://elastic:changeme@localhost:6181/api/security/role/dashboard_all',
    method: 'delete',
    headers: {
      Accept: 'application/json, text/plain, */*',
      'kbn-xsrf': 'kbn-client',
      'User-Agent': 'axios/0.21.1'
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    paramsSerializer: [Function: paramsSerializer],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    httpsAgent: null,
    validateStatus: [Function: validateStatus],
    data: undefined
  },
  request: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      socket: [Function (anonymous)],
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      timeout: [Function (anonymous)],
      prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: true,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    socket: Socket {
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'localhost',
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 6,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: null,
      _server: null,
      parser: null,
      _httpMessage: [Circular *1],
      write: [Function: writeAfterFIN],
      [Symbol(async_id_symbol)]: 2339280,
      [Symbol(kHandle)]: null,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 477,
      [Symbol(kBytesWritten)]: 231,
      [Symbol(RequestTimeout)]: undefined
    },
    _header: 'DELETE /api/security/role/dashboard_all HTTP/1.1\r\n' +
      'Accept: application/json, text/plain, */*\r\n' +
      'kbn-xsrf: kbn-client\r\n' +
      'User-Agent: axios/0.21.1\r\n' +
      'Host: localhost:6181\r\n' +
      'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: noopPendingOutput],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 80,
      protocol: 'http:',
      options: [Object],
      requests: {},
      sockets: {},
      freeSockets: {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'fifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 0,
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'DELETE',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/api/security/role/dashboard_all',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      socket: [Socket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      headers: [Object],
      rawHeaders: [Array],
      trailers: {},
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 503,
      statusMessage: 'Service Unavailable',
      client: [Socket],
      _consuming: false,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'http://elastic:changeme@localhost:6181/api/security/role/dashboard_all',
      redirects: [],
      [Symbol(kCapture)]: false,
      [Symbol(RequestTimeout)]: undefined
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'localhost',
    protocol: 'http:',
    _redirectable: Writable {
      _writableState: [WritableState],
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 0,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'http://elastic:changeme@localhost:6181/api/security/role/dashboard_all',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'kbn-xsrf': [Array],
      'user-agent': [Array],
      host: [Array],
      authorization: [Array]
    }
  },
  response: {
    status: 503,
    statusText: 'Service Unavailable',
    headers: {
      'retry-after': '30',
      'kbn-name': 'kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811',
      'kbn-license-sig': '3f2fbe2e7dffe9936f647deadcb18d812ffbb4f02c27cd5d8ed8069fef195573',
      'content-type': 'application/json; charset=utf-8',
      'cache-control': 'private, no-cache, no-store, must-revalidate',
      'content-length': '86',
      date: 'Fri, 16 Apr 2021 13:46:20 GMT',
      connection: 'close'
    },
    config: {
      url: 'http://elastic:changeme@localhost:6181/api/security/role/dashboard_all',
      method: 'delete',
      headers: [Object],
      transformRequest: [Array],
      transformResponse: [Array],
      paramsSerializer: [Function: paramsSerializer],
      timeout: 0,
      adapter: [Function: httpAdapter],
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      httpsAgent: null,
      validateStatus: [Function: validateStatus],
      data: undefined
    },
    request: <ref *1> ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      socket: [Socket],
      _header: 'DELETE /api/security/role/dashboard_all HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'kbn-xsrf: kbn-client\r\n' +
        'User-Agent: axios/0.21.1\r\n' +
        'Host: localhost:6181\r\n' +
        'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: noopPendingOutput],
      agent: [Agent],
      socketPath: undefined,
      method: 'DELETE',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/api/security/role/dashboard_all',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'localhost',
      protocol: 'http:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    data: {
      statusCode: 503,
      error: 'Service Unavailable',
      message: 'License is not available.'
    }
  },
  isAxiosError: true,
  toJSON: [Function: toJSON]
}

Kibana Pipeline / general / X-Pack API Integration Tests.x-pack/test/api_integration/apis/security_solution/feature_controls·ts.apis SecuritySolution Endpoints feature controls APIs can't be accessed by user with dashboard "all" privileges

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook in "apis"
[00:06:15]           └-: SecuritySolution Endpoints
[00:06:15]             └-> "before all" hook in "SecuritySolution Endpoints"
[00:07:30]             └-: feature controls
[00:07:30]               └-> "before all" hook for "APIs can't be accessed by user with no privileges"
[00:07:30]               └-> APIs can't be accessed by user with no privileges
[00:07:30]                 └-> "before each" hook: global before each for "APIs can't be accessed by user with no privileges"
[00:07:30]                 │ debg creating role logstash_read
[00:07:30]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] added role [logstash_read]
[00:07:30]                 │ debg creating user logstash_read
[00:07:30]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] added user [logstash_read]
[00:07:30]                 │ debg created user logstash_read
[00:07:30]                 │ proc [kibana]   log   [13:24:32.980] [warning][api-authorization][plugins][security] User not authorized for "/api/solutions/security/graphql": responding with 403
[00:07:30]                 │ debg deleting role logstash_read
[00:07:30]                 │ debg deleting user logstash_read
[00:07:30]                 │ debg deleted user logstash_read
[00:07:30]                 └- ✓ pass  (371ms) "apis SecuritySolution Endpoints feature controls APIs can't be accessed by user with no privileges"
[00:07:30]               └-> APIs can be accessed user with global "all" privileges
[00:07:30]                 └-> "before each" hook: global before each for "APIs can be accessed user with global "all" privileges"
[00:07:30]                 │ debg creating role global_all
[00:07:30]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] added role [global_all]
[00:07:30]                 │ debg creating user global_all
[00:07:31]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] added user [global_all]
[00:07:31]                 │ debg created user global_all
[00:07:31]                 │ info [o.e.m.j.JvmGcMonitorService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] [gc][477] overhead, spent [379ms] collecting in the last [1s]
[00:07:31]                 │ debg deleting role global_all
[00:07:31]                 │ debg deleting user global_all
[00:07:31]                 │ debg deleted user global_all
[00:07:31]                 └- ✓ pass  (717ms) "apis SecuritySolution Endpoints feature controls APIs can be accessed user with global "all" privileges"
[00:07:31]               └-> APIs can't be accessed by user with dashboard "all" privileges
[00:07:31]                 └-> "before each" hook: global before each for "APIs can't be accessed by user with dashboard "all" privileges"
[00:07:31]                 │ debg creating role dashboard_all
[00:07:31]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] added role [dashboard_all]
[00:07:31]                 │ debg creating user dashboard_all
[00:07:32]                 │ info java.lang.OutOfMemoryError: Java heap space
[00:07:32]                 │      Dumping heap to data/java_pid132402.hprof ...
[00:07:33]                 │ info Heap dump file created [682454299 bytes in 1.362 secs]
[00:07:33]                 │ info [o.e.b.ElasticsearchUncaughtExceptionHandler] [kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811] fatal error in thread [elasticsearch[kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811][system_read][T#1]], exiting
[00:07:33]                 │      java.lang.OutOfMemoryError: Java heap space
[00:07:33]                 │      	at java.util.Arrays.copyOf(Arrays.java:3536) ~[?:?]
[00:07:33]                 │      	at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:100) ~[?:?]
[00:07:33]                 │      	at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:130) ~[?:?]
[00:07:33]                 │      	at com.fasterxml.jackson.core.json.UTF8JsonGenerator._flushBuffer(UTF8JsonGenerator.java:2137) ~[jackson-core-2.10.4.jar:2.10.4]
[00:07:33]                 │      	at com.fasterxml.jackson.core.json.UTF8JsonGenerator._writeStringSegments(UTF8JsonGenerator.java:1279) ~[jackson-core-2.10.4.jar:2.10.4]
[00:07:33]                 │      	at com.fasterxml.jackson.core.json.UTF8JsonGenerator.writeString(UTF8JsonGenerator.java:502) ~[jackson-core-2.10.4.jar:2.10.4]
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.json.JsonXContentGenerator.writeString(JsonXContentGenerator.java:270) ~[elasticsearch-x-content-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.value(XContentBuilder.java:703) ~[elasticsearch-x-content-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.lambda$static$14(XContentBuilder.java:112) ~[elasticsearch-x-content-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder$$Lambda$49/0x0000000800c2e550.write(Unknown Source) ~[?:?]
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:860) ~[elasticsearch-x-content-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:940) ~[elasticsearch-x-content-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:915) ~[elasticsearch-x-content-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.action.index.IndexRequest.source(IndexRequest.java:360) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.action.update.UpdateRequest.doc(UpdateRequest.java:625) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.xpack.core.async.AsyncTaskIndexService.updateResponse(AsyncTaskIndexService.java:209) ~[?:?]
[00:07:33]                 │      	at org.elasticsearch.xpack.search.TransportSubmitAsyncSearchAction.onFinalResponse(TransportSubmitAsyncSearchAction.java:178) ~[?:?]
[00:07:33]                 │      	at org.elasticsearch.xpack.search.TransportSubmitAsyncSearchAction$1$1.lambda$onResponse$1(TransportSubmitAsyncSearchAction.java:102) ~[?:?]
[00:07:33]                 │      	at org.elasticsearch.xpack.search.TransportSubmitAsyncSearchAction$1$1$$Lambda$7248/0x0000000801b95660.accept(Unknown Source) ~[?:?]
[00:07:33]                 │      	at org.elasticsearch.xpack.search.AsyncSearchTask.executeCompletionListeners(AsyncSearchTask.java:308) ~[?:?]
[00:07:33]                 │      	at org.elasticsearch.xpack.search.AsyncSearchTask$Listener.onResponse(AsyncSearchTask.java:441) ~[?:?]
[00:07:33]                 │      	at org.elasticsearch.xpack.search.AsyncSearchTask$Listener.onResponse(AsyncSearchTask.java:365) ~[?:?]
[00:07:33]                 │      	at org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:31) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$applyInternal$2(SecurityActionFilter.java:163) ~[?:?]
[00:07:33]                 │      	at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter$$Lambda$5080/0x0000000801830470.accept(Unknown Source) ~[?:?]
[00:07:33]                 │      	at org.elasticsearch.action.ActionListener$DelegatingFailureActionListener.onResponse(ActionListener.java:217) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.action.ActionListener$RunAfterActionListener.onResponse(ActionListener.java:339) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.sendSearchResponse(AbstractSearchAsyncAction.java:657) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.action.search.ExpandSearchPhase.run(ExpandSearchPhase.java:109) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:424) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:418) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │      	at org.elasticsearch.action.search.FetchSearchPhase.moveToNextPhase(FetchSearchPhase.java:219) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[00:07:33]                 │ERROR fatal error in thread [elasticsearch[kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811][system_read][T#1]], exiting
[00:07:33]                 │      java.lang.OutOfMemoryError: Java heap space
[00:07:33]                 │      	at java.base/java.util.Arrays.copyOf(Arrays.java:3536)
[00:07:33]                 │      	at java.base/java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:100)
[00:07:33]                 │      	at java.base/java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:130)
[00:07:33]                 │      	at com.fasterxml.jackson.core.json.UTF8JsonGenerator._flushBuffer(UTF8JsonGenerator.java:2137)
[00:07:33]                 │      	at com.fasterxml.jackson.core.json.UTF8JsonGenerator._writeStringSegments(UTF8JsonGenerator.java:1279)
[00:07:33]                 │      	at com.fasterxml.jackson.core.json.UTF8JsonGenerator.writeString(UTF8JsonGenerator.java:502)
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.json.JsonXContentGenerator.writeString(JsonXContentGenerator.java:270)
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.value(XContentBuilder.java:703)
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.lambda$static$14(XContentBuilder.java:112)
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder$$Lambda$49/0x0000000800c2e550.write(Unknown Source)
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.unknownValue(XContentBuilder.java:860)
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:940)
[00:07:33]                 │      	at org.elasticsearch.common.xcontent.XContentBuilder.map(XContentBuilder.java:915)
[00:07:33]                 │      	at org.elasticsearch.action.index.IndexRequest.source(IndexRequest.java:360)
[00:07:33]                 │      	at org.elasticsearch.action.update.UpdateRequest.doc(UpdateRequest.java:625)
[00:07:33]                 │      	at org.elasticsearch.xpack.core.async.AsyncTaskIndexService.updateResponse(AsyncTaskIndexService.java:209)
[00:07:33]                 │      	at org.elasticsearch.xpack.search.TransportSubmitAsyncSearchAction.onFinalResponse(TransportSubmitAsyncSearchAction.java:178)
[00:07:33]                 │      	at org.elasticsearch.xpack.search.TransportSubmitAsyncSearchAction$1$1.lambda$onResponse$1(TransportSubmitAsyncSearchAction.java:102)
[00:07:33]                 │      	at org.elasticsearch.xpack.search.TransportSubmitAsyncSearchAction$1$1$$Lambda$7248/0x0000000801b95660.accept(Unknown Source)
[00:07:33]                 │      	at org.elasticsearch.xpack.search.AsyncSearchTask.executeCompletionListeners(AsyncSearchTask.java:308)
[00:07:33]                 │      	at org.elasticsearch.xpack.search.AsyncSearchTask$Listener.onResponse(AsyncSearchTask.java:441)
[00:07:33]                 │      	at org.elasticsearch.xpack.search.AsyncSearchTask$Listener.onResponse(AsyncSearchTask.java:365)
[00:07:33]                 │      	at org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:31)
[00:07:33]                 │      	at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$applyInternal$2(SecurityActionFilter.java:163)
[00:07:33]                 │      	at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter$$Lambda$5080/0x0000000801830470.accept(Unknown Source)
[00:07:33]                 │      	at org.elasticsearch.action.ActionListener$DelegatingFailureActionListener.onResponse(ActionListener.java:217)
[00:07:33]                 │      	at org.elasticsearch.action.ActionListener$RunAfterActionListener.onResponse(ActionListener.java:339)
[00:07:33]                 │      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.sendSearchResponse(AbstractSearchAsyncAction.java:657)
[00:07:33]                 │      	at org.elasticsearch.action.search.ExpandSearchPhase.run(ExpandSearchPhase.java:109)
[00:07:33]                 │      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.executePhase(AbstractSearchAsyncAction.java:424)
[00:07:33]                 │      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:418)
[00:07:33]                 │      	at org.elasticsearch.action.search.FetchSearchPhase.moveToNextPhase(FetchSearchPhase.java:219)
[00:07:33]                 │      
[00:07:34]                 │ proc [kibana]   log   [13:24:36.111] [error][elasticsearch] Request error, retrying
[00:07:34]                 │ proc [kibana] GET http://localhost:6182/_xpack?accept_enterprise=true => socket hang up
[00:07:34]                 │ proc [kibana]   log   [13:24:36.116] [warning][elasticsearch] Unable to revive connection: http://localhost:6182/
[00:07:34]                 │ proc [kibana]   log   [13:24:36.116] [warning][elasticsearch] No living connections
[00:07:34]                 │ proc [kibana]   log   [13:24:36.117] [warning][licensing][plugins] License information could not be obtained from Elasticsearch due to Error: No Living connections error
[00:07:34]                 │ proc [kibana]   log   [13:24:36.118] [info][plugins][searchprofiler] You cannot use searchprofiler because license information is not available at this time.
[00:07:34]                 │ proc [kibana]   log   [13:24:36.118] [info][painlessLab][plugins] You cannot use painlessLab because license information is not available at this time.
[00:07:34]                 │ proc [kibana]   log   [13:24:36.123] [info][plugins][snapshotRestore] You cannot use snapshot_restore because license information is not available at this time.
[00:07:34]                 │ proc [kibana]   log   [13:24:36.123] [info][indexManagement][plugins] You cannot use index_management because license information is not available at this time.
[00:07:34]                 │ proc [kibana]   log   [13:24:36.123] [info][plugins][rollup] You cannot use rollup because license information is not available at this time.
[00:07:34]                 │ proc [kibana]   log   [13:24:36.123] [info][plugins][remoteClusters] You cannot use Remote Clusters because license information is not available at this time.
[00:07:34]                 │ proc [kibana]   log   [13:24:36.123] [info][indexLifecycleManagement][plugins] You cannot use index_lifecycle_management because license information is not available at this time.
[00:07:34]                 │ proc [kibana]   log   [13:24:36.123] [info][plugins][transform] You cannot use transform because license information is not available at this time.
[00:07:34]                 │ proc [kibana]   log   [13:24:36.123] [info][ingestPipelines][plugins] You cannot use ingest_pipelines because license information is not available at this time.
[00:07:34]                 │ proc [kibana]   log   [13:24:36.133] [info][kibana-monitoring][monitoring][monitoring][plugins] Monitoring status upload endpoint is not enabled in Elasticsearch:Monitoring stats collection is stopped
[00:07:34]                 │ debg deleting role dashboard_all
[00:07:34]                 │ proc [kibana]  error  [13:24:33.795]  Error: Internal Server Error
[00:07:34]                 │ proc [kibana]     at HapiResponseAdapter.toError (/dev/shm/workspace/kibana-build-xpack-8/src/core/server/http/router/response_adapter.js:124:19)
[00:07:34]                 │ proc [kibana]     at HapiResponseAdapter.toHapiResponse (/dev/shm/workspace/kibana-build-xpack-8/src/core/server/http/router/response_adapter.js:78:19)
[00:07:34]                 │ proc [kibana]     at HapiResponseAdapter.handle (/dev/shm/workspace/kibana-build-xpack-8/src/core/server/http/router/response_adapter.js:73:17)
[00:07:34]                 │ proc [kibana]     at Router.handle (/dev/shm/workspace/kibana-build-xpack-8/src/core/server/http/router/router.js:164:34)
[00:07:34]                 │ proc [kibana]     at handler (/dev/shm/workspace/kibana-build-xpack-8/src/core/server/http/router/router.js:124:50)
[00:07:34]                 │ proc [kibana]     at exports.Manager.execute (/dev/shm/workspace/kibana-build-xpack-8/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
[00:07:34]                 │ proc [kibana]     at Object.internals.handler (/dev/shm/workspace/kibana-build-xpack-8/node_modules/@hapi/hapi/lib/handler.js:46:20)
[00:07:34]                 │ proc [kibana]     at exports.execute (/dev/shm/workspace/kibana-build-xpack-8/node_modules/@hapi/hapi/lib/handler.js:31:20)
[00:07:34]                 │ proc [kibana]     at Request._lifecycle (/dev/shm/workspace/kibana-build-xpack-8/node_modules/@hapi/hapi/lib/request.js:370:32)
[00:07:34]                 │ proc [kibana]     at Request._execute (/dev/shm/workspace/kibana-build-xpack-8/node_modules/@hapi/hapi/lib/request.js:279:9)
[00:07:34]                 │ proc [kibana]   log   [13:24:36.145] [warning][kibana-monitoring][monitoring][monitoring][plugins] ConnectionError: connect ECONNREFUSED 127.0.0.1:6182
[00:07:34]                 │ proc [kibana]     at ClientRequest.onError (/dev/shm/workspace/kibana-build-xpack-8/node_modules/@elastic/elasticsearch/lib/Connection.js:115:16)
[00:07:34]                 │ proc [kibana]     at ClientRequest.emit (events.js:315:20)
[00:07:34]                 │ proc [kibana]     at Socket.socketErrorListener (_http_client.js:469:9)
[00:07:34]                 │ proc [kibana]     at Socket.emit (events.js:315:20)
[00:07:34]                 │ proc [kibana]     at emitErrorNT (internal/streams/destroy.js:106:8)
[00:07:34]                 │ proc [kibana]     at emitErrorCloseNT (internal/streams/destroy.js:74:3)
[00:07:34]                 │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:80:21)
[00:07:34]                 │ proc [kibana]   log   [13:24:36.145] [warning][kibana-monitoring][monitoring][monitoring][plugins] Unable to bulk upload the stats payload to the local cluster
[00:07:34]                 │ proc [kibana]   log   [13:24:36.147] [error][plugins][taskManager] Failed to poll for work: ConnectionError: connect ECONNREFUSED 127.0.0.1:6182
[00:07:34]                 │ proc [kibana]   log   [13:24:36.149] [warning][plugins][securitySolution] Unable to verify endpoint policies in line with license change: failed to fetch package policies: connect ECONNREFUSED 127.0.0.1:6182
[00:07:34]                 │ proc [kibana]   log   [13:24:36.150] [error][authentication][plugins][security] License is not available, authentication is not possible.
[00:07:34]                 │ proc [kibana]   log   [13:24:36.152] [warning][elasticsearch] Unable to revive connection: http://localhost:6182/
[00:07:34]                 │ proc [kibana]   log   [13:24:36.152] [warning][elasticsearch] No living connections
[00:07:34]                 │ proc [kibana]   log   [13:24:36.153] [warning][licensing][plugins] License information could not be obtained from Elasticsearch due to Error: No Living connections error
[00:07:34]                 └- ✖ fail: apis SecuritySolution Endpoints feature controls APIs can't be accessed by user with dashboard "all" privileges
[00:07:34]                 │      Error: Request failed with status code 503
[00:07:34]                 │       at createError (/dev/shm/workspace/parallel/8/kibana/node_modules/axios/lib/core/createError.js:16:15)
[00:07:34]                 │       at settle (/dev/shm/workspace/parallel/8/kibana/node_modules/axios/lib/core/settle.js:17:12)
[00:07:34]                 │       at IncomingMessage.handleStreamEnd (/dev/shm/workspace/parallel/8/kibana/node_modules/axios/lib/adapters/http.js:260:11)
[00:07:34]                 │       at endReadableNT (internal/streams/readable.js:1327:12)
[00:07:34]                 │       at processTicksAndRejections (internal/process/task_queues.js:80:21)
[00:07:34]                 │ 
[00:07:34]                 │ 

Stack Trace

Error: Request failed with status code 503
    at createError (/dev/shm/workspace/parallel/8/kibana/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/dev/shm/workspace/parallel/8/kibana/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/dev/shm/workspace/parallel/8/kibana/node_modules/axios/lib/adapters/http.js:260:11)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  config: {
    url: 'http://elastic:changeme@localhost:6181/api/security/role/dashboard_all',
    method: 'delete',
    headers: {
      Accept: 'application/json, text/plain, */*',
      'kbn-xsrf': 'kbn-client',
      'User-Agent': 'axios/0.21.1'
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    paramsSerializer: [Function: paramsSerializer],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    httpsAgent: null,
    validateStatus: [Function: validateStatus],
    data: undefined
  },
  request: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      socket: [Function (anonymous)],
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      timeout: [Function (anonymous)],
      prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: true,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    socket: Socket {
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'localhost',
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 6,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: null,
      _server: null,
      parser: null,
      _httpMessage: [Circular *1],
      write: [Function: writeAfterFIN],
      [Symbol(async_id_symbol)]: 2343028,
      [Symbol(kHandle)]: null,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 477,
      [Symbol(kBytesWritten)]: 231,
      [Symbol(RequestTimeout)]: undefined
    },
    _header: 'DELETE /api/security/role/dashboard_all HTTP/1.1\r\n' +
      'Accept: application/json, text/plain, */*\r\n' +
      'kbn-xsrf: kbn-client\r\n' +
      'User-Agent: axios/0.21.1\r\n' +
      'Host: localhost:6181\r\n' +
      'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: noopPendingOutput],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 80,
      protocol: 'http:',
      options: [Object],
      requests: {},
      sockets: {},
      freeSockets: {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'fifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 0,
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'DELETE',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/api/security/role/dashboard_all',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      socket: [Socket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      headers: [Object],
      rawHeaders: [Array],
      trailers: {},
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 503,
      statusMessage: 'Service Unavailable',
      client: [Socket],
      _consuming: false,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'http://elastic:changeme@localhost:6181/api/security/role/dashboard_all',
      redirects: [],
      [Symbol(kCapture)]: false,
      [Symbol(RequestTimeout)]: undefined
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'localhost',
    protocol: 'http:',
    _redirectable: Writable {
      _writableState: [WritableState],
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 0,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'http://elastic:changeme@localhost:6181/api/security/role/dashboard_all',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'kbn-xsrf': [Array],
      'user-agent': [Array],
      host: [Array],
      authorization: [Array]
    }
  },
  response: {
    status: 503,
    statusText: 'Service Unavailable',
    headers: {
      'retry-after': '30',
      'kbn-name': 'kibana-ci-immutable-ubuntu-18-tests-xxl-1618575664998190811',
      'kbn-license-sig': '3f2fbe2e7dffe9936f647deadcb18d812ffbb4f02c27cd5d8ed8069fef195573',
      'content-type': 'application/json; charset=utf-8',
      'cache-control': 'private, no-cache, no-store, must-revalidate',
      'content-length': '86',
      date: 'Fri, 16 Apr 2021 13:24:36 GMT',
      connection: 'close'
    },
    config: {
      url: 'http://elastic:changeme@localhost:6181/api/security/role/dashboard_all',
      method: 'delete',
      headers: [Object],
      transformRequest: [Array],
      transformResponse: [Array],
      paramsSerializer: [Function: paramsSerializer],
      timeout: 0,
      adapter: [Function: httpAdapter],
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      httpsAgent: null,
      validateStatus: [Function: validateStatus],
      data: undefined
    },
    request: <ref *1> ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      socket: [Socket],
      _header: 'DELETE /api/security/role/dashboard_all HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'kbn-xsrf: kbn-client\r\n' +
        'User-Agent: axios/0.21.1\r\n' +
        'Host: localhost:6181\r\n' +
        'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: noopPendingOutput],
      agent: [Agent],
      socketPath: undefined,
      method: 'DELETE',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/api/security/role/dashboard_all',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'localhost',
      protocol: 'http:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    data: {
      statusCode: 503,
      error: 'Service Unavailable',
      message: 'License is not available.'
    }
  },
  isAxiosError: true,
  toJSON: [Function: toJSON]
}

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 381.0KB 381.0KB +92.0B
Unknown metric groups

API count

id before after diff
core 2168 2172 +4

API count missing comments

id before after diff
core 989 991 +2

History

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

jloleysens added a commit to jloleysens/kibana that referenced this pull request Apr 19, 2021
…te-legacy-es-client

* 'master' of github.com:elastic/kibana: (102 commits)
  [Exploratory view] integerate page views to exploratory view (elastic#97258)
  Fix typo in license_api_guard README name and import http server mocks from public interface (elastic#97334)
  Avoid mutating KQL query when validating it (elastic#97081)
  Add description as title on tag badge (elastic#97109)
  Remove legacy ES client usages in `home` and `xpack_legacy` (elastic#97359)
  [Fleet] Finer-grained error information from install/upgrade API (elastic#95649)
  Rule registry bundle size (elastic#97251)
  [Partial Results] Move other bucket into Search Source (elastic#96384)
  [Dashboard] Makes lens default editor for creating new panels (elastic#96181)
  skip flaky suite (elastic#97387)
  [Asset Management] Agent picker follow up (elastic#97357)
  skip flaky suite (elastic#97382)
  [Security Solutions] Fixes flake with cypress tests (elastic#97329)
  skip flaky suite (elastic#97355)
  Skip test to try and stabilize master
  minimize number of so fild asserted in tests. it creates flakines when implementation details change (elastic#97374)
  [Search Sessions] Client side search cache (elastic#92439)
  [SavedObjects] Add aggregations support (elastic#96292)
  [Reporting] Remove legacy elasticsearch client usage from the reporting plugin (elastic#97184)
  [kbnClient] fix basePath handling and export reponse type (elastic#97277)
  ...

# Conflicts:
#	x-pack/plugins/watcher/server/lib/license_pre_routing_factory/license_pre_routing_factory.ts
#	x-pack/plugins/watcher/server/plugin.ts
#	x-pack/plugins/watcher/server/routes/api/indices/register_get_route.ts
#	x-pack/plugins/watcher/server/routes/api/license/register_refresh_route.ts
#	x-pack/plugins/watcher/server/routes/api/register_list_fields_route.ts
#	x-pack/plugins/watcher/server/routes/api/register_load_history_route.ts
#	x-pack/plugins/watcher/server/routes/api/settings/register_load_route.ts
#	x-pack/plugins/watcher/server/routes/api/watch/action/register_acknowledge_route.ts
#	x-pack/plugins/watcher/server/routes/api/watch/register_activate_route.ts
#	x-pack/plugins/watcher/server/routes/api/watch/register_deactivate_route.ts
#	x-pack/plugins/watcher/server/routes/api/watch/register_delete_route.ts
#	x-pack/plugins/watcher/server/routes/api/watch/register_execute_route.ts
#	x-pack/plugins/watcher/server/routes/api/watch/register_history_route.ts
#	x-pack/plugins/watcher/server/routes/api/watch/register_load_route.ts
#	x-pack/plugins/watcher/server/routes/api/watch/register_save_route.ts
#	x-pack/plugins/watcher/server/routes/api/watch/register_visualize_route.ts
#	x-pack/plugins/watcher/server/routes/api/watches/register_delete_route.ts
#	x-pack/plugins/watcher/server/routes/api/watches/register_list_route.ts
#	x-pack/plugins/watcher/server/shared_imports.ts
#	x-pack/plugins/watcher/server/types.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Saved Objects release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Saved object filter KQL do not work with multiple nested filters
8 participants