Skip to content

Commit

Permalink
Merge branch 'main' into reporting/tests-serverless-improvements-ii
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan authored Oct 22, 2024
2 parents 0bea1a5 + 800e392 commit 2d2c790
Show file tree
Hide file tree
Showing 243 changed files with 5,660 additions and 2,436 deletions.
2 changes: 1 addition & 1 deletion .buildkite/ftr_platform_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ enabled:
- x-pack/test/task_manager_claimer_mget/config.ts
- x-pack/test/ui_capabilities/security_and_spaces/config.ts
- x-pack/test/ui_capabilities/spaces_only/config.ts
- x-pack/test/upgrade_assistant_integration/config.js
- x-pack/test/upgrade_assistant_integration/config.ts
- x-pack/test/usage_collection/config.ts
- x-pack/performance/journeys_e2e/aiops_log_rate_analysis.ts
- x-pack/performance/journeys_e2e/ecommerce_dashboard.ts
Expand Down
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ module.exports = {
'x-pack/test/*/*config.*ts',
'x-pack/test/saved_object_api_integration/*/apis/**/*',
'x-pack/test/ui_capabilities/*/tests/**/*',
'x-pack/test/upgrade_assistant_integration/**/*',
'x-pack/test/performance/**/*.ts',
'**/cypress.config.{js,ts}',
'x-pack/test_serverless/**/config*.ts',
Expand Down
34 changes: 34 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,8 @@ src/plugins/discover/public/context_awareness/profile_providers/security @elasti
/x-pack/test_serverless/functional/test_suites/security/config.screenshots.ts @elastic/platform-docs

# Visualizations
/x-pack/test/accessibility/apps/group3/graph.ts @elastic/kibana-visualizations
/x-pack/test/accessibility/apps/group2/lens.ts @elastic/kibana-visualizations
/src/plugins/visualize/ @elastic/kibana-visualizations
/x-pack/test/functional/apps/lens @elastic/kibana-visualizations
/x-pack/test/api_integration/apis/lens/ @elastic/kibana-visualizations
Expand Down Expand Up @@ -1115,6 +1117,7 @@ packages/kbn-monaco/src/esql @elastic/kibana-esql
/docs/settings/reporting-settings.asciidoc @elastic/appex-sharedux
/docs/setup/configuring-reporting.asciidoc @elastic/appex-sharedux
/x-pack/test_serverless/**/test_suites/common/reporting/ @elastic/appex-sharedux
/x-pack/test/accessibility/apps/group3/reporting.ts @elastic/appex-sharedux

### Global Experience Tagging
/x-pack/test/saved_object_tagging/ @elastic/appex-sharedux
Expand Down Expand Up @@ -1201,6 +1204,8 @@ x-pack/test_serverless/**/test_suites/observability/ai_assistant @elastic/obs-ai
/x-pack/test/functional/apps/infra/logs @elastic/obs-ux-logs-team

# Observability UX management team
/x-pack/test/accessibility/apps/group1/uptime.ts @elastic/obs-ux-management-team
/x-pack/test/accessibility/apps/group3/observability.ts @elastic/obs-ux-management-team
/x-pack/packages/observability/alert_details @elastic/obs-ux-management-team
/x-pack/test/observability_functional @elastic/obs-ux-management-team
/x-pack/plugins/observability_solution/infra/public/alerting @elastic/obs-ux-management-team
Expand All @@ -1217,6 +1222,8 @@ x-pack/test_serverless/**/test_suites/observability/ai_assistant @elastic/obs-ai
/x-pack/test/functional/apps/monitoring @elastic/stack-monitoring
/x-pack/test/api_integration/apis/monitoring @elastic/stack-monitoring
/x-pack/test/api_integration/apis/monitoring_collection @elastic/stack-monitoring
/x-pack/test/accessibility/apps/group1/kibana_overview.ts @elastic/stack-monitoring
/x-pack/test/accessibility/apps/group3/stack_monitoring.ts @elastic/stack-monitoring

# Fleet
/x-pack/test/fleet_api_integration @elastic/fleet
Expand Down Expand Up @@ -1269,6 +1276,10 @@ x-pack/test_serverless/**/test_suites/observability/ai_assistant @elastic/obs-ai
### END Observability Plugins

# Presentation
/x-pack/test/accessibility/apps/group3/maps.ts @elastic/kibana-presentation
/x-pack/test/accessibility/apps/group1/dashboard_panel_options.ts @elastic/kibana-presentation
/x-pack/test/accessibility/apps/group1/dashboard_links.ts @elastic/kibana-presentation
/x-pack/test/accessibility/apps/group1/dashboard_controls.ts @elastic/kibana-presentation
/test/functional/apps/dashboard/ @elastic/kibana-presentation
/test/functional/apps/dashboard_elements/ @elastic/kibana-presentation
/test/functional/services/dashboard/ @elastic/kibana-presentation
Expand Down Expand Up @@ -1342,6 +1353,9 @@ x-pack/test_serverless/**/test_suites/observability/ai_assistant @elastic/obs-ai
/.eslintignore @elastic/kibana-operations

# Appex QA
/x-pack/test/accessibility/services.ts @elastic/appex-qa
/x-pack/test/accessibility/page_objects.ts @elastic/appex-qa
/x-pack/test/accessibility/ftr_provider_context.d.ts @elastic/appex-qa
/x-pack/test_serverless/tsconfig.json @elastic/appex-qa
/x-pack/test_serverless/kibana.jsonc @elastic/appex-qa
/x-pack/test_serverless/functional/test_suites/common/README.md @elastic/appex-qa
Expand Down Expand Up @@ -1458,6 +1472,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
#CC# /x-pack/plugins/security/ @elastic/kibana-security

# Response Ops team
/x-pack/test/accessibility/apps/group3/rules_connectors.ts @elastic/response-ops
/x-pack/test/functional/es_archives/cases/default @elastic/response-ops
/x-pack/test_serverless/api_integration/test_suites/observability/config.ts @elastic/response-ops
/x-pack/test_serverless/api_integration/test_suites/observability/index.ts @elastic/response-ops
Expand Down Expand Up @@ -1530,10 +1545,26 @@ x-pack/test/api_integration/apis/management/index_management/inference_endpoints
/x-pack/test/api_integration/apis/management/ @elastic/kibana-management
/x-pack/test/functional/apps/rollup_job/ @elastic/kibana-management
/x-pack/test/api_integration/apis/grok_debugger @elastic/kibana-management
/x-pack/test/accessibility/apps/group1/advanced_settings.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/**/grok_debugger.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/group1/helpers.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/group1/home.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/group1/index_lifecycle_management.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/group1/ingest_node_pipelines.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/group1/management.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/group1/painless_lab.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/group1/search_profiler.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/group3/cross_cluster_replication.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/group3/license_management.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/group3/remote_clusters.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/group3/rollup_jobs.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/group3/upgrade_assistant.ts @elastic/kibana-management
/x-pack/test/accessibility/apps/group3/watcher.ts @elastic/kibana-management

#CC# /x-pack/plugins/cross_cluster_replication/ @elastic/kibana-management

# Security Solution
/x-pack/test/accessibility/apps/group3/security_solution.ts @elastic/security-solution
/x-pack/test_serverless/functional/test_suites/security/config.ts @elastic/security-solution @elastic/appex-qa
/x-pack/test_serverless/functional/test_suites/security/config.feature_flags.ts @elastic/security-solution
/x-pack/test_serverless/api_integration/test_suites/observability/config.feature_flags.ts @elastic/security-solution
Expand Down Expand Up @@ -1890,6 +1921,7 @@ x-pack/plugins/security_solution/server/lib/security_integrations @elastic/secur

# Ent. Search design
/x-pack/plugins/enterprise_search/**/*.scss @elastic/search-design
/x-pack/test/accessibility/apps/group3/enterprise_search.ts @elastic/search-kibana

# Security design
/x-pack/plugins/endpoint/**/*.scss @elastic/security-design
Expand Down Expand Up @@ -1917,6 +1949,8 @@ x-pack/plugins/observability_solution/observability_shared/public/components/pro

# Shared UX
/x-pack/test/api_integration/apis/content_management @elastic/appex-sharedux
/x-pack/test/accessibility/apps/group3/tags.ts @elastic/appex-sharedux
/x-pack/test/accessibility/apps/group3/snapshot_and_restore.ts @elastic/appex-sharedux
/x-pack/test_serverless/functional/test_suites/common/spaces/spaces_selection.ts @elastic/appex-sharedux
/x-pack/test_serverless/functional/test_suites/common/spaces/index.ts @elastic/appex-sharedux
packages/react @elastic/appex-sharedux
Expand Down
2 changes: 1 addition & 1 deletion config/serverless.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ xpack.searchInferenceEndpoints.ui.enabled: false
xpack.search.notebooks.catalog.url: https://elastic-enterprise-search.s3.us-east-2.amazonaws.com/serverless/catalog.json

# Semantic text UI
xpack.index_management.dev.enableSemanticText: false
xpack.index_management.dev.enableSemanticText: true
6 changes: 6 additions & 0 deletions examples/routing_example/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ export const POST_MESSAGE_ROUTE_PATH = '/api/post_message';

// Internal APIs should use the `internal` prefix, instead of the `api` prefix.
export const INTERNAL_GET_MESSAGE_BY_ID_ROUTE = '/internal/get_message';

export const DEPRECATED_ROUTES = {
REMOVED_ROUTE: '/api/routing_example/d/removed_route',
MIGRATED_ROUTE: '/api/routing_example/d/migrated_route',
VERSIONED_ROUTE: '/api/routing_example/d/versioned',
};
3 changes: 2 additions & 1 deletion examples/routing_example/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
*/

import { Plugin, CoreSetup, CoreStart } from '@kbn/core/server';
import { registerRoutes } from './routes';
import { registerRoutes, registerDeprecatedRoutes } from './routes';

export class RoutingExamplePlugin implements Plugin<{}, {}> {
public setup(core: CoreSetup) {
const router = core.http.createRouter();

registerRoutes(router);
registerDeprecatedRoutes(router);

return {};
}
Expand Down
17 changes: 17 additions & 0 deletions examples/routing_example/server/routes/deprecated_routes/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* 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 { IRouter } from '@kbn/core/server';
import { registerDeprecatedRoute } from './unversioned';
import { registerVersionedDeprecatedRoute } from './versioned';

export function registerDeprecatedRoutes(router: IRouter) {
registerDeprecatedRoute(router);
registerVersionedDeprecatedRoute(router);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* 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 type { IRouter } from '@kbn/core/server';
import { schema } from '@kbn/config-schema';
import { DEPRECATED_ROUTES } from '../../../common';

export const registerDeprecatedRoute = (router: IRouter) => {
router.get(
{
path: DEPRECATED_ROUTES.REMOVED_ROUTE,
validate: false,
options: {
access: 'public',
deprecated: {
documentationUrl: 'https://elastic.co/',
severity: 'critical',
reason: { type: 'remove' },
},
},
},
async (ctx, req, res) => {
return res.ok({
body: { result: 'Called deprecated route. Check UA to see the deprecation.' },
});
}
);

router.post(
{
path: DEPRECATED_ROUTES.MIGRATED_ROUTE,
validate: {
body: schema.object({
test: schema.maybe(schema.boolean()),
}),
},
options: {
access: 'public',
deprecated: {
documentationUrl: 'https://elastic.co/',
severity: 'critical',
reason: {
type: 'migrate',
newApiMethod: 'GET',
newApiPath: `${DEPRECATED_ROUTES.VERSIONED_ROUTE}?apiVersion=2`,
},
},
},
},
async (ctx, req, res) => {
return res.ok({
body: { result: 'Called deprecated route. Check UA to see the deprecation.' },
});
}
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* 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 type { RequestHandler } from '@kbn/core-http-server';
import type { IRouter } from '@kbn/core/server';
import { DEPRECATED_ROUTES } from '../../../common';

const createDummyHandler =
(version: string): RequestHandler =>
(ctx, req, res) => {
return res.ok({ body: { result: `API version ${version}.` } });
};

export const registerVersionedDeprecatedRoute = (router: IRouter) => {
const versionedRoute = router.versioned.get({
path: DEPRECATED_ROUTES.VERSIONED_ROUTE,
description: 'Routing example plugin deprecated versioned route.',
access: 'internal',
options: {
excludeFromOAS: true,
},
enableQueryVersion: true,
});

versionedRoute.addVersion(
{
options: {
deprecated: {
documentationUrl: 'https://elastic.co/',
severity: 'warning',
reason: { type: 'bump', newApiVersion: '2' },
},
},
validate: false,
version: '1',
},
createDummyHandler('1')
);

versionedRoute.addVersion(
{
version: '2',
validate: false,
},
createDummyHandler('2')
);
};
1 change: 1 addition & 0 deletions examples/routing_example/server/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
*/

export { registerRoutes } from './register_routes';
export { registerDeprecatedRoutes } from './deprecated_routes';
1 change: 1 addition & 0 deletions examples/routing_example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
"@kbn/core-http-browser",
"@kbn/config-schema",
"@kbn/react-kibana-context-render",
"@kbn/core-http-server",
]
}
11 changes: 0 additions & 11 deletions oas_docs/bundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -6409,7 +6409,6 @@
},
"/api/fleet/agent-status": {
"get": {
"deprecated": true,
"operationId": "%2Fapi%2Ffleet%2Fagent-status#0",
"parameters": [
{
Expand Down Expand Up @@ -17479,7 +17478,6 @@
]
},
"put": {
"deprecated": true,
"operationId": "%2Fapi%2Ffleet%2Fagents%2F%7BagentId%7D%2Freassign#0",
"parameters": [
{
Expand Down Expand Up @@ -18179,7 +18177,6 @@
},
"/api/fleet/enrollment-api-keys": {
"get": {
"deprecated": true,
"operationId": "%2Fapi%2Ffleet%2Fenrollment-api-keys#0",
"parameters": [
{
Expand Down Expand Up @@ -18226,7 +18223,6 @@
"tags": []
},
"post": {
"deprecated": true,
"operationId": "%2Fapi%2Ffleet%2Fenrollment-api-keys#1",
"parameters": [
{
Expand Down Expand Up @@ -18283,7 +18279,6 @@
},
"/api/fleet/enrollment-api-keys/{keyId}": {
"delete": {
"deprecated": true,
"operationId": "%2Fapi%2Ffleet%2Fenrollment-api-keys%2F%7BkeyId%7D#1",
"parameters": [
{
Expand Down Expand Up @@ -18322,7 +18317,6 @@
"tags": []
},
"get": {
"deprecated": true,
"operationId": "%2Fapi%2Ffleet%2Fenrollment-api-keys%2F%7BkeyId%7D#0",
"parameters": [
{
Expand Down Expand Up @@ -25053,7 +25047,6 @@
},
"/api/fleet/epm/packages/{pkgkey}": {
"delete": {
"deprecated": true,
"operationId": "%2Fapi%2Ffleet%2Fepm%2Fpackages%2F%7Bpkgkey%7D#3",
"parameters": [
{
Expand Down Expand Up @@ -25111,7 +25104,6 @@
"tags": []
},
"get": {
"deprecated": true,
"operationId": "%2Fapi%2Ffleet%2Fepm%2Fpackages%2F%7Bpkgkey%7D#0",
"parameters": [
{
Expand Down Expand Up @@ -25173,7 +25165,6 @@
"tags": []
},
"post": {
"deprecated": true,
"operationId": "%2Fapi%2Ffleet%2Fepm%2Fpackages%2F%7Bpkgkey%7D#2",
"parameters": [
{
Expand Down Expand Up @@ -25257,7 +25248,6 @@
"tags": []
},
"put": {
"deprecated": true,
"operationId": "%2Fapi%2Ffleet%2Fepm%2Fpackages%2F%7Bpkgkey%7D#1",
"parameters": [
{
Expand Down Expand Up @@ -40472,7 +40462,6 @@
},
"/api/fleet/service-tokens": {
"post": {
"deprecated": true,
"description": "Create a service token",
"operationId": "%2Fapi%2Ffleet%2Fservice-tokens#0",
"parameters": [
Expand Down
Loading

0 comments on commit 2d2c790

Please sign in to comment.