Skip to content

Commit

Permalink
Merge branch 'obs-ai-assistant-action' into obs-ai-assistant-2
Browse files Browse the repository at this point in the history
  • Loading branch information
dgieselaar committed Aug 10, 2023
2 parents b5365e2 + 76d25d0 commit 4fc4319
Show file tree
Hide file tree
Showing 308 changed files with 14,236 additions and 1,449 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipelines/artifacts_container_image.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
- command: .buildkite/scripts/steps/artifacts/docker_image.sh
label: Build default container images
label: Build serverless container images
agents:
queue: n2-16-spot
timeout_in_minutes: 60
Expand Down
26 changes: 0 additions & 26 deletions .buildkite/scripts/build_kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,32 +41,6 @@ if is_pr_with_label "ci:build-cloud-image"; then
EOF
fi

if is_pr_with_label "ci:build-serverless-image"; then
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
GIT_ABBREV_COMMIT=${BUILDKITE_COMMIT:0:12}
node scripts/build \
--skip-initialize \
--skip-generic-folders \
--skip-platform-folders \
--skip-archives \
--docker-images \
--docker-namespace="kibana-ci" \
--docker-tag="pr-$BUILDKITE_PULL_REQUEST-$GIT_ABBREV_COMMIT" \
--docker-push \
--skip-docker-ubi \
--skip-docker-ubuntu \
--skip-docker-cloud \
--skip-docker-contexts
docker logout docker.elastic.co

