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

[7.x] Allow integrations of hosted policies to be updated (#96705) #96799

Merged
merged 1 commit into from
Apr 12, 2021

Conversation

kibanamachine
Copy link
Contributor

Backports the following commits to 7.x:

## Summary

Remove the restriction against updating integrations on hosted policies.

I described the current behavior and asked if it should change in [1]. Based on the responses in [2] & [3] and looking back at prior discussion around hosted policies, I don't think updates should be restricted.

Adding or removing integrations is still blocked for hosted policies. Updated API tests to confirm behavior. 


[1] elastic#76843 (comment)
[2] elastic#76843 (comment)
[3] elastic#76843 (comment)

## Screenshots
<details><summary>Current behavior</summary>

<h3>Error about updating integrations of a managed policy</h3>

<img width="1208" alt="Screen Shot 2021-04-08 at 3 23 37 PM" src="https://user-images.githubusercontent.com/57655/114084750-87686880-987e-11eb-91a9-081c45dbe871.png">

<details><summary>via flow A</summary>
<img width="1223" alt="Screen Shot 2021-04-08 at 3 01 32 PM" src="https://user-images.githubusercontent.com/57655/114082826-3a839280-987c-11eb-94d0-151ae93ab523.png">

<img width="1205" alt="Screen Shot 2021-04-08 at 3 13 24 PM" src="https://user-images.githubusercontent.com/57655/114083728-5c314980-987d-11eb-92be-195d7d44c037.png">
</details>

<details><summary>via flow B</summary>
<img width="1221" alt="Screen Shot 2021-04-08 at 3 19 52 PM" src="https://user-images.githubusercontent.com/57655/114084502-3fe1dc80-987e-11eb-8879-57718586ac95.png">
<img width="1198" alt="Screen Shot 2021-04-08 at 3 20 06 PM" src="https://user-images.githubusercontent.com/57655/114084503-3fe1dc80-987e-11eb-9fa9-512210b938cd.png">
</details>

</details>

<details><summary>This PR</summary>
<h3>Successful updates using either form</h3>
<img width="1301" alt="Screen Shot 2021-04-09 at 1 21 02 PM" src="https://user-images.githubusercontent.com/57655/114219370-8f84de80-9938-11eb-9b94-dfbeb18535b2.png">
<img width="1320" alt="Screen Shot 2021-04-09 at 1 05 10 PM" src="https://user-images.githubusercontent.com/57655/114219408-9f9cbe00-9938-11eb-96d2-2918332d1539.png">

</details>


### Checklist
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor Author

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / Chrome UI Functional Tests.test/functional/apps/management/_test_huge_fields·js.management test large number of fields "before all" hook for "test_huge data should have expected number of fields"

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: management
[00:00:00]           └-> "before all" hook in "management"
[00:00:00]           └-> "before all" hook in "management"
[00:00:00]             │ info [logstash_functional] Unloading indices from "mappings.json"
[00:00:00]             │ info [logstash_functional] Unloading indices from "data.json.gz"
[00:00:01]             │ info [makelogs] Loading "mappings.json"
[00:00:01]             │ info [makelogs] Loading "data.json.gz"
[00:00:01]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] [logstash-2015.09.17] creating index, cause [api], templates [], shards [1]/[0]
[00:00:01]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.17][0]]]).
[00:00:01]             │ info [makelogs] Created index "logstash-2015.09.17"
[00:00:01]             │ debg [makelogs] "logstash-2015.09.17" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:01]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] [logstash-2015.09.18] creating index, cause [api], templates [], shards [1]/[0]
[00:00:01]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.18][0]]]).
[00:00:01]             │ info [makelogs] Created index "logstash-2015.09.18"
[00:00:01]             │ debg [makelogs] "logstash-2015.09.18" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:02]             │ info [makelogs] Indexed 101 docs into "logstash-2015.09.17"
[00:00:02]             │ info [makelogs] Indexed 301 docs into "logstash-2015.09.18"
[00:00:02]           └-: 
[00:00:02]             └-> "before all" hook in ""
[00:00:59]             └-: test large number of fields
[00:00:59]               └-> "before all" hook for "test_huge data should have expected number of fields"
[00:00:59]               └-> "before all" hook for "test_huge data should have expected number of fields"
[00:00:59]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] [.kibana_7.13.0_001/BBG3_JaiQSeLBFRXmLeb3w] deleting index
[00:00:59]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] [.kibana_pre6.5.0_001/YoRaNeVlSSmZL8BIxStBgQ] deleting index
[00:00:59]                 │ info [emptyKibanaIndex] Deleted existing index ".kibana_pre6.5.0_001"
[00:00:59]                 │ info [emptyKibanaIndex] Deleted existing index ".kibana_7.13.0_001"
[00:00:59]                 │ debg Migrating saved objects
[00:00:59]                 │ proc [kibana]   log   [15:34:47.310] [info][savedobjects-service] [.kibana] INIT -> CREATE_NEW_TARGET
[00:00:59]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] [.kibana_7.13.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:00:59]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] updating number_of_replicas to [0] for indices [.kibana_7.13.0_001]
[00:00:59]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_7.13.0_001][0]]]).
[00:00:59]                 │ proc [kibana]   log   [15:34:47.376] [info][savedobjects-service] [.kibana] CREATE_NEW_TARGET -> MARK_VERSION_INDEX_READY
[00:00:59]                 │ proc [kibana]   log   [15:34:47.401] [info][savedobjects-service] [.kibana] MARK_VERSION_INDEX_READY -> DONE
[00:00:59]                 │ proc [kibana]   log   [15:34:47.401] [info][savedobjects-service] [.kibana] Migration completed after 95ms
[00:00:59]                 │ info [emptyKibanaIndex] Created index ".kibana"
[00:00:59]                 │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC","visualization:visualize:legacyChartsLibrary":true}
[00:00:59]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] [.kibana_7.13.0_001/Vdf-wZvgQr6OZ-ZrhKKoyg] update_mapping [_doc]
[00:01:01]                 │ info [large_fields] Loading "mappings.json"
[00:01:01]                 │ info [large_fields] Loading "data.json.gz"
[00:01:01]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] [testhuge] creating index, cause [api], templates [], shards [5]/[1]
[00:01:01]                 │ info [large_fields] Created index "testhuge"
[00:01:01]                 │ debg [large_fields] "testhuge" settings {"index":{"mapping":{"total_fields":{"limit":"50000"}},"number_of_replicas":"1","number_of_shards":"5"}}
[00:01:02]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] [testhuge/Rfa9BKajSgeT3ZS7DXIHKQ] update_mapping [_doc]
[00:01:02]                 │ info [large_fields] Indexed 1 docs into "testhuge"
[00:01:02]                 │ info [o.e.i.b.HierarchyCircuitBreakerService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] attempting to trigger G1GC due to high heap usage [1034101248]
[00:01:02]                 │ info [o.e.i.b.HierarchyCircuitBreakerService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1618239895846581883] GC did not bring memory usage down, before [1034101248], after [1045839360], allocations [7], duration [11]
[00:01:02]                 │ info Taking screenshot "/dev/shm/workspace/parallel/8/kibana/test/functional/screenshots/failure/management  test large number of fields _before all_ hook for _test_huge data should have expected number of fields_.png"
[00:01:02]                 │ info Current URL is: http://localhost:6181/app/management/kibana/indexPatterns/patterns/f1e4c910-a2e6-11e7-bb30-233be9be6a15#/?_a=(tab:scriptedFields)
[00:01:02]                 │ info Saving page source to: /dev/shm/workspace/parallel/8/kibana/test/functional/failure_debug/html/management  test large number of fields _before all_ hook for _test_huge data should have expected number of fields_.html
[00:01:02]                 └- ✖ fail: management  test large number of fields "before all" hook for "test_huge data should have expected number of fields"
[00:01:02]                 │      ResponseError: circuit_breaking_exception
[00:01:02]                 │       at onBody (node_modules/@elastic/elasticsearch/lib/Transport.js:337:23)
[00:01:02]                 │       at IncomingMessage.onEnd (node_modules/@elastic/elasticsearch/lib/Transport.js:264:11)
[00:01:02]                 │       at endReadableNT (internal/streams/readable.js:1327:12)
[00:01:02]                 │       at processTicksAndRejections (internal/process/task_queues.js:80:21)
[00:01:02]                 │ 
[00:01:02]                 │ 

Stack Trace

ResponseError: circuit_breaking_exception
    at onBody (node_modules/@elastic/elasticsearch/lib/Transport.js:337:23)
    at IncomingMessage.onEnd (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: 429 },
    statusCode: 429,
    headers: {
      'content-type': 'application/json; charset=UTF-8',
      'content-length': '907'
    },
    meta: {
      context: null,
      request: [Object],
      name: 'elasticsearch-js',
      connection: [Object],
      attempts: 0,
      aborted: false
    }
  }
}

Metrics [docs]

✅ unchanged

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

cc @jfsiii

@kibanamachine kibanamachine merged commit ae825ad into elastic:7.x Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants