Skip to content

Commit

Permalink
Merge branch 'main' into feat/eui-100.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Mar 5, 2025
2 parents 50ee8db + e9f852e commit d232370
Show file tree
Hide file tree
Showing 121 changed files with 2,092 additions and 939 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ src/platform/plugins/shared/ui_actions @elastic/appex-sharedux
src/platform/plugins/shared/ui_actions_enhanced @elastic/appex-sharedux
src/platform/plugins/shared/unified_doc_viewer @elastic/kibana-data-discovery
src/platform/plugins/shared/unified_histogram @elastic/kibana-data-discovery
src/platform/plugins/shared/unified_search @elastic/kibana-visualizations
src/platform/plugins/shared/unified_search @elastic/kibana-presentation
src/platform/plugins/shared/usage_collection @elastic/kibana-core
src/platform/plugins/shared/vis_types/timeseries @elastic/kibana-visualizations
src/platform/plugins/shared/visualizations @elastic/kibana-visualizations
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1225,10 +1225,8 @@
"re-resizable": "^6.9.9",
"re2js": "0.4.3",
"react": "~18.2.0",
"react-18": "npm:react@~18.2.0",
"react-diff-view": "^3.2.1",
"react-dom": "~18.2.0",
"react-dom-18": "npm:react-dom@~18.2.0",
"react-dropzone": "^11.7.1",
"react-fast-compare": "^2.0.4",
"react-hook-form": "^7.44.2",
Expand Down Expand Up @@ -1738,6 +1736,7 @@
"dependency-check": "^4.1.0",
"dependency-cruiser": "^16.8.0",
"ejs": "^3.1.10",
"elasticsearch-8.x": "npm:@elastic/elasticsearch@8",
"enzyme": "^3.11.0",
"enzyme-to-json": "^3.6.2",
"eslint": "^8.57.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { Client, HttpConnection } from '@elastic/elasticsearch';
import { Client, HttpConnection } from 'elasticsearch-8.x'; // Switch to `@elastic/elasticsearch` when the CI cluster is upgraded.
import { createFailError } from '@kbn/dev-cli-errors';
import { ToolingLog } from '@kbn/tooling-log';

Expand Down
7 changes: 0 additions & 7 deletions packages/kbn-optimizer/src/common/worker_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export interface WorkerConfig {
readonly profileWebpack: boolean;
readonly browserslistEnv: string;
readonly optimizerCacheKey: unknown;
readonly reactVersion: string;
}

export type CacheableWorkerConfig = Omit<WorkerConfig, 'watch' | 'profileWebpack' | 'cache'>;
Expand Down Expand Up @@ -73,11 +72,6 @@ export function parseWorkerConfig(json: string): WorkerConfig {
throw new Error('`browserslistEnv` must be a string');
}

const reactVersion = parsed.reactVersion;
if (typeof reactVersion !== 'string') {
throw new Error('`reactVersion` must be a string');
}

const themes = parseThemeTags(parsed.themeTags);

