UNCLASSIFIED - NO CUI

Skip to content

cypressrunner: fix non-optional sidecar resources

Daniel Dides requested to merge dd/fix-optional-gluon-resources into master

General MR

Summary

!42 (merged) accidentally introduced a small bug where the istio sidecar configuration block wasn't optional, causing package linting pipelines to fail on downstream dependencies (e.g.: jira, argo).

This MR introduces a few extra nil-checks to only evaluate the with statement if the resources block is defined.

Relevant logs/screenshots

0.4.3:

(dd/update-gluon-dep)> helm template build chart --set bbtests.enabled=true | grep argocd-cypress-test
Error: template: argocd/templates/tests/argocd-cypress-test.yaml:14:4: executing "argocd/templates/tests/argocd-cypress-test.yaml" at <include "gluon.tests.cypress-runner.overrides" (list . "argocd-test.cypress-runner")>: error calling include: template: argocd/charts/gluon/templates/bb-tests/_cypressrunner.yaml:214:4: executing "gluon.tests.cypress-runner.overrides" at <include "gluon.util.merge" (append . "gluon.tests.cypress-runner.tpl")>: error calling include: template: argocd/charts/gluon/templates/_util.yaml:11:22: executing "gluon.util.merge" at <include (index . 2) $top>: error calling include: template: argocd/charts/gluon/templates/bb-tests/_cypressrunner.yaml:14:20: executing "gluon.tests.cypress-runner.tpl" at <.Values.bbtests.istio.sidecar.resources>: nil pointer evaluating interface {}.sidecar

Use --debug flag to render out invalid YAML

0.4.4:

(dd/update-gluon-dep)> helm template build chart --set bbtests.enabled=true | grep argocd-cypress-test
# Source: argocd/templates/tests/argocd-cypress-test.yaml
# Source: argocd/templates/tests/argocd-cypress-test.yaml
  name: argocd-cypress-test
    name: argocd-cypress-test

Manually built and pushed to the argocd MR that was open and 0.4.4 passed in the pipelines here: https://repo1.dso.mil/big-bang/product/packages/argocd/-/jobs/27378725#L37

Edited by Daniel Dides

Merge request reports