Skip to content

Commit

Permalink
Merge branch 'main' into renovate/main-jest
Browse files Browse the repository at this point in the history
  • Loading branch information
afharo authored Aug 23, 2024
2 parents b8c6716 + db970ff commit a928e6e
Show file tree
Hide file tree
Showing 71 changed files with 855 additions and 3,569 deletions.
2 changes: 1 addition & 1 deletion fleet_packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
{
"name": "endpoint",
"version": "8.15.0"
"version": "8.15.1"
},
{
"name": "fleet_server",
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,6 @@
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
"@yarnpkg/lockfile": "^1.1.0",
"aggregate-error": "^3.1.0",
"apidoc-markdown": "^7.3.2",
"argsplit": "^1.0.5",
"autoprefixer": "^10.4.7",
"axe-core": "^4.10.0",
Expand Down
7 changes: 5 additions & 2 deletions packages/core/apps/core-apps-server-internal/src/core_app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ import type {
import type { InternalStaticAssets } from '@kbn/core-http-server-internal';
import {
combineLatest,
concatMap,
firstValueFrom,
map,
type Observable,
ReplaySubject,
shareReplay,
Subject,
switchMap,
takeUntil,
timer,
} from 'rxjs';
Expand Down Expand Up @@ -238,7 +238,7 @@ export class CoreAppsService {
// Poll for updates
combineLatest([savedObjectsClient$, timer(0, 10_000)])
.pipe(
concatMap(async ([soClient]) => {
switchMap(async ([soClient]) => {
try {
const persistedOverrides = await soClient.get<Record<string, unknown>>(
DYNAMIC_CONFIG_OVERRIDES_SO_TYPE,
Expand Down Expand Up @@ -300,7 +300,10 @@ export class CoreAppsService {
await soClient.create(DYNAMIC_CONFIG_OVERRIDES_SO_TYPE, newGlobalOverrides, {
id: DYNAMIC_CONFIG_OVERRIDES_SO_ID,
overwrite: true,
refresh: false,
});
// set it again in memory in case the timer polling the SO for updates has overridden it during this update.
this.configService.setDynamicConfigOverrides(req.body);
} catch (err) {
if (err instanceof ValidationError) {
return res.badRequest({ body: err });
Expand Down
9 changes: 0 additions & 9 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -437,15 +437,6 @@
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "machine learning modules",
"matchDepNames": ["apidoc-markdown"],
"reviewers": ["team:ml-ui"],
"matchBaseBranches": ["main"],
"labels": ["Team:ML", "release_note:skip", "backport:all-open"],
"minimumReleaseAge": "7 days",
"enabled": true
},
{
"groupName": "Kibana ES|QL Team",
"matchDepNames": ["recast"],
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/home/server/tutorials/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ import { redisenterpriseMetricsSpecProvider } from './redisenterprise_metrics';
import { santaLogsSpecProvider } from './santa_logs';
import { sonicwallLogsSpecProvider } from './sonicwall_logs';
import { sophosLogsSpecProvider } from './sophos_logs';
import { squidLogsSpecProvider } from './squid_logs';
import { stanMetricsSpecProvider } from './stan_metrics';
import { statsdMetricsSpecProvider } from './statsd_metrics';
import { suricataLogsSpecProvider } from './suricata_logs';
Expand Down Expand Up @@ -223,7 +222,6 @@ export const builtInTutorials = [
santaLogsSpecProvider,
sonicwallLogsSpecProvider,
sophosLogsSpecProvider,
squidLogsSpecProvider,
tomcatLogsSpecProvider,
zscalerLogsSpecProvider,
];
61 changes: 0 additions & 61 deletions src/plugins/home/server/tutorials/squid_logs/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function ({ getService }: FtrProviderContext) {

expect(resp.body).to.be.an('array');

expect(resp.body.length).to.be(109); // the beats
expect(resp.body.length).to.be(108); // the beats
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
validation,
disabled = false,
}) => {
const useSpaceAwareness = ExperimentalFeaturesService.get()?.useSpaceAwareness ?? false;
const { docLinks } = useStartServices();
const { spaceId } = useFleetStatus();
const { spaceId, isSpaceAwarenessEnabled } = useFleetStatus();

const { getAbsolutePath } = useLink();
const AgentTamperProtectionWrapper = useUIExtension(
Expand Down Expand Up @@ -263,21 +262,21 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
/>
</EuiFormRow>
</EuiDescribedFormGroup>
{useSpaceAwareness ? (
{isSpaceAwarenessEnabled ? (
<EuiDescribedFormGroup
fullWidth
title={
<h3>
<FormattedMessage
id="xpack.fleet.agentPolicyForm.spaceFieldLabel"
defaultMessage="Space"
defaultMessage="Spaces"
/>
</h3>
}
description={
<FormattedMessage
id="xpack.fleet.agentPolicyForm.spaceDescription"
defaultMessage="Select a space for this policy or create a new one. {link}"
defaultMessage="Select one or more spaces for this policy or create a new one. {link}"
values={{
link: (
<EuiLink
Expand Down Expand Up @@ -312,6 +311,9 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent<Props> =
: [spaceId || 'default']
}
onChange={(newValue) => {
if (newValue.length === 0) {
return;
}
updateAgentPolicy({
space_ids: newValue,
});
Expand Down
6 changes: 1 addition & 5 deletions x-pack/plugins/fleet/server/types/models/agent_policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ function isInteger(n: number) {

export const AgentPolicyBaseSchema = {
id: schema.maybe(schema.string()),
space_ids: schema.maybe(
schema.arrayOf(schema.string(), {
minSize: 1,
})
),
space_ids: schema.maybe(schema.arrayOf(schema.string())),
name: schema.string({ minLength: 1, validate: validateNonEmptyString }),
namespace: AgentPolicyNamespaceSchema,
description: schema.maybe(schema.string()),
Expand Down
13 changes: 0 additions & 13 deletions x-pack/plugins/ml/package.json

This file was deleted.

Loading

0 comments on commit a928e6e

Please sign in to comment.