return {
Expand All @@ -89,7 +83,6 @@ export function parseWorkerConfig(json: string): WorkerConfig {
optimizerCacheKey,
browserslistEnv,
themeTags: themes,
reactVersion,
};
} catch (error) {
throw new Error(`unable to parse worker config: ${error.message}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ describe('getOptimizerCacheKey()', () => {
"browserslistEnv": "dev",
"dist": false,
"optimizerCacheKey": "♻",
"reactVersion": "17",
"repoRoot": <absolute path>,
"themeTags": Array [
"borealislight",
Expand Down
11 changes: 0 additions & 11 deletions packages/kbn-optimizer/src/optimizer/optimizer_config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ describe('OptimizerConfig::parseOptions()', () => {
"testPlugins": false,
},
"profileWebpack": false,
"reactVersion": "17",
"repoRoot": <absolute path>,
"themeTags": undefined,
"watch": false,
Expand Down Expand Up @@ -157,7 +156,6 @@ describe('OptimizerConfig::parseOptions()', () => {
"testPlugins": false,
},
"profileWebpack": false,
"reactVersion": "17",
"repoRoot": <absolute path>,
"themeTags": undefined,
"watch": false,
Expand Down Expand Up @@ -186,7 +184,6 @@ describe('OptimizerConfig::parseOptions()', () => {
"testPlugins": false,
},
"profileWebpack": false,
"reactVersion": "17",
"repoRoot": <absolute path>,
"themeTags": undefined,
"watch": false,
Expand Down Expand Up @@ -214,7 +211,6 @@ describe('OptimizerConfig::parseOptions()', () => {
"testPlugins": false,
},
"profileWebpack": false,
"reactVersion": "17",
"repoRoot": <absolute path>,
"themeTags": undefined,
"watch": false,
Expand Down Expand Up @@ -243,7 +239,6 @@ describe('OptimizerConfig::parseOptions()', () => {
"testPlugins": false,
},
"profileWebpack": false,
"reactVersion": "17",
"repoRoot": <absolute path>,
"themeTags": undefined,
"watch": false,
Expand Down Expand Up @@ -272,7 +267,6 @@ describe('OptimizerConfig::parseOptions()', () => {
"testPlugins": false,
},
"profileWebpack": false,
"reactVersion": "17",
"repoRoot": <absolute path>,
"themeTags": undefined,
"watch": false,
Expand Down Expand Up @@ -301,7 +295,6 @@ describe('OptimizerConfig::parseOptions()', () => {
"testPlugins": false,
},
"profileWebpack": false,
"reactVersion": "17",
"repoRoot": <absolute path>,
"themeTags": undefined,
"watch": false,
Expand Down Expand Up @@ -331,7 +324,6 @@ describe('OptimizerConfig::parseOptions()', () => {
"testPlugins": false,
},
"profileWebpack": false,
"reactVersion": "17",
"repoRoot": <absolute path>,
"themeTags": undefined,
"watch": false,
Expand Down Expand Up @@ -361,7 +353,6 @@ describe('OptimizerConfig::parseOptions()', () => {
"testPlugins": false,
},
"profileWebpack": false,
"reactVersion": "17",
"repoRoot": <absolute path>,
"themeTags": undefined,
"watch": false,
Expand Down Expand Up @@ -424,7 +415,6 @@ describe('OptimizerConfig::create()', () => {
focus: [],
includeCoreBundle: false,
pluginSelector: Symbol('plugin selector'),
reactVersion: 17,
})
);
});
Expand All @@ -448,7 +438,6 @@ describe('OptimizerConfig::create()', () => {
Symbol(plugin2),
],
"profileWebpack": Symbol(parsed profile webpack),
"reactVersion": 17,
"repoRoot": Symbol(parsed repo root),
"themeTags": Symbol(theme tags),
"watch": Symbol(parsed watch),
Expand Down
10 changes: 2 additions & 8 deletions packages/kbn-optimizer/src/optimizer/optimizer_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ export interface ParsedOptions {
includeCoreBundle: boolean;
themeTags: ThemeTags;
pluginSelector: PluginSelector;
reactVersion: string;
}

export class OptimizerConfig {
Expand All @@ -178,7 +177,6 @@ export class OptimizerConfig {
const includeCoreBundle = !!options.includeCoreBundle;
const filters = options.filter || [];
const focus = options.focus || [];
const reactVersion = process.env.REACT_18 ? '18' : '17';

const repoRoot = options.repoRoot;
if (!Path.isAbsolute(repoRoot)) {
Expand Down Expand Up @@ -223,7 +221,6 @@ export class OptimizerConfig {
outputRoot,
maxWorkerCount,
profileWebpack,
reactVersion,
cache,
filters,
focus,
Expand Down Expand Up @@ -281,8 +278,7 @@ export class OptimizerConfig {
options.maxWorkerCount,
options.dist,
options.profileWebpack,
options.themeTags,
options.reactVersion
options.themeTags
);
}

Expand All @@ -297,8 +293,7 @@ export class OptimizerConfig {
public readonly maxWorkerCount: number,
public readonly dist: boolean,
public readonly profileWebpack: boolean,
public readonly themeTags: ThemeTags,
public readonly reactVersion: string
public readonly themeTags: ThemeTags
) {}

getWorkerConfig(optimizerCacheKey: unknown): WorkerConfig {
Expand All @@ -311,7 +306,6 @@ export class OptimizerConfig {
optimizerCacheKey,
themeTags: this.themeTags,
browserslistEnv: this.dist ? 'production' : process.env.BROWSERSLIST_ENV || 'dev',
reactVersion: this.reactVersion,
};
}

Expand Down
4 changes: 1 addition & 3 deletions packages/kbn-optimizer/src/worker/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,8 @@ export function getWebpackConfig(
'src/core/public/styles/core_app/images'
),
vega: Path.resolve(worker.repoRoot, 'node_modules/vega/build-es5/vega.js'),
'react-dom$':
worker.reactVersion === '18' ? 'react-dom-18/profiling' : 'react-dom/profiling',
'react-dom$': 'react-dom/profiling',
'scheduler/tracing': 'scheduler/tracing-profiling',
react: worker.reactVersion === '18' ? 'react-18' : 'react',
},
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { Client, HttpConnection } from '@elastic/elasticsearch';
import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
import { SearchRequest, MsearchRequestItem } from '@elastic/elasticsearch/lib/api/types';
import { Client, HttpConnection } from 'elasticsearch-8.x'; // Switch to `@elastic/elasticsearch` when the CI cluster is upgraded.
import {
QueryDslQueryContainer,
SearchRequest,
MsearchRequestItem,
} from 'elasticsearch-8.x/lib/api/types'; // Switch to `@elastic/elasticsearch` when the CI cluster is upgraded.
import { ToolingLog } from '@kbn/tooling-log';

interface ClientOptions {
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-plugin-helpers/src/tasks/bazel_packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { TaskContext } from '../task_context';
export async function buildBazelPackages({ log, dist }: TaskContext) {
log.info('run bazel and build required artifacts for the optimizer');

const args = [`--define=REACT_18=${Boolean(process.env.REACT_18)}`];
const args = [];
if (dist) args.push('--define=dist=true');
try {
await runBazel(
Expand Down
62 changes: 43 additions & 19 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -318,25 +318,6 @@
],
"enabled": true
},
{
"groupName": "@elastic/appex-sharedux react-18 dependencies",
"matchDepNames": [
"react-18",
"react-dom-18"
],
"reviewers": [
"team:appex-sharedux"
],
"matchBaseBranches": [
"main"
],
"labels": [
"Team:SharedUX",
"release_note:skip",
"backport:all-open"
],
"enabled": true
},
{
"groupName": "react-markdown",
"matchDepNames": [
Expand Down Expand Up @@ -971,6 +952,48 @@
],
"enabled": true
},
{
"groupName": "@elastic/elasticsearch (CI clients)",
"matchDepNames": [
"elasticsearch-8.x"
],
"reviewers": [
"team:kibana-operations",
"team:appex-qa"
],
"allowedVersions": "<9.0.0",
"matchBaseBranches": [
"main"
],
"labels": [
"release_note:skip",
"backport:prev-minor",
"Team:Operations",
"Team:QA"
],
"enabled": true
},
{
"groupName": "@elastic/elasticsearch",
"matchDepNames": [
"@elastic/elasticsearch"
],
"reviewers": [
"team:kibana-operations",
"team:kibana-core"
],
"allowedVersions": "<9.0.0",
"matchBaseBranches": [
"8.x"
],
"labels": [
"release_note:skip",
"backport:skip",
"Team:Operations",
"Team:Core"
],
"enabled": true
},
{
"groupName": "@elastic/elasticsearch",
"matchDepNames": [
Expand All @@ -980,6 +1003,7 @@
"team:kibana-operations",
"team:kibana-core"
],
"allowedVersions": "<8.0.0",
"matchBaseBranches": [
"7.17"
],
Expand Down
2 changes: 1 addition & 1 deletion src/dev/code_coverage/ingest_coverage/ingest.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

const { Client, HttpConnection } = require('@elastic/elasticsearch');
const { Client, HttpConnection } = require('elasticsearch-8.x'); // Switch to `@elastic/elasticsearch` when the CI cluster is upgraded.
import { RESEARCH_CI_JOB_NAME } from './constants';
import { whichIndex } from './ingest_helpers';
import { fromNullable } from './either';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
Client as ESClient,
ClientOptions as ESClientOptions,
HttpConnection,
} from '@elastic/elasticsearch';
} from 'elasticsearch-8.x'; // Switch to `@elastic/elasticsearch` when the CI cluster is upgraded.
import { ToolingLog } from '@kbn/tooling-log';
import { createFailError } from '@kbn/dev-cli-errors';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { ClusterPutComponentTemplateRequest } from '@elastic/elasticsearch/lib/api/types';
import { ClusterPutComponentTemplateRequest } from 'elasticsearch-8.x/lib/api/types'; // Switch to `@elastic/elasticsearch` when the CI cluster is upgraded.
import {
buildkiteProperties,
reporterProperties,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import fs from 'node:fs';
import path from 'node:path';
import readline from 'node:readline';
import { ToolingLog } from '@kbn/tooling-log';
import { Client as ESClient } from '@elastic/elasticsearch';
import { Client as ESClient } from 'elasticsearch-8.x'; // Switch to `@elastic/elasticsearch` when the CI cluster is upgraded.
import {
SCOUT_REPORTER_ES_API_KEY,
SCOUT_REPORTER_ES_URL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { IndicesPutIndexTemplateRequest } from '@elastic/elasticsearch/lib/api/types';
import { IndicesPutIndexTemplateRequest } from 'elasticsearch-8.x/lib/api/types'; // Switch to `@elastic/elasticsearch` when the CI cluster is upgraded.
import { SCOUT_TEST_EVENTS_TEMPLATE_NAME, SCOUT_TEST_EVENTS_INDEX_PATTERN } from '@kbn/scout-info';
import * as componentTemplates from './component_templates';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import { PropertyName, MappingProperty } from '@elastic/elasticsearch/lib/api/types';
import { PropertyName, MappingProperty } from 'elasticsearch-8.x/lib/api/types'; // Switch to `@elastic/elasticsearch` when the CI cluster is upgraded.

export const buildkiteProperties: Record<PropertyName, MappingProperty> = {
branch: {
Expand Down
Loading

0 comments on commit d232370

Please sign in to comment.