Skip to content

Discrepancy between informational message and actual behavior in ci/kustomize.sh #639

@coderabbitai

Description

@coderabbitai

Description

There's a discrepancy between the informational message and the actual find commands used in ci/kustomize.sh.

Issue Details

  • Line 71 states: echo "Starting to run kustomize '${kustomize_version}' for each kustomization.yaml file except components"
  • Line 73 has a comment: # We don't want to execute kustomization on the components part as it's not intended to be used that way.
  • However, lines 76 and 79 (find . -name "kustomization.yaml" ...) process all kustomization.yaml files found in the current directory and its subdirectories, without actually excluding any components directory.

Current Behavior vs Expected

The script currently processes ALL kustomization.yaml files, but the message and comments suggest it should exclude components.

Lines 75 and 78 show commented-out versions that DO exclude components using grep -v "components":

  • Line 75: # find . -name "kustomization.yaml" | xargs dirname | grep -v "components" | xargs -I {} "${kustomize_bin}" build {} >"${kustomize_stdout}" 2>"${kustomize_stderr}"
  • Line 78: # find . -name "kustomization.yaml" | xargs dirname | grep -v "components" | xargs --verbose -I {} "${kustomize_bin}" build {} >/dev/null

Possible Solutions

Either:

  1. Update the find commands to actually exclude components (uncomment and use lines 75, 78)
  2. Update the informational message on line 71 to reflect that all kustomization.yaml files are processed

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions