Skip to content

Conversation

@olivergondza
Copy link
Collaborator

This is a regression form 1.17[1], works in 1.16. Script fails with error: resource name may not be empty. This happens when the added quoting in oc get ... "$(xxx)" ... caused the argument is now empty instead of missing.

[1] https://github.com/redhat-developer/gitops-must-gather/pull/31/files

What type of PR is this?

Uncomment only one /kind line, and delete the rest.
For example, > /kind bug would simply become: /kind bug

/kind bug

/kind cleanup
/kind failing-test
/kind enhancement
/kind documentation
/kind code-refactoring

What does this PR do / why we need it:

Fixes the bug. Improved error reporting. Refactors the code so shellcheck can be happy. This also enabled removing following in the future:

# Getting non.existent.crd is a hack to avoid getting all available crds in the cluster in case there are no owned resources that do not contain "argoproj.io"

Have you updated the necessary documentation?

  • [n/a] Documentation update is required by this PR.
  • [n/a] Documentation has been updated.

Which issue(s) this PR fixes:

None

Test acceptance criteria:

  • Unit Test
  • E2E Test

How to test changes / Special notes to the reviewer:

This was verified by running locally and compared to the results of oc adm must-gather --image=registry.redhat.io/openshift-gitops-1/must-gather-rhel8:v1.16.0.

@openshift-ci
Copy link

openshift-ci bot commented Sep 1, 2025

@olivergondza: The label(s) kind/bug cannot be applied, because the repository doesn't have them.

Details

In response to this:

This is a regression form 1.17[1], works in 1.16. Script fails with error: resource name may not be empty. This happens when the added quoting in oc get ... "$(xxx)" ... caused the argument is now empty instead of missing.

[1] https://github.com/redhat-developer/gitops-must-gather/pull/31/files

What type of PR is this?

Uncomment only one /kind line, and delete the rest.
For example, > /kind bug would simply become: /kind bug

/kind bug

/kind cleanup
/kind failing-test
/kind enhancement
/kind documentation
/kind code-refactoring

What does this PR do / why we need it:

Fixes the bug. Improved error reporting. Refactors the code so shellcheck can be happy. This also enabled removing following in the future:

# Getting non.existent.crd is a hack to avoid getting all available crds in the cluster in case there are no owned resources that do not contain "argoproj.io"

Have you updated the necessary documentation?

  • [n/a] Documentation update is required by this PR.
  • [n/a] Documentation has been updated.

Which issue(s) this PR fixes:

None

Test acceptance criteria:

  • Unit Test
  • E2E Test

How to test changes / Special notes to the reviewer:

This was verified by running locally and compared to the results of oc adm must-gather --image=registry.redhat.io/openshift-gitops-1/must-gather-rhel8:v1.16.0.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@olivergondza
Copy link
Collaborator Author

Working on contributing a verification for this. For now, cluster-scoped-resources/apiextensions.k8s.io/customresourcedefinitions/gitopsservices.pipelines.openshift.io.yaml seems to be missing for reasons yet to be determined.

@olivergondza
Copy link
Collaborator Author

olivergondza commented Sep 2, 2025

Alright, all fixed. The output can be compared with 1.16 using:

./test/compare.sh registry.redhat.io/openshift-gitops-1/must-gather-rhel8:v1.16.0 quay.io/ogondza/gitops-must-gather:490ce444c73266f5a008425fd5464ac1436e967b

Edit: Tag updated


```shell
chmod +x ./gather_gitops.sh
./gather_gitops.sh --base-collection-path .
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not work since #23.

@jannfis
Copy link
Member

jannfis commented Sep 4, 2025

/ok-to-test

Copy link
Member

@anandf anandf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jannfis
Copy link
Member

jannfis commented Sep 4, 2025

/ok-to-test

@jannfis
Copy link
Member

jannfis commented Sep 4, 2025

/lgtm

@jannfis
Copy link
Member

jannfis commented Sep 4, 2025

/approve

1 similar comment
@jannfis
Copy link
Member

jannfis commented Sep 4, 2025

/approve

Copy link
Member

@jannfis jannfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jannfis jannfis merged commit 135850b into redhat-developer:main Sep 4, 2025
4 of 5 checks passed
@olivergondza olivergondza deleted the fix-eventually-empty-process-substitutions branch September 4, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants