Skip to content

Commit

Permalink
Merge branch 'main' into fix-flaky-test
Browse files Browse the repository at this point in the history
  • Loading branch information
rshen91 committed May 20, 2024
2 parents 5d181ae + 3a23efe commit 6794c97
Show file tree
Hide file tree
Showing 42 changed files with 1,150 additions and 240 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
description: Run Kibana FIPS smoke tests
spec:
env:
SLACK_NOTIFICATIONS_CHANNEL: "#kibana-operations-alerts"
SLACK_NOTIFICATIONS_CHANNEL: "#kibana-fips-ftr-errors"
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: "true"
repository: elastic/kibana
branch_configuration: main
Expand All @@ -30,7 +30,7 @@ spec:
schedules:
daily:
branch: main
cronline: 0 9 * * * America/New_York
cronline: 0 5 * * * America/New_York
teams:
kibana-operations:
access_level: MANAGE_BUILD_AND_READ
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@
"deepmerge": "^4.2.2",
"del": "^6.1.0",
"diff": "^5.1.0",
"elastic-apm-node": "^4.5.3",
"elastic-apm-node": "^4.5.4",
"email-addresses": "^5.0.0",
"eventsource-parser": "^1.1.1",
"execa": "^5.1.1",
Expand Down
3 changes: 2 additions & 1 deletion test/functional/apps/discover/group4/_esql_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
});

describe('inspector', () => {
// FLAKY: https://github.com/elastic/kibana/issues/183847
describe.skip('inspector', () => {
beforeEach(async () => {
await PageObjects.common.navigateToApp('discover');
await PageObjects.timePicker.setDefaultAbsoluteRange();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import React from 'react';

import { useSearchParams } from 'react-router-dom-v5-compat';

import { useValues } from 'kea';

import { EuiBetaBadge, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
Expand All @@ -20,21 +18,13 @@ import { KibanaLogic } from '../../../shared/kibana';
import { EnterpriseSearchApplicationsPageTemplate } from '../layout/page_template';

export const Playground: React.FC = () => {
const [searchParams] = useSearchParams();
const index: string | null = searchParams.has('default-index')
? searchParams.get('default-index')
: null;
const { searchPlayground } = useValues(KibanaLogic);

if (!searchPlayground) {
return null;
}
return (
<searchPlayground.PlaygroundProvider
defaultValues={{
indices: index ? [index] : [],
}}
>
<searchPlayground.PlaygroundProvider>
<EnterpriseSearchApplicationsPageTemplate
pageChrome={[
i18n.translate('xpack.enterpriseSearch.content.playground.breadcrumb', {
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/fleet/common/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,6 @@ export const DATA_TIERS = ['data_hot'];

export const FLEET_ENROLLMENT_API_PREFIX = 'fleet-enrollment-api-keys';

export const REQUEST_DIAGNOSTICS_TIMEOUT_MS = 3 * 60 * 60 * 1000; // 3 hours;

export * from './mappings';
1 change: 1 addition & 0 deletions x-pack/plugins/fleet/common/constants/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export const AGENT_API_ROUTES = {
LIST_TAGS_PATTERN: `${API_ROOT}/agents/tags`,
LIST_UPLOADS_PATTERN: `${API_ROOT}/agents/{agentId}/uploads`,
GET_UPLOAD_FILE_PATTERN: `${API_ROOT}/agents/files/{fileId}/{fileName}`,
DELETE_UPLOAD_FILE_PATTERN: `${API_ROOT}/agents/files/{fileId}`,
};

export const ENROLLMENT_API_KEY_ROUTES = {
Expand Down
49 changes: 48 additions & 1 deletion x-pack/plugins/fleet/common/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -2503,7 +2503,7 @@
]
}
},
"/agents/files@{fileId}@{fileName}": {
"/agents/files/{fileId}/{fileName}": {
"parameters": [
{
"schema": {
Expand Down Expand Up @@ -2559,6 +2559,53 @@
"operationId": "get-agent-upload-file"
}
},
"/agents/files/{fileId}": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "fileId",
"in": "path",
"required": true
}
],
"delete": {
"summary": "Delete file uploaded by agent",
"tags": [
"Agents"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"body": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/error"
}
},
"operationId": "delete-agent-upload-file"
}
},
"/agents/{agentId}/reassign": {
"parameters": [
{
Expand Down
31 changes: 30 additions & 1 deletion x-pack/plugins/fleet/common/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1581,7 +1581,7 @@ paths:
operationId: agent-action-cancel
parameters:
- $ref: '#/components/parameters/kbn_xsrf'
/agents/files@{fileId}@{fileName}:
/agents/files/{fileId}/{fileName}:
parameters:
- schema:
type: string
Expand Down Expand Up @@ -1616,6 +1616,35 @@ paths:
'400':
$ref: '#/components/responses/error'
operationId: get-agent-upload-file
/agents/files/{fileId}:
parameters:
- schema:
type: string
name: fileId
in: path
required: true
delete:
summary: Delete file uploaded by agent
tags:
- Agents
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
body:
type: object
properties:
id:
type: string
deleted:
type: boolean
'400':
$ref: '#/components/responses/error'
operationId: delete-agent-upload-file
/agents/{agentId}/reassign:
parameters:
- schema:
Expand Down
4 changes: 3 additions & 1 deletion x-pack/plugins/fleet/common/openapi/entrypoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ paths:
$ref: 'paths/agents@{agent_id}@actions.yaml'
'/agents/{agentId}/actions/{actionId}/cancel':
$ref: 'paths/agents@{agent_id}@actions@{action_id}@cancel.yaml'
'/agents/files@{fileId}@{fileName}':
'/agents/files/{fileId}/{fileName}':
$ref: 'paths/agents@files@{file_id}@{file_name}.yaml'
'/agents/files/{fileId}':
$ref: 'paths/agents@files@{file_id}.yaml'
'/agents/{agentId}/reassign':
$ref: 'paths/agents@{agent_id}@reassign.yaml'
'/agents/{agentId}/unenroll':
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
parameters:
- schema:
type: string
name: fileId
in: path
required: true
delete:
summary: Delete file uploaded by agent
tags:
- Agents
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
body:
type: object
properties:
id:
type: string
deleted:
type: boolean
'400':
$ref: ../components/responses/error.yaml
operationId: delete-agent-upload-file
2 changes: 2 additions & 0 deletions x-pack/plugins/fleet/common/services/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ export const agentRouteService = {
'{fileName}',
fileName
),
getAgentFileDeletePath: (fileId: string) =>
AGENT_API_ROUTES.DELETE_UPLOAD_FILE_PATTERN.replace('{fileId}', fileId),
getAgentsByActionsPath: () => AGENT_API_ROUTES.LIST_PATTERN,
};

Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/common/types/models/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export interface AgentDiagnostics {
name: string;
createTime: string;
filePath: string;
status: 'READY' | 'AWAITING_UPLOAD' | 'DELETED' | 'IN_PROGRESS' | 'FAILED';
status: 'READY' | 'AWAITING_UPLOAD' | 'DELETED' | 'EXPIRED' | 'IN_PROGRESS' | 'FAILED';
actionId: string;
error?: string;
}
Expand Down
5 changes: 5 additions & 0 deletions x-pack/plugins/fleet/common/types/rest_spec/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ export interface GetAgentUploadsResponse {
items: AgentDiagnostics[];
}

export interface DeleteAgentUploadResponse {
id: string;
deleted: boolean;
}

export interface PostNewAgentActionRequest {
body: {
action: Omit<NewAgentAction, 'agents'>;
Expand Down
Loading

0 comments on commit 6794c97

Please sign in to comment.