SERVERLESS_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" docker.elastic.co/kibana-ci/kibana-serverless)
buildkite-agent meta-data set pr_comment:deploy_cloud:head "* Kibana Serverless Image: \`$SERVERLESS_IMAGE\`"
cat << EOF | buildkite-agent annotate --style "info" --context kibana-serverless-image
Kibana Serverless Image: \`$SERVERLESS_IMAGE\`
EOF
fi

echo "--- Archive Kibana Distribution"
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
installDir="$KIBANA_DIR/install/kibana"
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ const uploadPipeline = (pipelineContent: string | object) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/deploy_cloud.yml'));
}

if (GITHUB_PR_LABELS.includes('ci:build-serverless-image')) {
pipeline.push(getPipeline('.buildkite/pipelines/artifacts_container_image.yml'));
}

if (
(await doAnyChangesMatch([/.*stor(ies|y).*/])) ||
GITHUB_PR_LABELS.includes('ci:build-storybooks')
Expand Down
20 changes: 16 additions & 4 deletions .buildkite/scripts/steps/artifacts/docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@ set -euo pipefail
source .buildkite/scripts/steps/artifacts/env.sh

GIT_ABBREV_COMMIT=${BUILDKITE_COMMIT:0:12}
KIBANA_IMAGE="docker.elastic.co/kibana-ci/kibana-serverless:git-$GIT_ABBREV_COMMIT"
if [[ "${BUILDKITE_PULL_REQUEST:-false}" == "false" ]]; then
KIBANA_IMAGE_TAG="git-$GIT_ABBREV_COMMIT"
else
KIBANA_IMAGE_TAG="pr-$BUILDKITE_PULL_REQUEST-$GIT_ABBREV_COMMIT"
fi

KIBANA_IMAGE="docker.elastic.co/kibana-ci/kibana-serverless:$KIBANA_IMAGE_TAG"

echo "--- Verify manifest does not already exist"
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
trap 'docker logout docker.elastic.co' EXIT

echo "Checking manifest for $KIBANA_IMAGE"
if docker manifest inspect $KIBANA_IMAGE &> /dev/null; then
echo "Manifest already exists, exiting"
exit 1
Expand All @@ -25,7 +32,7 @@ node scripts/build \
--docker-cross-compile \
--docker-images \
--docker-namespace="kibana-ci" \
--docker-tag="git-$GIT_ABBREV_COMMIT" \
--docker-tag="$KIBANA_IMAGE_TAG" \
--skip-docker-ubuntu \
--skip-docker-ubi \
--skip-docker-cloud \
Expand Down Expand Up @@ -55,7 +62,7 @@ docker manifest push "$KIBANA_IMAGE"
docker logout docker.elastic.co

cat << EOF | buildkite-agent annotate --style "info" --context image
### Container Images
### Serverless Images
Manifest: \`$KIBANA_IMAGE\`
Expand All @@ -64,6 +71,11 @@ cat << EOF | buildkite-agent annotate --style "info" --context image
ARM64: \`$KIBANA_IMAGE-arm64\`
EOF

if [[ "${BUILDKITE_PULL_REQUEST:-false}" != "false" ]]; then
buildkite-agent meta-data set pr_comment:build_serverless:head "* Kibana Serverless Image: \`$KIBANA_IMAGE\`"
buildkite-agent meta-data set pr_comment:early_comment_job_id "$BUILDKITE_JOB_ID"
fi

echo "--- Build dependencies report"
node scripts/licenses_csv_report "--csv=target/dependencies-$GIT_ABBREV_COMMIT.csv"

Expand All @@ -80,7 +92,7 @@ cd -
# so that new stack instances contain the latest and greatest image of kibana,
# and the respective stack components of course.
echo "--- Trigger image tag update"
if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]]; then
if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]] && [[ "${BUILDKITE_PULL_REQUEST:-false}" == "false" ]]; then
cat << EOF | buildkite-agent pipeline upload
steps:
- label: ":argo: Update kibana image tag for kibana-controller using gpctl"
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ src/plugins/screenshot_mode @elastic/appex-sharedux
x-pack/examples/screenshotting_example @elastic/appex-sharedux
x-pack/plugins/screenshotting @elastic/kibana-reporting-services
examples/search_examples @elastic/kibana-data-discovery
packages/kbn-search-response-warnings @elastic/kibana-data-discovery
x-pack/plugins/searchprofiler @elastic/platform-deployment-management
x-pack/test/security_api_integration/packages/helpers @elastic/kibana-core
x-pack/plugins/security @elastic/kibana-security
Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"server": "src/legacy/server",
"share": "src/plugins/share",
"sharedUXPackages": "packages/shared-ux",
"searchResponseWarnings": "packages/kbn-search-response-warnings",
"securitySolutionPackages": "x-pack/packages/security-solution",
"serverlessPackages": "packages/serverless",
"coloring": "packages/kbn-coloring/src",
Expand Down
4 changes: 4 additions & 0 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ yarn_install(
quiet = False,
frozen_lockfile = False,
environment = {
"GECKODRIVER_CDNURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
"CHROMEDRIVER_CDNURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
"CHROMEDRIVER_CDNBINARIESURL": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache",
"SASS_BINARY_SITE": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass",
"RE2_DOWNLOAD_MIRROR": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2",
"CYPRESS_DOWNLOAD_MIRROR": "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/cypress",
}
)
5 changes: 5 additions & 0 deletions docs/api/data-views/create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

experimental[] Create data views.

[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/src/plugins/data_views/docs/openapi[open API specification].
====

[[data-views-api-create-request]]
==== Request
Expand Down
5 changes: 5 additions & 0 deletions docs/api/data-views/default-get.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

experimental[] Retrieve a default data view ID. Kibana UI uses the default data view unless user picks a different one.

[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/src/plugins/data_views/docs/openapi[open API specification].
====

[[data-views-api-default-get-request]]
==== Request
Expand Down
5 changes: 5 additions & 0 deletions docs/api/data-views/default-set.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
experimental[] Set a default data view ID. Kibana UI will use the default data view unless user picks a different one.
The API doesn't validate if given `data_view_id` is a valid id.

[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/src/plugins/data_views/docs/openapi[open API specification].
====

[[data-views-api-default-set-request]]
==== Request
Expand Down
5 changes: 5 additions & 0 deletions docs/api/data-views/delete.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ experimental[] Delete data views.

WARNING: Once you delete a data view, _it cannot be recovered_.

[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/src/plugins/data_views/docs/openapi[open API specification].
====

[[data-views-api-delete-request]]
==== Request
Expand Down
6 changes: 6 additions & 0 deletions docs/api/data-views/get-all.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

experimental[] Retrieve a list of all data views.

[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/src/plugins/data_views/docs/openapi[open API specification].
====


[[data-views-api-get-all-request]]
==== Request
Expand Down
5 changes: 5 additions & 0 deletions docs/api/data-views/get.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

experimental[] Retrieve a single data view by ID.

[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/src/plugins/data_views/docs/openapi[open API specification].
====

[[data-views-api-get-request]]
==== Request
Expand Down
5 changes: 5 additions & 0 deletions docs/api/data-views/runtime-fields/get.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

experimental[] Get a runtime field

[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/src/plugins/data_views/docs/openapi[open API specification].
====

[[data-views-runtime-field-get-request]]
==== Request
Expand Down
5 changes: 5 additions & 0 deletions docs/api/data-views/update.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
experimental[] Update part of an data view. Only the specified fields are updated in the
data view. Unspecified fields stay as they are persisted.

[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/src/plugins/data_views/docs/openapi[open API specification].
====

[[data-views-api-update-request]]
==== Request
Expand Down
35 changes: 12 additions & 23 deletions examples/bfetch_explorer/public/components/page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,23 @@
*/

import * as React from 'react';
import {
EuiPageBody,
EuiPageContent_Deprecated as EuiPageContent,
EuiPageContentBody_Deprecated as EuiPageContentBody,
EuiPageHeader,
EuiPageHeaderSection,
EuiTitle,
} from '@elastic/eui';
import { EuiPageTemplate, EuiPageSection, EuiPageHeader } from '@elastic/eui';

export interface PageProps {
title?: React.ReactNode;
sidebar?: React.ReactNode;
}

export const Page: React.FC<PageProps> = ({ title = 'Untitled', children }) => {
export const Page: React.FC<PageProps> = ({ title = 'Untitled', sidebar, children }) => {
return (
<EuiPageBody>
<EuiPageHeader>
<EuiPageHeaderSection>
<EuiTitle size="l">
<h1>{title}</h1>
</EuiTitle>
</EuiPageHeaderSection>
</EuiPageHeader>
<EuiPageContent>
<EuiPageContentBody style={{ maxWidth: 800, margin: '0 auto' }}>
{children}
</EuiPageContentBody>
</EuiPageContent>
</EuiPageBody>
<EuiPageTemplate panelled={true} offset={0} grow={true}>
<EuiPageTemplate.Sidebar>{sidebar}</EuiPageTemplate.Sidebar>
<EuiPageTemplate.Header>
<EuiPageHeader pageTitle={title} />
</EuiPageTemplate.Header>
<EuiPageTemplate.Section>
<EuiPageSection style={{ maxWidth: 800, margin: '0 auto' }}>{children}</EuiPageSection>
</EuiPageTemplate.Section>
</EuiPageTemplate>
);
};
2 changes: 0 additions & 2 deletions examples/bfetch_explorer/public/containers/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { Redirect } from 'react-router-dom';
import { BrowserRouter as Router, Route, Routes } from '@kbn/shared-ux-router';
import { EuiPage } from '@elastic/eui';
import { useDeps } from '../../hooks/use_deps';
import { Sidebar } from './sidebar';
import { routes } from '../../routes';

export const App: React.FC = () => {
Expand All @@ -27,7 +26,6 @@ export const App: React.FC = () => {
return (
<Router basename={appBasePath}>
<EuiPage>
<Sidebar />
<Routes>
{routeElements}
<Redirect to="/count-until" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { EuiPanel, EuiText } from '@elastic/eui';
import { CountUntil } from '../../../../components/count_until';
import { Page } from '../../../../components/page';
import { useDeps } from '../../../../hooks/use_deps';
import { Sidebar } from '../../sidebar';

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Props {}
Expand All @@ -19,7 +20,7 @@ export const PageCountUntil: React.FC<Props> = () => {
const { plugins } = useDeps();

return (
<Page title={'Count Until'}>
<Page title={'Count Until'} sidebar={<Sidebar />}>
<EuiText>
This demo sends a single number N using <code>fetchStreaming</code> to the server. The
server will stream back N number of messages with 1 second delay each containing a number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { EuiPanel, EuiText } from '@elastic/eui';
import { DoubleIntegers } from '../../../../components/double_integers';
import { Page } from '../../../../components/page';
import { useDeps } from '../../../../hooks/use_deps';
import { Sidebar } from '../../sidebar';

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Props {}
Expand All @@ -19,7 +20,7 @@ export const PageDoubleIntegers: React.FC<Props> = () => {
const { explorer } = useDeps();

return (
<Page title={'Double Integers'}>
<Page title={'Double Integers'} sidebar={<Sidebar />}>
<EuiText>
Below is a list of numbers in milliseconds. They are sent as a batch to the server. For each
number server waits given number of milliseconds then doubles the number and streams it
Expand Down
40 changes: 19 additions & 21 deletions examples/bfetch_explorer/public/containers/app/sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import React from 'react';
import { EuiPageSideBar_Deprecated as EuiPageSideBar, EuiSideNav } from '@elastic/eui';
import { EuiSideNav } from '@elastic/eui';
import { useHistory } from 'react-router-dom';
import { routes } from '../../../routes';

Expand All @@ -18,26 +18,24 @@ export const Sidebar: React.FC<SidebarProps> = () => {
const history = useHistory();

return (
<EuiPageSideBar>
<EuiSideNav
items={[
{
name: 'bfetch explorer',
id: 'home',
items: routes.map(({ id, title, items }) => ({
id,
name: title,
isSelected: true,
items: items.map((route) => ({
id: route.id,
name: route.title,
onClick: () => history.push(`/${route.id}`),
'data-test-subj': route.id,
})),
<EuiSideNav
items={[
{
name: 'bfetch explorer',
id: 'home',
items: routes.map(({ id, title, items }) => ({
id,
name: title,
isSelected: true,
items: items.map((route) => ({
id: route.id,
name: route.title,
onClick: () => history.push(`/${route.id}`),
'data-test-subj': route.id,
})),
},
]}
/>
</EuiPageSideBar>
})),
},
]}
/>
);
};
Loading

0 comments on commit 4fc4319

Please sign in to comment.