Page MenuHomeElementl

[RFC] Implement Helm user code deployment tests
ClosedPublic

Authored by rexledesma on Feb 26 2021, 9:21 PM.

Details

Summary

Depends on D6691, D6705.

Models the values input as a pydantic model, renders a specified template
that is manipulated by the input, and then asserts qualities about the rendered template(s).

Test Plan

bk
integration

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

hey sorry for the delay on this - seems pretty good to me. Added @johann since hes done plenty of helm changes so would be curious for his take

some inline ? on misc changes that are not clear to me why they are in this diff

helm/dagster/Chart.lock
1 ↗(On Diff #32716)

?

helm/dagster/values.schema.json
106

?

@alangenfeld was just drift from upstream - just rebased and they're removed now.

helm/dagster/schema/schema_tests/test_user_deployments.py
20–27

I think there's a better way to do this (i.e. parameterizing the fixtures) so will refactor later

helm/dagster/schema/schema/subschema/kubernetes.py
62

Since we are now using the kubernetes objects to model the values in the tests, this override is required so that we can construct the object from a dictionary. We take this approach since we defer to the json schema to determine what fields are available to this object.

I think this lgtm. Per offline discussion, might use something like kubeval rather than deserializing with the k8s client

helm/dagster/schema/schema/subschema/user_deployments.py
13

I was a little confused by this- could add a note about what this does

This revision is now accepted and ready to land.Mar 9 2021, 8:46 PM
rexledesma retitled this revision from [RFC] Implement tests for Helm chart to [RFC] Implement Helm user code deployment tests.Mar 9 2021, 10:23 PM