mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Fleet] Fix branch conditions to check against main
and add skip version check config option (#116530) (#116787)
This commit is contained in:
parent
69cb2d3e2c
commit
4e9b77906c
4 changed files with 16 additions and 2 deletions
|
@ -32,6 +32,9 @@ export interface FleetConfigType {
|
|||
packages?: PreconfiguredPackage[];
|
||||
outputs?: PreconfiguredOutput[];
|
||||
agentIdVerificationEnabled?: boolean;
|
||||
developer?: {
|
||||
disableRegistryVersionCheck?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
// Calling Object.entries(PackagesGroupedByStatus) gave `status: string`
|
||||
|
|
|
@ -120,6 +120,10 @@ export const config: PluginConfigDescriptor = {
|
|||
agentPolicies: PreconfiguredAgentPoliciesSchema,
|
||||
outputs: PreconfiguredOutputsSchema,
|
||||
agentIdVerificationEnabled: schema.boolean({ defaultValue: true }),
|
||||
developer: schema.object({
|
||||
// TODO: change default to false as soon as EPR issue fixed. Blocker for 8.0.
|
||||
disableRegistryVersionCheck: schema.boolean({ defaultValue: true }),
|
||||
}),
|
||||
}),
|
||||
};
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ export const createAppContextStartContractMock = (): MockedFleetAppContext => {
|
|||
agentIdVerificationEnabled: true,
|
||||
},
|
||||
config$,
|
||||
kibanaVersion: '8.0.0',
|
||||
kibanaBranch: 'master',
|
||||
kibanaVersion: '8.99.0', // Fake version :)
|
||||
kibanaBranch: 'main',
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -140,6 +140,13 @@ export async function fetchFile(filePath: string): Promise<Response> {
|
|||
}
|
||||
|
||||
function setKibanaVersion(url: URL) {
|
||||
// TODO: change default to false as soon as EPR issue fixed. Blocker for 8.0.
|
||||
const disableVersionCheck =
|
||||
appContextService.getConfig()?.developer?.disableRegistryVersionCheck ?? true;
|
||||
if (disableVersionCheck) {
|
||||
return;
|
||||
}
|
||||
|
||||
const kibanaVersion = appContextService.getKibanaVersion().split('-')[0]; // may be x.y.z-SNAPSHOT
|
||||
const kibanaBranch = appContextService.getKibanaBranch();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue