Skip to content

Mergable specs missing some collectors if one of the specs has a uri field #1540

Closed
@banjoh

Description

@banjoh

Bug Description

When merging specs, and one of the specs happens to be updatable i.e has the uri field defined, the resulting merged spec ends up missing some of the collectors defined.

Expected Behavior

All specs (collectors/analysers/redactors) should be present in the merged spec.

Steps To Reproduce

Create sample data spec

cat << EOF > spec.yaml
apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
spec:
  collectors:
    - data:
        name: sample-data.txt
        data: |
          any static
          data can be used here
EOF

Using the newest version of support-bundle, dry-run using the command below and search for sample-data.txt. Note that sample-data.txt is missing

[evans] $ support-bundle version
Replicated Troubleshoot v0.91.0
[evans] $ support-bundle --dry-run spec.yaml https://raw.githubusercontent.com/replicatedhq/troubleshoot-specs/main/in-cluster/default.yaml | grep sample-data.txt; echo $?
1

In an older version of support bundle, this issue is absent

[evans] $ support-bundle version
Replicated Troubleshoot v0.90.0
[evans] $ support-bundle --dry-run spec.yaml https://raw.githubusercontent.com/replicatedhq/troubleshoot-specs/main/in-cluster/default.yaml | grep sample-data.txt
      name: sample-data.txt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions