openshift / must-gather

A client tool for gathering information about an operator managed component.
Apache License 2.0
104 stars 189 forks source link

OCPBUGS-34323: Collection-scripts as go package #428

Closed dfajmon closed 4 months ago

dfajmon commented 4 months ago

Related jira ticket https://issues.redhat.com/browse/OCPBUGS-34323

Local-storage-operator and secrets-store-csi-driver-operator must-gather plugins now have a copy of common.sh from must-gather repo. If there is a bugfix in that script, we must copy it manually.

We decided the most optimal way for us to have the script up to date is using go vendoring and making the collection-scripts as a go package. This means we need to add go file, marking it as a package.

We are already using this trick in Build Machinery Go where we add it to go.mod and import it in dir Dependency magnet and the scripts (in this example makefiles) are downloaded.

openshift-ci-robot commented 4 months ago

@dfajmon: This pull request references Jira Issue OCPBUGS-34323, which is invalid:

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to [this](https://github.com/openshift/must-gather/pull/428): >Related jira ticket https://issues.redhat.com/browse/OCPBUGS-34323 > >[Local-storage-operator](https://github.com/openshift/local-storage-operator/tree/master/must-gather) and [secrets-store-csi-driver-operator](https://github.com/openshift/secrets-store-csi-driver-operator/tree/main/must-gather) must-gather plugins now have a copy of [common.sh from must-gather repo](https://github.com/openshift/must-gather/blob/master/collection-scripts/common.sh). If there is a bugfix in that script, we must copy it manually. > >We decided the most optimal way for us to have the script up to date is using go vendoring and making the collection-scripts as a go package. This means we need to add go file, marking it as a package. > >We are already using this trick in [Build Machinery Go](https://github.com/openshift/cluster-storage-operator/tree/master/vendor/github.com/openshift/build-machinery-go) where we add it to go.mod and import it in dir [Dependency magnet](https://github.com/openshift/cluster-storage-operator/blob/master/pkg/dependencymagnet/dependencymagnet.go) and the scripts (in this example makefiles) are downloaded. Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fmust-gather). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci[bot] commented 4 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dfajmon Once this PR has been reviewed and has the lgtm label, please assign davemulford for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[collection-scripts/OWNERS](https://github.com/openshift/must-gather/blob/master/collection-scripts/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci[bot] commented 4 months ago

@dfajmon: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
dfajmon commented 4 months ago

we decided to use must-gather image instead.

openshift-ci-robot commented 4 months ago

@dfajmon: This pull request references Jira Issue OCPBUGS-34323. The bug has been updated to no longer refer to the pull request using the external bug tracker.

In response to [this](https://github.com/openshift/must-gather/pull/428): >Related jira ticket https://issues.redhat.com/browse/OCPBUGS-34323 > >[Local-storage-operator](https://github.com/openshift/local-storage-operator/tree/master/must-gather) and [secrets-store-csi-driver-operator](https://github.com/openshift/secrets-store-csi-driver-operator/tree/main/must-gather) must-gather plugins now have a copy of [common.sh from must-gather repo](https://github.com/openshift/must-gather/blob/master/collection-scripts/common.sh). If there is a bugfix in that script, we must copy it manually. > >We decided the most optimal way for us to have the script up to date is using go vendoring and making the collection-scripts as a go package. This means we need to add go file, marking it as a package. > >We are already using this trick in [Build Machinery Go](https://github.com/openshift/cluster-storage-operator/tree/master/vendor/github.com/openshift/build-machinery-go) where we add it to go.mod and import it in dir [Dependency magnet](https://github.com/openshift/cluster-storage-operator/blob/master/pkg/dependencymagnet/dependencymagnet.go) and the scripts (in this example makefiles) are downloaded. Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fmust-gather). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.