Bug 1882699 - Make gen-doc work outside of GOPATH
Summary: Make gen-doc work outside of GOPATH
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Insights Operator
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.6.0
Assignee: Martin Kunc
QA Contact: Pavel Šimovec
Marc Muehlfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-25 11:20 UTC by Ivo Meixner
Modified: 2020-10-27 16:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:45:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift insights-operator pull 193 0 None open Bug 1882699: Make gen-doc work outside of GOPATH 2020-09-25 11:21:00 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:45:45 UTC

Description Ivo Meixner 2020-09-25 11:20:40 UTC
Description of problem:
Right now, running `make gen-doc` when the Insights Operator repository is not cloned into the GOPATH results in strange errors because that's what the code expects. It would be nice to fix that since I.O. now uses modern Go with modules and therefore cloning into GOPATH is no longer necessary, nor is it desirable.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Pavel Šimovec 2020-09-25 22:49:50 UTC
One commit before the one in mentione PR:
running make gen-doc
...
GatherMachineSet
Error when running Example in package home/psimovec/zaloha/insights-operator/pkg/gather/clusterconfig method ExampleMostRecentMetrics
exit status 1
sample2973194451432506304.go:2:9: cannot find package "." in:
	/home/psimovec/zaloha/insights-operator/vendor/home/psimovec/zaloha/insights-operator/pkg/gather/clusterconfig

Error when running Example in package home/psimovec/zaloha/insights-operator/pkg/gather/clusterconfig method ExampleClusterOperators
exit status 1
sample7734107962907469252.go:2:9: cannot find package "." in:
	/home/psimovec/zaloha/insights-operator/vendor/home/psimovec/zaloha/insights-operator/pkg/gather/clusterconfig

Error when running Example in package home/psimovec/zaloha/insights-operator/pkg/gather/clusterconfig method ExampleNodes
exit status 1
sample777803314506547199.go:2:9: cannot find package "." in:
	/home/psimovec/zaloha/insights-operator/vendor/home/psimovec/zaloha/insights-operator/pkg/gather/clusterconfig

Done%                                                                                                                                                                                                          


After applying commit from this PR
...
GatherMachineSet
ExampleMostRecentMetrics
ExampleClusterOperators
ExampleNodes
ExampleMostRecentMetrics
ExampleClusterOperators
ExampleNodes
Done
make gen-doc  74.55s user 5.21s system 511% cpu 15.597 total

Comment 5 errata-xmlrpc 2020-10-27 16:45:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4196


Note You need to log in before you can comment on or make changes to this bug.