Skip to content

Conversation

ljluestc
Copy link

This PR addresses the panic: value is null crash when processing the IstioOperator manifest (issue #62) by adding the stripNullFields function to remove null values from YAML manifests. It also fixes failing tests and adds validation for the IstioOperator case.

Changes:

  • Added stripNullFields function to recursively remove null fields when --strip-null is used.
  • Updated TestYAMLToHCLStripNull to use four-space indentation, matching terraform.FormatValue output.
  • Fixed TestYAMLToTerraformResourcesMapOnly to set mapOnly=true and updated expected HCL.
  • Added TestYAMLToHCLIstioOperatorStripNull to verify the IstioOperator manifest is processed correctly.
  • Ensured all tests pass with make test.

Testing:

  • Ran make test to confirm all tests pass.

@jrhouston
Copy link
Owner

Thanks for adding this @ljluestc I pushed a commit removing some redundant logic and adding an additional case to the test. I see you've left this in draft, was there something else you were going to add here? If not I'm happy to merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants