Skip to content

Commit fb1d793

Browse files
committed
Merge branch 'alerting/consumer-based-rbac' into alerting/management-feature-privileges
* alerting/consumer-based-rbac: [Security Solution][Timeline] Add Empty view to the Timelines page (elastic#72576) [Security Solution][Resolver] Show process detail panel when clicking a process node (elastic#72563) renamed variable to make it clear the SO client is unsecured Move manifest packageConfig mocks into security_solution plugin (elastic#72527) [QA][Code Coverage] Fixup Team Assignment (elastic#72467) [docs] remove references to tile map visualization in supported aggregations (elastic#72493) [ci][apm-ui] fix argument name for disabling pr comments (elastic#72633) Only check that the event ids are the same in arrays (elastic#72624) includes hidden params type in SO client Add doc titles to ES UI apps (elastic#71045) Add Upgrade Assistant API integration test to ensure the reindex operation saved object can handle immense error messages (elastic#72347) [APM] Disable flaky rum e2e’s (elastic#72614) Applying tiny fix from 72532 to main branch (elastic#72533) [APM] Update script with new roles/users (elastic#72599) [Security Solution] Add margin (elastic#72542) Migrated fixed_scroll karma tests to jest (elastic#72258) [ML] Handling data recognizer saved object errors (elastic#72447) [Monitoring] Fix the messaging around needing TLS enabled (elastic#72310) [Task Manager] Batches the update operations in Task Manager (elastic#71470)
2 parents 8545f64 + 53aa8e9 commit fb1d793

File tree

58 files changed

+1606
-615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1606
-615
lines changed

.ci/end2end.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pipeline {
111111
}
112112
}
113113
cleanup {
114-
notifyBuildResult(notifyPRComment: false, analyzeFlakey: false, shouldNotify: false)
114+
notifyBuildResult(prComment: false, analyzeFlakey: false, shouldNotify: false)
115115
}
116116
}
117117
}

docs/visualize/aggregations.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ Bucket aggregations sort documents into buckets, depending on the contents of th
8585
{ref}/search-aggregations-bucket-filter-aggregation.html[Filter]:: Each filter creates a bucket of documents. You can specify a filter as a
8686
<<kuery-query, KQL>> or <<lucene-query, Lucene>> query string.
8787

88-
{ref}/search-aggregations-bucket-geohashgrid-aggregation.html[Geohash]:: Displays points based on a geohash. Supported by the tile map and data table visualizations.
88+
{ref}/search-aggregations-bucket-geohashgrid-aggregation.html[Geohash]:: Displays points based on a geohash. Supported by data table visualizations and <<maps>>.
8989

90-
{ref}/search-aggregations-bucket-geotilegrid-aggregation.html[Geotile]:: Groups points based on web map tiling. Supported by the tile map and data table visualizations.
90+
{ref}/search-aggregations-bucket-geotilegrid-aggregation.html[Geotile]:: Groups points based on web map tiling. Supported by data table visualizations and <<maps>>.
9191

9292
{ref}/search-aggregations-bucket-histogram-aggregation.html[Histogram]:: Builds from a numeric field.
9393

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"abc": "123"
3+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import expect from '@kbn/expect';
21+
import { fetch } from '../team_assignment/get_data';
22+
import { noop } from '../utils';
23+
24+
describe(`Team Assignment`, () => {
25+
const mockPath = 'src/dev/code_coverage/ingest_coverage/__tests__/mocks/team_assign_mock.json';
26+
describe(`fetch fn`, () => {
27+
it(`should be a fn`, () => {
28+
expect(typeof fetch).to.be('function');
29+
});
30+
describe(`applied to a path that exists`, () => {
31+
it(`should return the contents of the path`, () => {
32+
const sut = fetch(mockPath);
33+
expect(sut.chain(JSON.parse)).to.have.property('abc');
34+
});
35+
});
36+
describe(`applied to an non-existing path`, () => {
37+
it(`should return a Left with the error message within`, () => {
38+
const expectLeft = (err) =>
39+
expect(err.message).to.contain('ENOENT: no such file or directory');
40+
41+
fetch('fake_path.json').fold(expectLeft, noop);
42+
});
43+
});
44+
});
45+
});

src/dev/code_coverage/ingest_coverage/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ export const TEAM_ASSIGNMENT_PIPELINE_NAME = process.env.PIPELINE_NAME || 'team_
3232
export const CODE_COVERAGE_CI_JOB_NAME = 'elastic+kibana+code-coverage';
3333
export const RESEARCH_CI_JOB_NAME = 'elastic+kibana+qa-research';
3434
export const CI_JOB_NAME = process.env.COVERAGE_JOB_NAME || RESEARCH_CI_JOB_NAME;
35-
export const RESEARCH_CLUSTER_ES_HOST = process.env.ES_HOST || 'http://localhost:9200';
35+
export const ES_HOST = process.env.ES_HOST || 'http://localhost:9200';

