Skip to content

Commit 9af61e1

Browse files
authored
Merge pull request #403 from vidispine/fixes-1.35
Fixes 1.35
2 parents d2206f5 + 204ea62 commit 9af61e1

21 files changed

Lines changed: 176 additions & 91 deletions

azure-pipelines-gated.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,12 @@ jobs:
2424
Helm_3_19_5_single:
2525
HelmVersion: "3.19.5"
2626
TestType: single
27-
Helm_3_19_5_multi:
28-
HelmVersion: "3.19.5"
29-
TestType: multi
3027
Helm_3_20_1_single:
3128
HelmVersion: "3.20.1"
3229
TestType: single
33-
Helm_3_20_1_multi:
34-
HelmVersion: "3.20.1"
35-
TestType: multi
3630
Helm_4_0_5_single:
3731
HelmVersion: "4.0.5"
3832
TestType: single
39-
Helm_4_0_5_multi:
40-
HelmVersion: "4.0.5"
41-
TestType: multi
4233
Helm_4_1_3_single:
4334
HelmVersion: "4.1.3"
4435
TestType: single

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
TestType: single
8888
Helm_4_1_3_multi:
8989
HelmVersion: "4.1.3"
90-
TestType: multi
90+
TestType: multi
9191
steps:
9292
- template: azure-pipelines-test.yml # Template reference
9393
parameters:

hull/CHANGELOG.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
# Changelog
22

