helmfile icon indicating copy to clipboard operation
helmfile copied to clipboard

feat: add skip json schema validation during the install /upgrade of a Chart

Open zhaque44 opened this issue 1 year ago • 3 comments

This pull request introduces a new --skip-schema-validation flag across various commands and configurations to improve flexibility in schema validation handling. The changes span multiple files and functions to ensure comprehensive integration of this new option.

New Flag Integration:

  • cmd/apply.go, cmd/sync.go, cmd/template.go: Added --skip-schema-validation flag to the respective commands. [1] [2] [3]

Configuration and Option Updates:

  • pkg/config/apply.go, pkg/config/diff.go, pkg/config/sync.go, pkg/config/template.go: Added SkipSchemaValidation field to the options structs and implemented corresponding methods. [1] [2] [3] [4]
  • pkg/app/config.go: Updated ApplyConfigProvider and DiffConfigProvider interfaces to include SkipSchemaValidation method. [1] [2]

Functional Enhancements:

  • pkg/app/app.go: Integrated SkipSchemaValidation into the apply and diff functions. [1] [2]
  • pkg/state/helmx.go: Added method to append --skip-schema-validation flag to helm commands.
  • pkg/state/state.go: Updated Helm and Release specifications to include SkipSchemaValidation and integrated it into the flag generation for upgrade and diff commands. [1] [2] [3] [4] [5] [6]

Test and Mock Updates:

  • pkg/app/app_test.go, pkg/app/diff_test.go: Added SkipSchemaValidation to config structs and implemented corresponding methods in mocks. [1] [2] [3] [4] [5] [6] [7]
  • pkg/exectest/helm.go, pkg/helmexec/exec.go: Added mock methods for handling SkipSchemaValidation. [1] [2] [3]

zhaque44 avatar Oct 13 '24 14:10 zhaque44

@yxxhero ``` temp_test.go:38: unexpected result: want (-), got (+): string( - "foo-values-d566bffd8", + "foo-values-5db58595d7", ) === RUN TestGenerateID/different_bytes_content temp_test.go:44: unexpected result: want (-), got (+): string( - "foo-values-65b557f8c5", + "foo-values-78d88d86dd", ) === RUN TestGenerateID/different_map_content temp_test.go:51: unexpected result: want (-), got (+): string( - "foo-values-74d5cd8cc7", + "foo-values-f9c8967cd", ) === RUN TestGenerateID/different_chart temp_test.go:58: unexpected result: want (-), got (+): string( - "foo-values-85db6bbb4c", + "foo-values-cdfb97444", ) === RUN TestGenerateID/different_name temp_test.go:64: unexpected result: want (-), got (+): string( - "bar-values-85cf974b7", + "bar-values-749bc4c6d4", ) === RUN TestGenerateID/specific_ns temp_test.go:70: unexpected result: want (-), got (+): string( - "myns-foo-values-574676fbb9", + "myns-foo-values-7b74fbd6d6", ) --- FAIL: TestGenerateID (0.00s) --- FAIL: TestGenerateID/baseline (0.00s) --- FAIL: TestGenerateID/different_bytes_content (0.00s) --- FAIL: TestGenerateID/different_map_content (0.00s) --- FAIL: TestGenerateID/different_chart (0.00s) --- FAIL: TestGenerateID/different_name (0.00s) --- FAIL: TestGenerateID/specific_ns (0.00s)

zhaque44 avatar Oct 15 '24 15:10 zhaque44

@zhaque44 update the values.

yxxhero avatar Oct 15 '24 15:10 yxxhero

@zhaque44 https://github.com/databus23/helm-diff/pull/676

yxxhero avatar Oct 19 '24 11:10 yxxhero

Works only for diff and upgrade commands but not for template.

Logunov avatar Dec 16 '24 23:12 Logunov

Works only for diff and upgrade commands but not for template.

@zhaque44

yxxhero avatar Feb 14 '25 13:02 yxxhero