Page MenuHomePhabricator

Allow testing of feature-flag-protected features in deployment-charts CI
Closed, ResolvedPublic

Description

When adding a new feature to a chart, it's common practice to protect it beyond a feature flag, like tls.enabled with a default value of false.

This means, though, that simply running helm template in the directory won't catch errors in the chart modifications.

To overcome this, my proposal would be to allow to test with feature flags enabled by:

  • Adding a fixtures directory in the chart root
  • Add a file for each feature flags, with the list of values to define

CI will then run helm template both on a plain chart and with helm template -f fixtures/$filename for each file in that directory, thus assuring all scenarios we prepared are tested.

Event Timeline

Joe triaged this task as High priority.

Change 547179 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/deployment-charts@master] Rakefile: add the ability to run fixtures with special values

https://gerrit.wikimedia.org/r/547179

Change 547179 merged by jenkins-bot:
[operations/deployment-charts@master] Rakefile: add the ability to run fixtures with special values

https://gerrit.wikimedia.org/r/547179

Change 547403 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/deployment-charts@master] Rake: Add yaml validation

https://gerrit.wikimedia.org/r/547403

Change 547403 merged by jenkins-bot:
[operations/deployment-charts@master] Rake: Add yaml validation

https://gerrit.wikimedia.org/r/547403

The CI is far from perfect, but it catches the most mundane issues at least now.