Skip to content
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

Exit if not a Go project #672

Merged
merged 1 commit into from
Nov 7, 2018
Merged

Conversation

estroz
Copy link
Member

@estroz estroz commented Oct 30, 2018

Description of the change: add MustGoProject function to exit if the current operator project is not a Go project.

Motivation for the change: see #670

@estroz estroz added the kind/bug Categorizes issue or PR as related to a bug. label Oct 30, 2018
@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 30, 2018
@shawn-hurley
Copy link
Member

/hold

I want to discuss how someone might transition from ansible operator to hybrid before we consider this a bug and fix it with this PR.

I am not opposed to this, if we have a better transition story I just don't want to box us in right away.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 30, 2018
@estroz
Copy link
Member Author

estroz commented Oct 30, 2018

@shawn-hurley is a hybrid project currently possible, given how we generate and make assumptions about project scaffolds?

@hasbro17
Copy link
Contributor

@estroz It's probably not possible right now given that users have no way of scaffolding the cmd/manager/main.go entry point or Gopkg.toml in an ansible project. But I think @shawn-hurley has a point that we should consider the transition story before we make this change.

We can probably tolerate this until then since these commands won't cause any issues other than spitting out extraneous files if the user does end up running them in an ansible or helm project's context.

Let's follow up the discussion for the transition story on #670 until then.

@hasbro17 hasbro17 changed the title internal/util/projutil: add function to exit if not a Go project [DO NOT MERGE] internal/util/projutil: add function to exit if not a Go project Oct 30, 2018
@estroz estroz changed the title [DO NOT MERGE] internal/util/projutil: add function to exit if not a Go project [DO NOT MERGE] exit if not a Go project Nov 1, 2018
@shawn-hurley
Copy link
Member

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 2, 2018
@estroz estroz changed the title [DO NOT MERGE] exit if not a Go project Exit if not a Go project Nov 2, 2018
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 2, 2018
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 5, 2018
commands/operator-sdk/{add,generate}: exit if not a Go project for
'add {api,controller}', 'generate k8s' sub-commands
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 ef664ed into operator-framework:master Nov 7, 2018
@estroz estroz deleted the fix-670 branch November 7, 2018 21:34
@hasbro17 hasbro17 mentioned this pull request Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants