Skip to content

Commit 442d9f5

Browse files
Merge branch '7.10' into backport/7.10/pr-80215
2 parents c7cf78b + 4a4c5cb commit 442d9f5

File tree

38 files changed

+6628
-1025
lines changed

38 files changed

+6628
-1025
lines changed

src/cli_keystore/add.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,15 @@ export async function add(keystore, key, options = {}) {
5959
value = await question(`Enter value for ${key}`, { mask: '*' });
6060
}
6161

62-
keystore.add(key, value.trim());
62+
const parsedValue = value.trim();
63+
let parsedJsonValue;
64+
try {
65+
parsedJsonValue = JSON.parse(parsedValue);
66+
} catch {
67+
// noop, only treat value as json if it parses as JSON
68+
}
69+
70+
keystore.add(key, parsedJsonValue ?? parsedValue);
6371
keystore.save();
6472
}
6573

src/cli_keystore/add.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,17 @@ describe('Kibana keystore', () => {
129129
expect(keystore.data.foo).toEqual('bar');
130130
});
131131

132+
it('parses JSON values', async () => {
133+
prompt.question.returns(Promise.resolve('["bar"]\n'));
134+
135+
const keystore = new Keystore('/data/test.keystore');
136+
sandbox.stub(keystore, 'save');
137+
138+
await add(keystore, 'foo');
139+
140+
expect(keystore.data.foo).toEqual(['bar']);
141+
});
142+
132143
it('persists updated keystore', async () => {
133144
prompt.question.returns(Promise.resolve('bar\n'));
134145

src/dev/build/tasks/os_packages/docker_generator/templates/build_docker_sh.template.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,33 @@ function generator({
3636
#
3737
set -euo pipefail
3838
39-
docker pull ${baseOSImage}
39+
retry_docker_pull() {
40+
image=$1
41+
attempt=0
42+
max_retries=5
43+
44+
while true
45+
do
46+
attempt=$((attempt+1))
47+
48+
if [ $attempt -gt $max_retries ]
49+
then
50+
echo "Docker pull retries exceeded, aborting."
51+
exit 1
52+
fi
53+
54+
if docker pull "$image"
55+
then
56+
echo "Docker pull successful."
57+
break
58+
else
59+
echo "Docker pull unsuccessful, attempt '$attempt'."
60+
fi
61+
62+
done
63+
}
64+
65+
retry_docker_pull ${baseOSImage}
4066
4167
echo "Building: kibana${imageFlavor}${ubiImageFlavor}-docker"; \\
4268
docker build -t ${imageTag}${imageFlavor}${ubiImageFlavor}:${version} -f Dockerfile . || exit 1;

src/legacy/server/keystore/keystore.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,13 @@ describe('Keystore', () => {
157157
it('adds a key/value pair', () => {
158158
const keystore = new Keystore('/data/unprotected.keystore');
159159
keystore.add('a3', 'baz');
160+
keystore.add('a4', [1, 'a', 2, 'b']);
160161

161162
expect(keystore.data).toEqual({
162163
'a1.b2.c3': 'foo',
163164
a2: 'bar',
164165
a3: 'baz',
166+
a4: [1, 'a', 2, 'b'],
165167
});
166168
});
167169
});

x-pack/plugins/apm/public/components/app/ServiceOverview/ServiceList/index.tsx

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ const AppLink = styled(TransactionOverviewLink)`
5353
${truncate('100%')};
5454
`;
5555

56+
const ToolTipWrapper = styled.span`
57+
width: 100%;
58+
.apmServiceList__serviceNameTooltip {
59+
width: 100%;
60+
.apmServiceList__serviceNameContainer {
61+
// removes 24px referent to the icon placed on the left side of the text.
62+
width: calc(100% - 24px);
63+
}
64+
}
65+
`;
66+
5667
export const SERVICE_COLUMNS: Array<ITableColumn<ServiceListItem>> = [
5768
{
5869
field: 'healthStatus',
@@ -77,24 +88,27 @@ export const SERVICE_COLUMNS: Array<ITableColumn<ServiceListItem>> = [
7788
width: '40%',
7889
sortable: true,
7990
render: (_, { serviceName, agentName }) => (
80-
<EuiToolTip
81-
delay="long"
82-
content={formatString(serviceName)}
83-
id="service-name-tooltip"
84-
>
85-
<EuiFlexGroup gutterSize="s" alignItems="center">
86-
{agentName && (
87-
<EuiFlexItem grow={false}>
88-
<AgentIcon agentName={agentName} />
91+
<ToolTipWrapper>
92+
<EuiToolTip
93+
delay="long"
94+
content={formatString(serviceName)}
95+
id="service-name-tooltip"
96+
anchorClassName="apmServiceList__serviceNameTooltip"
97+
>
98+
<EuiFlexGroup gutterSize="s" alignItems="center">
99+
{agentName && (
100+
<EuiFlexItem grow={false}>
101+
<AgentIcon agentName={agentName} />
102+
</EuiFlexItem>
103+
)}
104+
<EuiFlexItem className="apmServiceList__serviceNameContainer">
105+
<AppLink serviceName={serviceName} className="eui-textTruncate">
106+
{formatString(serviceName)}
107+
</AppLink>
89108
</EuiFlexItem>
90-
)}
91-
<EuiFlexItem>
92-
<AppLink serviceName={serviceName}>
93-
{formatString(serviceName)}
94-
</AppLink>
95-
</EuiFlexItem>
96-
</EuiFlexGroup>
97-
</EuiToolTip>
109+
</EuiFlexGroup>
110+
</EuiToolTip>
111+
</ToolTipWrapper>
98112
),
99113
},
100114
{

x-pack/plugins/apm/public/components/app/ServiceOverview/__test__/__snapshots__/service_overview.test.tsx.snap

Lines changed: 74 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/case/server/routes/api/__mocks__/request_responses.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,45 @@ export const getActions = (): FindActionResult[] => [
6262
isPreconfigured: false,
6363
referencedByCount: 0,
6464
},
65+
{
66+
id: '456',
67+
actionTypeId: '.jira',
68+
name: 'Connector without isCaseOwned',
69+
config: {
70+
incidentConfiguration: {
71+
mapping: [
72+
{
73+
source: 'title',
74+
target: 'short_description',
75+
actionType: 'overwrite',
76+
},
77+
{
78+
source: 'description',
79+
target: 'description',
80+
actionType: 'overwrite',
81+
},
82+
{
83+
source: 'comments',
84+
target: 'comments',
85+
actionType: 'append',
86+
},
87+
],
88+
},
89+
apiUrl: 'https://elastic.jira.com',
90+
},
91+
isPreconfigured: false,
92+
referencedByCount: 0,
93+
},
94+
{
95+
id: '789',
96+
actionTypeId: '.resilient',
97+
name: 'Connector without mapping',
98+
config: {
99+
apiUrl: 'https://elastic.resilient.com',
100+
},
101+
isPreconfigured: false,
102+
referencedByCount: 0,
103+
},
65104
];
66105

67106
export const newConfiguration: CasesConfigureRequest = {

0 commit comments

Comments
 (0)