Skip to content

Commit 15f625f

Browse files
Merge branch 'main' into eui/v97.0.0
2 parents 79eb6ed + 3493be4 commit 15f625f

121 files changed

Lines changed: 2221 additions & 573 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.buildkite/pull_requests.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"^\\.backportrc\\.json$",
3131
"^nav-kibana-dev\\.docnav\\.json$",
3232
"^src/dev/prs/kibana_qa_pr_list\\.json$",
33-
"^\\.buildkite/pull_requests\\.json$"
33+
"^\\.buildkite/pull_requests\\.json$",
34+
"^\\.devcontainer/"
3435
],
3536
"always_require_ci_on_changed": [
3637
"^docs/developer/plugin-list.asciidoc$",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
config:
2+
- path: src/dev/build/tasks/os_packages/docker_generator/templates/ironbank

.github/updatecli/values.d/scm.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
scm:
2+
enabled: true
3+
owner: elastic
4+
repository: kibana
5+
branch: main
6+
commitusingapi: true
7+
# begin updatecli-compose policy values
8+
user: kibanamachine
9+
email: 42973632+kibanamachine@users.noreply.github.com
10+
# end updatecli-compose policy values
11+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
spec:
2+
files:
3+
- "updatecli-compose.yaml"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: updatecli-compose
3+
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: '0 6 * * *'
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
compose:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
packages: read
18+
pull-requests: write
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- uses: elastic/oblt-actions/updatecli/run@v1
29+
with:
30+
command: --experimental compose diff
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- uses: elastic/oblt-actions/updatecli/run@v1
35+
with:
36+
command: --experimental compose apply
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/maps/connect-to-ems.asciidoc

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:ems: Elastic Maps Service
22
:ems-docker-repo: docker.elastic.co/elastic-maps-service/elastic-maps-server
3-
:ems-docker-image: {ems-docker-repo}:{version}-amd64
3+
:ems-docker-image: {ems-docker-repo}:{version}
44
:ems-headers-url: https://deployment-host
55

66
[[maps-connect-to-ems]]
@@ -81,34 +81,53 @@ If you cannot connect to {ems} from the {kib} server or browser clients, and you
8181

8282
{hosted-ems} is a self-managed version of {ems} offered as a Docker image that provides both the EMS basemaps and EMS boundaries. The image is bundled with basemaps up to zoom level 8. After connecting it to your {es} cluster for license validation, you have the option to download and configure a more detailed basemaps database.
8383

84-
You can use +docker pull+ to download the {hosted-ems} image from the Elastic Docker registry.
85-
84+
. Pull the {hosted-ems} Docker image.
85+
+
8686
ifeval::["{release-state}"=="unreleased"]
87-
Version {version} of {hosted-ems} has not yet been released, so no Docker image is currently available for this version.
87+
WARNING: Version {version} of {hosted-ems} has not yet been released.
88+
No Docker image is currently available for this version.
8889
endif::[]
89-
90-
ifeval::["{release-state}"!="unreleased"]
91-
90+
+
9291
["source","bash",subs="attributes"]
9392
----------------------------------
9493
docker pull {ems-docker-image}
9594
----------------------------------
9695

97-
Start {hosted-ems} and expose the default port `8080`:
96+
. Optional: Install
97+
https://docs.sigstore.dev/system_config/installation/[Cosign] for your
98+
environment. Then use Cosign to verify the {es} image's signature.
99+
+
100+
[source,sh,subs="attributes"]
101+
----
102+
wget https://artifacts.elastic.co/cosign.pub
103+
cosign verify --key cosign.pub {ems-docker-image}
104+
----
105+
+
106+
The `cosign` command prints the check results and the signature payload in JSON format:
107+
+
108+
[source,sh,subs="attributes"]
109+
--------------------------------------------
110+
Verification for {ems-docker-image} --
111+
The following checks were performed on each of these signatures:
112+
- The cosign claims were validated
113+
- Existence of the claims in the transparency log was verified offline
114+
- The signatures were verified against the specified public key
115+
--------------------------------------------
116+
98117

118+
. Start {hosted-ems} and expose the default port `8080`:
119+
+
99120
["source","bash",subs="attributes"]
100121
----------------------------------
101122
docker run --rm --init --publish 8080:8080 \
102123
{ems-docker-image}
103124
----------------------------------
104-
125+
+
105126
Once {hosted-ems} is running, follow instructions from the webpage at `localhost:8080` to define a configuration file and optionally download a more detailed basemaps database.
106-
127+
+
107128
[role="screenshot"]
108129
image::images/elastic-maps-server-instructions.png[Set-up instructions]
109130

110-
endif::[]
111-
112131
[float]
113132
[[elastic-maps-server-configuration]]
114133
==== Configuration
@@ -193,7 +212,6 @@ One way to configure {hosted-ems} is to provide `elastic-maps-server.yml` via bi
193212

194213
["source","yaml",subs="attributes"]
195214
--------------------------------------------
196-
version: '2'
197215
services:
198216
ems-server:
199217
image: {ems-docker-image}
@@ -212,7 +230,6 @@ These variables can be set with +docker-compose+ like this:
212230

213231
["source","yaml",subs="attributes"]
214232
----------------------------------------------------------
215-
version: '2'
216233
services:
217234
ems-server:
218235
image: {ems-docker-image}
57.4 KB
Loading

packages/kbn-esql-ast/src/pretty_print/__tests__/wrapping_pretty_printer.test.ts

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,85 @@ ROW (asdf + asdf)::string, 1.2::string, "1234"::integer, (12321342134 + 23412341
593593
- "aaaaaaaaaaa")::boolean`);
594594
});
595595
});
596+
597+
describe('list literals', () => {
598+
describe('numeric', () => {
599+
test('wraps long list literals one line', () => {
600+
const query =
601+
'ROW [1234567890, 1234567890, 1234567890, 1234567890, 1234567890, 1234567890, 1234567890, 1234567890, 1234567890]';
602+
const text = reprint(query).text;
603+
604+
expect('\n' + text).toBe(`
605+
ROW
606+
[1234567890, 1234567890, 1234567890, 1234567890, 1234567890, 1234567890,
607+
1234567890, 1234567890, 1234567890]`);
608+
});
609+
610+
test('wraps long list literals to multiple lines one line', () => {
611+
const query = `ROW [1234567890, 1234567890, 1234567890, 1234567890, 1234567890, 1234567890,
612+
1234567890, 1234567890, 1234567890, 1234567890, 1234567890, 1234567890,
613+
1234567890, 1234567890, 1234567890, 1234567890, 1234567890, 1234567890,
614+
1234567890, 1234567890, 1234567890]`;
615+
const text = reprint(query).text;
616+
617+
expect('\n' + text).toBe(`
618+
ROW
619+
[1234567890, 1234567890, 1234567890, 1234567890, 1234567890, 1234567890,
620+
1234567890, 1234567890, 1234567890, 1234567890, 1234567890, 1234567890,
621+
1234567890, 1234567890, 1234567890, 1234567890, 1234567890, 1234567890,
622+
1234567890, 1234567890, 1234567890]`);
623+
});
624+
625+
test('breaks very long values one-per-line', () => {
626+
const query = `ROW fn1(fn2(fn3(fn4(fn5(fn6(fn7(fn8([1234567890, 1234567890, 1234567890, 1234567890, 1234567890]))))))))`;
627+
const text = reprint(query, { wrap: 40 }).text;
628+
629+
expect('\n' + text).toBe(`
630+
ROW
631+
FN1(
632+
FN2(
633+
FN3(
634+
FN4(
635+
FN5(
636+
FN6(
637+
FN7(
638+
FN8(
639+
[
640+
1234567890,
641+
1234567890,
642+
1234567890,
643+
1234567890,
644+
1234567890]))))))))`);
645+
});
646+
});
647+
648+
describe('string', () => {
649+
test('wraps long list literals one line', () => {
650+
const query =
651+
'ROW ["some text", "another text", "one more text literal", "and another one", "and one more", "and one more", "and one more", "and one more", "and one more"]';
652+
const text = reprint(query).text;
653+
654+
expect('\n' + text).toBe(`
655+
ROW
656+
["some text", "another text", "one more text literal", "and another one",
657+
"and one more", "and one more", "and one more", "and one more",
658+
"and one more"]`);
659+
});
660+
661+
test('can break very long strings per line', () => {
662+
const query =
663+
'ROW ["..............................................", "..............................................", ".............................................."]';
664+
const text = reprint(query).text;
665+
666+
expect('\n' + text).toBe(`
667+
ROW
668+
[
669+
"..............................................",
670+
"..............................................",
671+
".............................................."]`);
672+
});
673+
});
674+
});
596675
});
597676

598677
test.todo('Idempotence on multiple times pretty printing');

packages/kbn-esql-ast/src/pretty_print/wrapping_pretty_printer.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ import {
1515
CommandVisitorContext,
1616
ExpressionVisitorContext,
1717
FunctionCallExpressionVisitorContext,
18+
ListLiteralExpressionVisitorContext,
1819
Visitor,
1920
} from '../visitor';
20-
import { singleItems } from '../visitor/utils';
21+
import { children, singleItems } from '../visitor/utils';
2122
import { BasicPrettyPrinter, BasicPrettyPrinterOptions } from './basic_pretty_printer';
2223
import { getPrettyPrintStats } from './helpers';
2324
import { LeafPrinter } from './leaf_printer';
@@ -235,7 +236,11 @@ export class WrappingPrettyPrinter {
235236
}
236237

237238
private printArguments(
238-
ctx: CommandVisitorContext | CommandOptionVisitorContext | FunctionCallExpressionVisitorContext,
239+
ctx:
240+
| CommandVisitorContext
241+
| CommandOptionVisitorContext
242+
| FunctionCallExpressionVisitorContext
243+
| ListLiteralExpressionVisitorContext,
239244
inp: Input
240245
) {
241246
let txt = '';
@@ -247,7 +252,7 @@ export class WrappingPrettyPrinter {
247252
let remainingCurrentLine = inp.remaining;
248253
let oneArgumentPerLine = false;
249254

250-
for (const child of singleItems(ctx.node.args)) {
255+
for (const child of children(ctx.node)) {
251256
if (getPrettyPrintStats(child).hasLineBreakingDecorations) {
252257
oneArgumentPerLine = true;
253258
break;
@@ -489,13 +494,11 @@ export class WrappingPrettyPrinter {
489494
})
490495

491496
.on('visitListLiteralExpression', (ctx, inp: Input): Output => {
492-
let elements = '';
493-
494-
for (const out of ctx.visitElements(inp)) {
495-
elements += (elements ? ', ' : '') + out.txt;
496-
}
497-
498-
const formatted = `[${elements}]${inp.suffix ?? ''}`;
497+
const args = this.printArguments(ctx, {
498+
indent: inp.indent,
499+
remaining: inp.remaining - 1,
500+
});
501+
const formatted = `[${args.txt}]${inp.suffix ?? ''}`;
499502
const { txt, indented } = this.decorateWithComments(inp.indent, ctx.node, formatted);
500503

501504
return { txt, indented };

packages/kbn-esql-ast/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export type ESQLAstField = ESQLFunction | ESQLColumn;
4040
export type ESQLAstItem = ESQLSingleAstItem | ESQLAstItem[];
4141

4242
export type ESQLAstNodeWithArgs = ESQLCommand | ESQLCommandOption | ESQLFunction;
43+
export type ESQLAstNodeWithChildren = ESQLAstNodeWithArgs | ESQLList;
4344

4445
/**
4546
* *Proper* are nodes which are objects with `type` property, once we get rid

0 commit comments

Comments
 (0)