src/dev/code_coverage/ingest_coverage/team_assignment/get_data.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@
1919

2020
import { readFileSync } from 'fs';
2121
import { resolve } from 'path';
22-
import { fromNullable } from '../either';
22+
import { tryCatch as tc } from '../either';
2323

2424
const ROOT = resolve(__dirname, '../../../../..');
25+
2526
const resolveFromRoot = resolve.bind(null, ROOT);
26-
const path = `
27-
src/dev/code_coverage/ingest_coverage/team_assignment/ingestion_pipeline_painless.json`;
28-
const resolved = resolveFromRoot(path.trimStart());
29-
const getContents = (scriptPath) => readFileSync(scriptPath, 'utf8');
3027

31-
export const fetch = () => fromNullable(resolved).map(getContents);
28+
const resolved = (path) => () => resolveFromRoot(path);
29+
30+
const getContents = (path) => tc(() => readFileSync(path, 'utf8'));
31+
32+
// fetch :: String -> Left | Right
33+
export const fetch = (path) => tc(resolved(path)).chain(getContents);

src/dev/code_coverage/ingest_coverage/team_assignment/index.js

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,39 @@
2020
import { run } from '@kbn/dev-utils';
2121
import { TEAM_ASSIGNMENT_PIPELINE_NAME } from '../constants';
2222
import { fetch } from './get_data';
23-
import { noop } from '../utils';
2423
import { update } from './update_ingest_pipeline';
2524

26-
export const uploadTeamAssignmentJson = () => run(execute, { description });
27-
2825
const updatePipeline = update(TEAM_ASSIGNMENT_PIPELINE_NAME);
2926

30-
function execute({ flags, log }) {
27+
const execute = ({ flags, log }) => {
3128
if (flags.verbose) log.verbose(`### Verbose logging enabled`);
3229

33-
fetch().fold(noop, updatePipeline(log));
30+
const logLeft = handleErr(log);
31+
const updateAndLog = updatePipeline(log);
32+
33+
const { path } = flags;
34+
35+
fetch(path).fold(logLeft, updateAndLog);
36+
};
37+
38+
function handleErr(log) {
39+
return (msg) => log.error(msg);
3440
}
3541

36-
function description() {
37-
return `
42+
const description = `
3843
3944
Upload the latest team assignment pipeline def from src,
4045
to the cluster.
4146
47+
`;
4248

43-
Examples:
49+
const flags = {
50+
string: ['path', 'verbose'],
51+
help: `
52+
--path Required, path to painless definition for team assignment.
53+
`,
54+
};
4455

45-
node scripts/load_team_assignment.js --verbose
56+
const usage = 'node scripts/load_team_assignment.js --verbose --path PATH_TO_PAINLESS_SCRIPT.json';
4657

47-
`;
48-
}
58+
export const uploadTeamAssignmentJson = () => run(execute, { description, flags, usage });

src/dev/code_coverage/ingest_coverage/team_assignment/update_ingest_pipeline.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
*/
1919

2020
import { createFailError } from '@kbn/dev-utils';
21-
import { RESEARCH_CLUSTER_ES_HOST } from '../constants';
21+
import { ES_HOST } from '../constants';
2222
import { pretty, green } from '../utils';
2323

2424
const { Client } = require('@elastic/elasticsearch');
2525

26-
const node = RESEARCH_CLUSTER_ES_HOST;
26+
const node = ES_HOST;
2727
const client = new Client({ node });
2828

2929
export const update = (id) => (log) => async (body) => {

src/dev/code_coverage/shell_scripts/assign_teams.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export PIPELINE_NAME
99
ES_HOST="https://${USER_FROM_VAULT}:${PASS_FROM_VAULT}@${HOST_FROM_VAULT}"
1010
export ES_HOST
1111

12-
node scripts/load_team_assignment.js --verbose
12+
node scripts/load_team_assignment.js --verbose --path src/dev/code_coverage/ingest_coverage/team_assignment/ingestion_pipeline_painless.json
1313

1414
echo "### Code Coverage Team Assignment - Complete"
1515
echo ""

src/legacy/core_plugins/kibana/public/__tests__/discover/fixed_scroll.js

Lines changed: 0 additions & 202 deletions
This file was deleted.

0 commit comments

Comments
 (0)