Closed aiyengar2 closed 1 year ago
Instead of resolving this as a feature flag created via environment variable, I think it makes more sense to create a Go binary version of Hull (in a cmd
directory).
This binary can offer features around file management in a repository using Hull with Helm charts, such as:
.github/workflows
directory to set up CIAll mutating operations can then be put in the binary (to be explicitly called by a developer) instead of being done during a test execution.
Instead of resolving this as a Go Binary, I'm switching the approach to providing library functions for users to be able to run go generate
to create and manage the values.schema.json
file. Example will be provided on how to set up code generation to do that.
This otherwise offers the same possibilities as listed above in the binary approach but in a more user-configurable way.
Now supported via go generate
, docs are updated too
Currently the behavior of hull is to automatically handle overriding the JSON schema on seeing a test error; however, this behavior can result in pitfalls as users do not expect running a test to modify the content of what is being tested.
Instead, processing an automatic override should be guarded by an environment variable that needs to be set on a go test run (
OVERWRITE_SCHEMA=1
) to automatically perform this action.