Skip to content

[7.x] [Alerting] renames code in alerting RBAC exemption to make it easier to maintain (#77598)#77858

Merged
gmmorris merged 1 commit intoelastic:7.xfrom
gmmorris:backport/7.x/pr-77598
Sep 18, 2020
Merged

[7.x] [Alerting] renames code in alerting RBAC exemption to make it easier to maintain (#77598)#77858
gmmorris merged 1 commit intoelastic:7.xfrom
gmmorris:backport/7.x/pr-77598

Conversation

@gmmorris
Copy link
Copy Markdown
Contributor

Backports the following commits to 7.x:

…to maintain (elastic#77598)

Refactor of code to make it a little clearer what it's doing and improve maintenance.
@gmmorris gmmorris added the backport This PR is a backport of another PR label Sep 18, 2020
@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky


Test Failures

X-Pack APM API integration tests (basic).x-pack/test/apm_api_integration/basic/tests/metrics_charts/metrics_charts·ts.APM specs (basic) Metrics when data is loaded for opbeans-node returns metrics data CPU usage has correct series overall values

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: APM specs (basic)
[00:00:00]           └-> "before all" hook
[00:01:57]           └-: Metrics
[00:01:57]             └-> "before all" hook
[00:01:57]             └-: when data is loaded
[00:01:57]               └-> "before all" hook
[00:01:57]               └-> "before all" hook
[00:01:57]                 │ info [metrics_8.0.0] Loading "mappings.json"
[00:01:57]                 │ info [metrics_8.0.0] Loading "data.json.gz"
[00:01:57]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1600419353855742754] [apm-8.0.0-metric-000001] creating index, cause [api], templates [], shards [1]/[0]
[00:01:57]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1600419353855742754] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[apm-8.0.0-metric-000001][0]]]).
[00:01:57]                 │ info [metrics_8.0.0] Created index "apm-8.0.0-metric-000001"
[00:01:57]                 │ debg [metrics_8.0.0] "apm-8.0.0-metric-000001" settings {"index":{"codec":"best_compression","lifecycle":{"name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-metric"},"mapping":{"total_fields":{"limit":"2000"}},"max_docvalue_fields_search":"200","number_of_replicas":"0","number_of_shards":"1","priority":"100","refresh_interval":"1ms"}}
[00:01:58]                 │ info [metrics_8.0.0] Indexed 2323 docs into "apm-8.0.0-metric-000001"
[00:01:58]               └-: for opbeans-node
[00:01:58]                 └-> "before all" hook
[00:01:58]                 └-: returns metrics data
[00:01:58]                   └-> "before all" hook
[00:01:58]                   └-> "before all" hook
[00:01:58]                   └-> contains CPU usage and System memory usage chart data
[00:01:58]                     └-> "before each" hook: global before each
[00:01:58]                     └-> "before each" hook
[00:01:58]                     └- ✓ pass  (1ms) "APM specs (basic) Metrics when data is loaded for opbeans-node returns metrics data contains CPU usage and System memory usage chart data"
[00:01:58]                   └-> "after each" hook
[00:01:58]                   └-: CPU usage
[00:01:58]                     └-> "before all" hook
[00:01:58]                     └-> "before all" hook
[00:01:58]                     └-> has correct series
[00:01:58]                       └-> "before each" hook: global before each
[00:01:58]                       └-> "before each" hook
[00:01:58]                       └- ✓ pass  (0ms) "APM specs (basic) Metrics when data is loaded for opbeans-node returns metrics data CPU usage has correct series"
[00:01:58]                     └-> "after each" hook
[00:01:58]                     └-> has correct series overall values
[00:01:58]                       └-> "before each" hook: global before each
[00:01:58]                       └-> "before each" hook
[00:01:58]                       └- ✖ fail: APM specs (basic) Metrics when data is loaded for opbeans-node returns metrics data CPU usage has correct series overall values
[00:01:58]                       │       Error: expect(received).toMatchInlineSnapshot(snapshot)
[00:01:58]                       │ 
[00:01:58]                       │ Snapshot name: `when data is loaded for opbeans-node returns metrics data CPU usage has correct series overall values 1`
[00:01:58]                       │ 
[00:01:58]                       │ - Snapshot  - 1
[00:01:58]                       │ + Received  + 1
[00:01:58]                       │ 
[00:01:58]                       │   Array [
[00:01:58]                       │     0.714,
[00:01:58]                       │ -   0.38770000000000004,
[00:01:58]                       │ +   0.3877,
[00:01:58]                       │     0.75,
[00:01:58]                       │     0.2543,
[00:01:58]                       │   ]
[00:01:58]                       │       + expected - actual
[00:01:58]                       │ 
[00:01:58]                       │       -false
[00:01:58]                       │       +true
[00:01:58]                       │       
[00:01:58]                       │       at Assertion.assert (/dev/shm/workspace/parallel/21/kibana/packages/kbn-expect/expect.js:100:11)
[00:01:58]                       │       at Assertion.toMatchInline [as eql] (/dev/shm/workspace/parallel/21/kibana/packages/kbn-expect/expect.js:244:8)
[00:01:58]                       │       at Context.apply (test/apm_api_integration/basic/tests/metrics_charts/metrics_charts.ts:69:16)
[00:01:58]                       │       at Object.apply (/dev/shm/workspace/parallel/21/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:30)
[00:01:58]                       │ 
[00:01:58]                       │ 

Stack Trace

{ Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `when data is loaded for opbeans-node returns metrics data CPU usage has correct series overall values 1`

- Snapshot  - 1
+ Received  + 1

  Array [
    0.714,
-   0.38770000000000004,
+   0.3877,
    0.75,
    0.2543,
  ]
    at Assertion.assert (/dev/shm/workspace/parallel/21/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.toMatchInline [as eql] (/dev/shm/workspace/parallel/21/kibana/packages/kbn-expect/expect.js:244:8)
    at Context.apply (test/apm_api_integration/basic/tests/metrics_charts/metrics_charts.ts:69:16)
    at Object.apply (/dev/shm/workspace/parallel/21/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:30) actual: 'false', expected: 'true', showDiff: true }

Build metrics

✅ unchanged

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

@gmmorris gmmorris merged commit 6d66bc4 into elastic:7.x Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants