Skip to content

Commit

Permalink
Merge branch 'alerting/consumer-based-rbac' into alerting/management-…
Browse files Browse the repository at this point in the history
…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)
  • Loading branch information
gmmorris committed Jul 22, 2020
2 parents 8545f64 + 53aa8e9 commit fb1d793
Show file tree
Hide file tree
Showing 58 changed files with 1,606 additions and 615 deletions.
2 changes: 1 addition & 1 deletion .ci/end2end.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pipeline {
}
}
cleanup {
notifyBuildResult(notifyPRComment: false, analyzeFlakey: false, shouldNotify: false)
notifyBuildResult(prComment: false, analyzeFlakey: false, shouldNotify: false)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/visualize/aggregations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ Bucket aggregations sort documents into buckets, depending on the contents of th
{ref}/search-aggregations-bucket-filter-aggregation.html[Filter]:: Each filter creates a bucket of documents. You can specify a filter as a
<<kuery-query, KQL>> or <<lucene-query, Lucene>> query string.

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

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

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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"abc": "123"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import expect from '@kbn/expect';
import { fetch } from '../team_assignment/get_data';
import { noop } from '../utils';

describe(`Team Assignment`, () => {
const mockPath = 'src/dev/code_coverage/ingest_coverage/__tests__/mocks/team_assign_mock.json';
describe(`fetch fn`, () => {
it(`should be a fn`, () => {
expect(typeof fetch).to.be('function');
});
describe(`applied to a path that exists`, () => {
it(`should return the contents of the path`, () => {
const sut = fetch(mockPath);
expect(sut.chain(JSON.parse)).to.have.property('abc');
});
});
describe(`applied to an non-existing path`, () => {
it(`should return a Left with the error message within`, () => {
const expectLeft = (err) =>
expect(err.message).to.contain('ENOENT: no such file or directory');

fetch('fake_path.json').fold(expectLeft, noop);
});
});
});
});
2 changes: 1 addition & 1 deletion src/dev/code_coverage/ingest_coverage/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ export const TEAM_ASSIGNMENT_PIPELINE_NAME = process.env.PIPELINE_NAME || 'team_
export const CODE_COVERAGE_CI_JOB_NAME = 'elastic+kibana+code-coverage';
export const RESEARCH_CI_JOB_NAME = 'elastic+kibana+qa-research';
export const CI_JOB_NAME = process.env.COVERAGE_JOB_NAME || RESEARCH_CI_JOB_NAME;
export const RESEARCH_CLUSTER_ES_HOST = process.env.ES_HOST || 'http://localhost:9200';
export const ES_HOST = process.env.ES_HOST || 'http://localhost:9200';
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@

import { readFileSync } from 'fs';
import { resolve } from 'path';
import { fromNullable } from '../either';
import { tryCatch as tc } from '../either';

const ROOT = resolve(__dirname, '../../../../..');

const resolveFromRoot = resolve.bind(null, ROOT);
const path = `
src/dev/code_coverage/ingest_coverage/team_assignment/ingestion_pipeline_painless.json`;
const resolved = resolveFromRoot(path.trimStart());
const getContents = (scriptPath) => readFileSync(scriptPath, 'utf8');

export const fetch = () => fromNullable(resolved).map(getContents);
const resolved = (path) => () => resolveFromRoot(path);

const getContents = (path) => tc(() => readFileSync(path, 'utf8'));

// fetch :: String -> Left | Right
export const fetch = (path) => tc(resolved(path)).chain(getContents);
32 changes: 21 additions & 11 deletions src/dev/code_coverage/ingest_coverage/team_assignment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,39 @@
import { run } from '@kbn/dev-utils';
import { TEAM_ASSIGNMENT_PIPELINE_NAME } from '../constants';
import { fetch } from './get_data';
import { noop } from '../utils';
import { update } from './update_ingest_pipeline';

export const uploadTeamAssignmentJson = () => run(execute, { description });

const updatePipeline = update(TEAM_ASSIGNMENT_PIPELINE_NAME);

function execute({ flags, log }) {
const execute = ({ flags, log }) => {
if (flags.verbose) log.verbose(`### Verbose logging enabled`);

fetch().fold(noop, updatePipeline(log));
const logLeft = handleErr(log);
const updateAndLog = updatePipeline(log);

const { path } = flags;

fetch(path).fold(logLeft, updateAndLog);
};

function handleErr(log) {
return (msg) => log.error(msg);
}

function description() {
return `
const description = `
Upload the latest team assignment pipeline def from src,
to the cluster.
`;

Examples:
const flags = {
string: ['path', 'verbose'],
help: `
--path Required, path to painless definition for team assignment.
`,
};

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

`;
}
export const uploadTeamAssignmentJson = () => run(execute, { description, flags, usage });
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
*/

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

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

const node = RESEARCH_CLUSTER_ES_HOST;
const node = ES_HOST;
const client = new Client({ node });

export const update = (id) => (log) => async (body) => {
Expand Down
2 changes: 1 addition & 1 deletion src/dev/code_coverage/shell_scripts/assign_teams.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export PIPELINE_NAME
ES_HOST="https://${USER_FROM_VAULT}:${PASS_FROM_VAULT}@${HOST_FROM_VAULT}"
export ES_HOST

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

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

This file was deleted.

1 change: 1 addition & 0 deletions src/plugins/dev_tools/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ export function renderApp(
});

return () => {
chrome.docTitle.reset();
ReactDOM.unmountComponentAtNode(element);
unlisten();
};
Expand Down
Loading

0 comments on commit fb1d793

Please sign in to comment.