Skip to content

Commit

Permalink
Merge branch 'main' into no-data-views/esql-equal-to-data-views
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Oct 8, 2024
2 parents 778f831 + c215f58 commit 385c8b2
Show file tree
Hide file tree
Showing 130 changed files with 1,277 additions and 869 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
env:
SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts'
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
REPORT_FAILED_TESTS_TO_GITHUB: 'true'
allow_rebuilds: false
branch_configuration: main
default_branch: main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
description: Kibana / Pipeline migration staging
spec:
env:
SLACK_NOTIFICATIONS_ENABLED: 'false'
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'false'
repository: elastic/kibana
pipeline_file: .buildkite/pipelines/upload_pipeline.yml
provider_settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
spec:
env:
SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts'
GITHUB_BUILD_COMMIT_STATUS_ENABLED: 'true'
ELASTIC_GITHUB_BUILD_COMMIT_STATUS_ENABLED: 'true'
GITHUB_COMMIT_STATUS_CONTEXT: buildkite/on-merge
REPORT_FAILED_TESTS_TO_GITHUB: 'true'
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
Expand Down
6 changes: 3 additions & 3 deletions .buildkite/pipeline-resource-definitions/kibana-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ spec:
description: Runs manually for pull requests
spec:
env:
PR_COMMENTS_ENABLED: 'true'
GITHUB_BUILD_COMMIT_STATUS_ENABLED: 'true'
ELASTIC_PR_COMMENTS_ENABLED: 'true'
ELASTIC_GITHUB_BUILD_COMMIT_STATUS_ENABLED: 'true'
ELASTIC_GITHUB_STEP_COMMIT_STATUS_ENABLED: 'true'
GITHUB_BUILD_COMMIT_STATUS_CONTEXT: kibana-ci
GITHUB_STEP_COMMIT_STATUS_ENABLED: 'true'
allow_rebuilds: true
branch_configuration: ''
cancel_intermediate_builds: true
Expand Down
5 changes: 4 additions & 1 deletion .buildkite/pipeline-utils/test-failures/annotate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ export const annotateTestFailures = async () => {

buildkite.setAnnotation('test_failures', 'error', getAnnotation(failures, failureHtmlArtifacts));

if (process.env.PR_COMMENTS_ENABLED === 'true') {
if (
process.env.PR_COMMENTS_ENABLED === 'true' ||
process.env.ELASTIC_PR_COMMENTS_ENABLED === 'true'
) {
buildkite.setMetadata(
'pr_comment:test_failures:body',
getPrComment(failures, failureHtmlArtifacts)
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/lifecycle/post_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euo pipefail
BUILD_SUCCESSFUL=$(ts-node "$(dirname "${0}")/build_status.ts")
export BUILD_SUCCESSFUL

if [[ "${GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then
if [[ "${GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]] && [[ "${ELASTIC_GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then
"$(dirname "${0}")/commit_status_complete.sh"
fi

Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/lifecycle/pre_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail

source .buildkite/scripts/common/util.sh

if [[ "${GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then
if [[ "${GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]] && [[ "${ELASTIC_GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then
"$(dirname "${0}")/commit_status_start.sh"
fi

Expand Down
30 changes: 6 additions & 24 deletions .github/workflows/oblt-github-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,21 @@
name: oblt-github-commands

on:
pull_request_target:
pull_request:
types:
- opened
- labeled

permissions:
contents: read
pull-requests: write

jobs:
comment-if-oblt-member:
comment:
if: ${{ github.event.label.name == 'ci:project-deploy-observability' }}
runs-on: ubuntu-latest
steps:
- uses: elastic/apm-pipeline-library/.github/actions/github-token@current
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
url: ${{ secrets.OBLT_VAULT_ADDR }}
roleId: ${{ secrets.OBLT_VAULT_ROLE_ID }}
secretId: ${{ secrets.OBLT_VAULT_SECRET_ID }}

- id: is_team_member
name: Check if user is member of the Elastic org and Observability team
run: |
if gh api -H "Accept: application/vnd.github+json" \
/orgs/elastic/teams/observability/memberships/${{ github.actor }} ; then
echo "result=true" >> $GITHUB_OUTPUT
else
echo "result=false" >> $GITHUB_OUTPUT
fi
env:
GH_TOKEN: ${{ env.GITHUB_TOKEN }}

- if: ${{ steps.is_team_member.outputs.result == 'true' }}
uses: actions/github-script@v6
with:
github-token: ${{ env.GITHUB_TOKEN }}
script: |
const body = `
### :robot: GitHub comments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export const DashboardWithControlsExample = ({ dataView }: { dataView: DataView
});

return {
useControlGroupIntegration: true,
getInitialInput: () => ({
timeRange: { from: 'now-30d', to: 'now' },
viewMode: ViewMode.VIEW,
Expand Down
2 changes: 1 addition & 1 deletion examples/share_examples/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class ShareDemoPlugin implements Plugin<void, void, SetupDeps, StartDeps>
public setup(core: CoreSetup<StartDeps>, { share }: SetupDeps) {
share.register({
id: 'demo',
getShareMenuItems: (context) => [
getShareMenuItemsLegacy: (context) => [
{
panel: {
id: 'demo',
Expand Down
1 change: 1 addition & 0 deletions oas_docs/output/kibana.serverless.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44211,6 +44211,7 @@ components:
- id
- rule_id
- immutable
- rule_source
- updated_at
- updated_by
- created_at
Expand Down
1 change: 1 addition & 0 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44211,6 +44211,7 @@ components:
- id
- rule_id
- immutable
- rule_source
- updated_at
- updated_by
- created_at
Expand Down
1 change: 1 addition & 0 deletions oas_docs/output/kibana.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52949,6 +52949,7 @@ components:
- id
- rule_id
- immutable
- rule_source
- updated_at
- updated_by
- created_at
Expand Down
1 change: 1 addition & 0 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52949,6 +52949,7 @@ components:
- id
- rule_id
- immutable
- rule_source
- updated_at
- updated_by
- created_at
Expand Down
5 changes: 5 additions & 0 deletions oas_docs/overlays/kibana.overlays.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ actions:
description: Change displayName
update:
x-displayName: "Service level objectives"
- target: '$.tags[?(@.name=="spaces")]'
description: Change displayName
update:
x-displayName: "Spaces"
description: Manage your Kibana spaces.
- target: '$.tags[?(@.name=="system")]'
description: Change displayName and description
update:
Expand Down
22 changes: 19 additions & 3 deletions oas_docs/overlays/kibana.overlays.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ actions:

If you use the Kibana console to send API requests, it automatically adds the appropriate space identifier.

To learn more, check out [Spaces](https://www.elastic.co/guide/en/kibana/current/xpack-spaces.html).
To learn more, check out [Spaces](https://www.elastic.co/guide/en/kibana/master/xpack-spaces.html).
# Add some tag descriptions and displayNames
- target: '$.tags[?(@.name=="alerting")]'
description: Change tag description and displayName
Expand All @@ -34,7 +34,7 @@ actions:
Actions typically involve the use of connectors to interact with Kibana services or third party integrations.
externalDocs:
description: Alerting documentation
url: https://www.elastic.co/guide/en/kibana/current/alerting-getting-started.html
url: https://www.elastic.co/guide/en/kibana/master/alerting-getting-started.html
x-displayName: "Alerting"
- target: '$.tags[?(@.name=="cases")]'
description: Change tag description and displayName
Expand All @@ -45,7 +45,7 @@ actions:
You can also send cases to external incident management systems by configuring connectors.
externalDocs:
description: Cases documentation
url: https://www.elastic.co/guide/en/kibana/current/cases.html
url: https://www.elastic.co/guide/en/kibana/master/cases.html
x-displayName: "Cases"
- target: '$.tags[?(@.name=="connectors")]'
description: Change tag description and displayName
Expand All @@ -65,10 +65,26 @@ actions:
description: Change displayName
update:
x-displayName: "Machine learning"
- target: '$.tags[?(@.name=="roles")]'
description: Change displayName and description
update:
x-displayName: "Roles"
description: Manage the roles that grant Elasticsearch and Kibana privileges.
externalDocs:
description: Kibana role management
url: https://www.elastic.co/guide/en/kibana/master/kibana-role-management.html
- target: '$.tags[?(@.name=="slo")]'
description: Change displayName
update:
x-displayName: "Service level objectives"
- target: '$.tags[?(@.name=="spaces")]'
description: Change displayName
update:
x-displayName: "Spaces"
description: Manage your Kibana spaces.
externalDocs:
url: https://www.elastic.co/guide/en/kibana/master/xpack-spaces.html
description: Space overview
- target: '$.tags[?(@.name=="system")]'
description: Change displayName and description
update:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@
"@octokit/rest": "^17.11.2",
"@parcel/watcher": "^2.1.0",
"@playwright/test": "=1.46.0",
"@redocly/cli": "^1.25.3",
"@redocly/cli": "^1.25.4",
"@statoscope/webpack-plugin": "^5.28.2",
"@storybook/addon-a11y": "^6.5.16",
"@storybook/addon-actions": "^6.5.16",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/plugins/core-plugins-server/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export interface PluginConfigDescriptor<T = any> {
*/
exposeToBrowser?: ExposedToBrowserDescriptor<T>;
/**
* List of configuration properties that can be dynamically changed via the PUT /_settings API.
* List of configuration properties that can be dynamically changed via the PUT /internal/core/_settings API.
*/
dynamicConfig?: DynamicConfigDescriptor<T>;
/**
Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-reporting/public/reporting_api_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ export class ReportingAPIClient implements IReportingAPI {
});
}

/**
* Adds the browserTimezone and kibana version to report job params
*/
public getDecoratedJobParams<T extends AppParams>(baseParams: T): BaseParams {
// If the TZ is set to the default "Browser", it will not be useful for
// server-side export. We need to derive the timezone and pass it as a param
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import * as Rx from 'rxjs';

import type { ApplicationStart, CoreStart } from '@kbn/core/public';
import { ILicense } from '@kbn/licensing-plugin/public';
import type { LayoutParams } from '@kbn/screenshotting-plugin/common';

import type { ReportingAPIClient } from '../../reporting_api_client';

Expand Down Expand Up @@ -47,13 +46,16 @@ export interface ExportPanelShareOpts {

export interface ReportingSharingData {
title: string;
layout: LayoutParams;
reportingDisabled?: boolean;
[key: string]: unknown;
locatorParams: {
id: string;
params: unknown;
};
}

export interface JobParamsProviderOptions {
sharingData: ReportingSharingData;
shareableUrl?: string;
objectType: string;
optimizedForPrinting?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { CSV_JOB_TYPE, CSV_JOB_TYPE_V2 } from '@kbn/reporting-export-types-csv-c

import type { SearchSourceFields } from '@kbn/data-plugin/common';
import { FormattedMessage, InjectedIntl } from '@kbn/i18n-react';
import { ShareContext, ShareMenuItem } from '@kbn/share-plugin/public';
import { ShareContext, ShareMenuItemV2 } from '@kbn/share-plugin/public';
import type { ExportModalShareOpts } from '.';
import { checkLicense } from '../..';

Expand Down Expand Up @@ -69,7 +69,7 @@ export const reportingCsvShareProvider = ({
};
};

const shareActions: ShareMenuItem[] = [];
const shareActions: ShareMenuItemV2[] = [];

const licenseCheck = checkLicense(license.check('reporting', 'basic'));
const licenseToolTipContent = licenseCheck.message;
Expand Down Expand Up @@ -177,8 +177,8 @@ export const reportingCsvShareProvider = ({
/>
),
generateExport: generateReportingJobCSV,
generateExportUrl: () => absoluteUrl,
generateCopyUrl: reportingUrl,
absoluteUrl,
renderCopyURLButton: true,
});
}
Expand Down
Loading

0 comments on commit 385c8b2

Please sign in to comment.