ssc-spc-ccoe-cei / gcp-tools

This repo is meant to be a submodule of the gcp-repo-template repository. https://github.com/ssc-spc-ccoe-cei/gcp-repo-template
3 stars 3 forks source link

fix: generate docs bugs #77

Closed alaincormier-ssc closed 6 months ago

alaincormier-ssc commented 6 months ago

inventory-controls.py error when parsing YAML resource in comment

Traceback (most recent call last):
  File "...myrepo/tools/scripts/kpt/../common/inventory-controls.py", line 55, in <module>
    resource_name = data['metadata']['name']
TypeError: 'NoneType' object is not subscriptable
Script terminating unexpectedly with exit code: 1

fix: add test to only process valid resources

generate-docs.sh error when running kpt docs with a Kptfile containing mutators selectors

[FAIL] "gcr.io/kpt-fn/generate-kpt-pkg-docs:unstable" in 700ms
  Results:
    [error]: failed to generate doc: failed to decode Kptfile: invalid 'v1' Kptfile: yaml: unmarshal errors:   line 41: field selectors not found in type v1.Function
  Stderr:
    "failed to decode Kptfile: invalid 'v1' Kptfile: yaml: unmarshal errors:"
    "  line 41: field selectors not found in type v1.Function"
  Exit code: 1

Script terminating unexpectedly with exit code: 1

fix: remove the 'selectors' before running the function in the temp directory