Bug 1873007
Summary: | [downstream] failed to read config when running the operator-sdk in the home path | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Jian Zhang <jiazha> |
Component: | Operator SDK | Assignee: | Jesus M. Rodriguez <jesusr> |
Status: | CLOSED ERRATA | QA Contact: | Cuiping HUO <chuo> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 4.6 | CC: | aos-bugs, jesusr, jfan, jiazha |
Target Milestone: | --- | Keywords: | UpcomingSprint |
Target Release: | 4.7.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause:
All subcommands attempted to read the PROJECT file (even if it was a directory)
Consequence:
Subcommands that do not need the PROJECT file would fail to work.
Fix:
Changed the code so that subcommands that do not need the PROJECT file will skip reading it.
Result:
Subcommands like version, help, etc. that do not need information from the PROJECT file will work even if there is an invalid PROJECT file present.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2021-02-24 15:16:22 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jian Zhang
2020-08-27 06:33:12 UTC
This seems to be a coincidence of the environment. operator-sdk looks for a PROJECT file in the current working directory of the command to setup the CLI. If it finds a PROJECT directory it errors out. It seems like you may have a directory named /Users/jianzhang/PROJECT. If you rename that directory, or try the operator-sdk version command from a different directory that does not contain a PROJECT directory, you should see the expected result. Technically, I think this could be considered a minor bug since it shouldn't be necessary to read a PROJECT file to print the version information. However, note that the Operator SDK binary is not shipped downstream AND Operator SDK 0.19 is aligned with OpenShift 4.6 Filed upstream kubebuilder issue https://github.com/kubernetes-sigs/kubebuilder/issues/1755 Fixed upstream in v1.3.0. Pending downstream sync of 1.4.0 later this sprint. Verified. Run the operator-sdk command home path successfully. $ pwd /home/chuo [chuo@localhost ~]$ operator-sdk version operator-sdk version: "7cc6f20c", commit: "7cc6f20cccd9a16b1af0c270197dc7b374e2048c", kubernetes version: "v1.18.8", go version: "go1.14.2", GOOS: "linux", GOARCH: "amd64" 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), 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/RHSA-2020:5633 |