Skip to content

commands/operator-sdk/cmd: set composed GOPATH for Go projects (fix #712) #723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 9, 2018

Conversation

estroz
Copy link
Member

@estroz estroz commented Nov 8, 2018

Description of the change: see #712 for main change. Also changed CheckAndGetCurrPkg() to CheckAndGetProjectGoPkg(), and removed local constants in favor of projutil contstants.

Motivation for the change: see #712, and make function name more obvious. We had to revert #712 in #721 so Ansible operator users don't see errors when they shouldn't. Now the GOPATH check only occurs when calling CheckAndGetProjectGoPkg().

@nrobert13

@estroz estroz added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 8, 2018
@openshift-ci-robot
Copy link

@estroz: GitHub didn't allow me to request PR reviews from the following users: nrobert13.

Note that only operator-framework members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

Description of the change: see #712 for main change. Also changed CheckAndGetCurrPkg() to CheckAndGetProjectGoPkg(), and removed local constants in favor of projutil contstants.

Motivation for the change: see #712, and make function name more obvious. We had to revert #712 in #721 so Ansible operator users don't see errors when they shouldn't. Now the GOPATH check only occurs when calling CheckAndGetProjectGoPkg().

/cc @nrobert13

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 8, 2018
@estroz
Copy link
Member Author

estroz commented Nov 8, 2018

One thing I'd like to note is that we require go 1.10+ be installed, so all users (Ansible or not) should have a GOPATH env variable set. However the only command requiring go is operator-sdk test local; otherwise there are checks in place to make sure certain sub-commands are being run in a Golang project. Should we make a note that this requirement is only for building/developing operator-sdk and development of Golang operators?

@hasbro17
Copy link
Contributor

hasbro17 commented Nov 8, 2018

Should we make a note that this requirement is only for building/developing operator-sdk and development of Golang operators?

@estroz That's already mentioned in the ansible user-guide.
https://github.com/operator-framework/operator-sdk/blob/master/doc/ansible/user-guide.md#prerequisites

Of course they'll need it for the hybrid operator but that's another story.

Copy link
Member

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

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

LGTM

@estroz estroz merged commit eace682 into operator-framework:master Nov 9, 2018
@estroz estroz deleted the gopath-checks branch November 9, 2018 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants