From 478581f04efcf56b9eaa866247bad186e922123d Mon Sep 17 00:00:00 2001 From: Julia Bardi <90178898+juliaElastic@users.noreply.github.com> Date: Tue, 15 Feb 2022 16:46:05 +0100 Subject: [PATCH] revert package policy validation that caused issue with input groups (#125657) (cherry picked from commit 35f4ba536262d37946a48922d30997e98ff74620) --- .../services/validate_package_policy.test.ts | 3 ++- .../common/services/validate_package_policy.ts | 14 +++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/fleet/common/services/validate_package_policy.test.ts b/x-pack/plugins/fleet/common/services/validate_package_policy.test.ts index afb6a2f806f9a..975d45fd01c64 100644 --- a/x-pack/plugins/fleet/common/services/validate_package_policy.test.ts +++ b/x-pack/plugins/fleet/common/services/validate_package_policy.test.ts @@ -607,7 +607,8 @@ describe('Fleet - validatePackagePolicy()', () => { }); }); - it('returns package policy validation error if input var does not exist', () => { + // TODO enable when https://github.com/elastic/kibana/issues/125655 is fixed + it.skip('returns package policy validation error if input var does not exist', () => { expect( validatePackagePolicy( { diff --git a/x-pack/plugins/fleet/common/services/validate_package_policy.ts b/x-pack/plugins/fleet/common/services/validate_package_policy.ts index f1e28bfbe4e55..2a8c187d71629 100644 --- a/x-pack/plugins/fleet/common/services/validate_package_policy.ts +++ b/x-pack/plugins/fleet/common/services/validate_package_policy.ts @@ -210,15 +210,11 @@ export const validatePackagePolicyConfig = ( } if (varDef === undefined) { - errors.push( - i18n.translate('xpack.fleet.packagePolicyValidation.nonExistentVarMessage', { - defaultMessage: '{varName} var definition does not exist', - values: { - varName, - }, - }) - ); - return errors; + // TODO return validation error here once https://github.com/elastic/kibana/issues/125655 is fixed + // eslint-disable-next-line no-console + console.debug(`No variable definition for ${varName} found`); + + return null; } if (varDef.required) {