3-
## [1.35.2]
4-
5-
CHANGES:
6-
7-
- intoduce `conditionals` feature to allow conditional rendering of elements in places where `enabled` properties are not available. By binding one or more properties to an arbitrary condition, the rendering of the properties can be indirectly controlled which allows to render or hide sub-trees completely under specified conditions. Check the documentation on chart design for more information. Thanks Armin [sanarena](https://github.com/sanarena) for the feature request!
3+
## [1.35.3]
84

95
FIXES:
106

11-
- improved error handling by storing all found HULL errors in the charts values tree instead of inline in the object YAMLs. Previously, HULL errors were written to the output YAML as the values of the properties where the errors occured and in a final parsing stage the complete YAML tree was searched and errors collected and raised. This approach was performance costly due to the complete parsing of the object YAMLs and also misses errors that happen in places which don't get rendered in the final object YAML. The new approach, that collects all errors seperately and later raises them if any are found, is less resource heavy and misses no errors.
7+
- fixed error handling changes because it caused installation failures with [errors in disabled content](https://github.com/vidispine/hull/issues/401) and [sub chart rendering](https://github.com/vidispine/hull/issues/393). Instead of the changed approach (raising every error that occurs during processing) and the original approach (raise only errors in rendered objects), a combined approach is used now. The old error handling practice is restored (raise all visible errors in templates) but extended with raising errors from `conditionals` references, however this is limited to the cases where the associated object is actually rendered. If errors in `conditional` references are recorded for objects that don't get rendered in the end, the errors are dropped.
8+
- improved error messages for better understanding and added object tree paths for direct identification of error source

hull/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: hull
3-
version: "1.35.2"
3+
version: "1.35.3"
44
description: HULL - Helm Uniform Layer Library
55
type: library
66
keywords:

hull/HISTORY.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# History
22

3+
## [1.35.3]
4+
5+
FIXES:
6+
7+
- fixed error handling changes because it caused installation failures with [errors in disabled content](https://github.com/vidispine/hull/issues/401) and [sub chart rendering](https://github.com/vidispine/hull/issues/393). Instead of the changed approach (raising every error that occurs during processing) and the original approach (raise only errors in rendered objects), a combined approach is used now. The old error handling practice is restored (raise all visible errors in templates) but extended with raising errors from `conditionals` references, however this is limited to the cases where the associated object is actually rendered. If errors in `conditional` references are recorded for objects that don't get rendered in the end, the errors are dropped.
8+
- improved error messages for better understanding and added object tree paths for direct identification of error source
9+
310
## [1.35.2]
411

512
CHANGES:

hull/files/test/HULL/sources/cases/basic/basic.values.hull.yaml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -904,11 +904,11 @@ hull:
904904
namespaceOverride: "different-namespace"
905905

906906
conditionals:
907-
annotations:
907+
annotations:
908908
test-annotation-1a-true: "1atrue"
909909
test-annotation-1b-true: "1btrue"
910910
test-annotation-1a-false: "1afalse"
911-
test-annotation-1b-false: "1bfalse"
911+
test-annotation-1b-false: "1bfalse"
912912
test-annotation-2a-true: "2atrue"
913913
test-annotation-2b-true: "2btrue"
914914
test-annotation-2a-false: "2afalse"
@@ -917,28 +917,25 @@ hull:
917917
conditionals:
918918
boolean-true:
919919
condition: _HT*hull.config.specific.bool_defined_true
920-
references:
920+
references:
921921
- annotations.test-annotation-1a-true
922922
- annotations.test-annotation-1b-true
923923
boolean-false:
924924
condition: _HT*hull.config.specific.bool_defined_false
925-
references:
925+
references:
926926
- annotations.test-annotation-1a-false
927927
- annotations.test-annotation-1b-false
928928
reference-true:
929929
condition: _HT?eq 3 3
930-
references:
930+
references:
931931
- annotations.test-annotation-2a-true
932932
- annotations.test-annotation-2b-true
933933
reference-false:
934934
condition: _HT?eq "a" "b"
935-
references:
935+
references:
936936
- annotations.test-annotation-2a-false
937937
- annotations.test-annotation-2b-false
938938
reference-dots:
939939
condition: _HT*hull.config.specific.bool_defined_false
940-
references:
941-
- annotations.test-annotation-3§dots§dot
942-
943-
944-
940+
references:
941+
- annotations.test-annotation-3§dots§dot

hull/files/test/HULL/sources/cases/customresource/values.fail-conditionals-reference.hull.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ hull:
1515

1616
# CONFIGMAPS
1717
customresource:
18-
18+
1919
conditionals-fail-reference:
2020
apiVersion: kustomize.toolkit.fluxcd.io/v1
2121
kind: Kustomization
2222
conditionals:
2323
decryption:
2424
condition: _HT*hull.config.specific.kustomization.encryption_not_exists
2525
references:
26-
- spec.decryption
26+
- spec.decryption
2727
broken:
2828
condition: _HT*hull.config.specific.kustomization.broken
2929
references:
30-
- spec.prune
30+
- spec.prune
3131
spec:
3232
interval: "1m0s"
3333
path: "./flux"

hull/files/test/HULL/sources/cases/customresource/values.hull.yaml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
hull:
88
config:
99
specific:
10+
this_is_false: false
1011
kustomization:
1112
encryption: true
1213
'i.have.dots.in.my.name': true
@@ -267,4 +268,30 @@ hull:
267268
name: sops-keys-and-credentials
268269
path.with.dots:
269270
prop_a: hello
270-
prop_b: goodbye
271+
prop_b: goodbye
272+
273+
conditionals-hidden-disabled:
274+
apiVersion: kustomize.toolkit.fluxcd.io/v1
275+
kind: Kustomization
276+
enabled: _HT*hull.config.specific.this_is_false
277+
conditionals:
278+
decryption:
279+
condition: _HT*hull.config.specific.kustomization.encryption_not_exists
280+
references:
281+
- spec.decryption
282+
broken:
283+
condition: _HT*hull.config.specific.kustomization.broken
284+
references:
285+
- spec.prune
286+
spec:
287+
interval: "1m0s"
288+
path: "./flux"
289+
prune: true
290+
sourceRef:
291+
kind: GitRepository
292+
name: flux-system
293+
decryption:
294+
provider: sops
295+
serviceAccountName: sops-identity
296+
secretRef:
297+
name: sops-keys-and-credentials

hull/files/test/HULL/sources/cases/virtualfolderdata/virtualfolderdata.values.hull.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,5 +886,12 @@ hull:
886886
{ inline: {{ printf "%s" ($certvalue | quote) }} },
887887
{{ end }}
888888
}
889-
889+
890+
issue-401-error-handling:
891+
data:
892+
myKey:
893+
enabled: _HT? hasKey _HT*hull.config.specific "myKey"
894+
inline: _HT*hull.config.specific.myKey
895+
896+
890897
###################################################

hull/files/test/HULL/specs/concepts/basic.cpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ Test namespace override
564564

565565
* Test Object has key "metadata§namespace" with value "different-namespace"
566566

567-
* Fail to render the templates for additional values file "failonemptynamespaceoverride.values.hull.yaml" to test execution folder because error contains "HULL failed with error MISSING-NAMESPACE-OVERRIDE: namespaceOverride for <OBJECT_TYPE> empty-namespace-override cannot be empty"
567+
* Fail to render the templates for additional values file "failonemptynamespaceoverride.values.hull.yaml" to test execution folder because error contains "HULL failed with error (@Values.hull.objects.<OBJECT_TYPE>.empty-namespace-override.namespaceOverride) Field namespaceOverride cannot be empty"
568568

569569
Test annotation rendering
570570

0 commit comments

Comments
 (0)