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

generate: remove --operator-name #3530

Merged
merged 1 commit into from
Jul 29, 2020

Conversation

estroz
Copy link
Member

@estroz estroz commented Jul 24, 2020

Description of the change: remove --operator-name flag

Motivation for the change: projectName is now universal for plugins, so should be used instead of a flag value.

/cc @joelanford @camilamacedo86 @hasbro17

Checklist

If the pull request includes user-facing changes, extra documentation is required:

go.mod Outdated Show resolved Hide resolved
Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

/lgtm 👍

Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

One (repeated) question.

Otherwise
/lgtm

cmd/operator-sdk/generate/bundle/bundle.go Outdated Show resolved Hide resolved
cmd/operator-sdk/generate/bundle/cmd.go Outdated Show resolved Hide resolved
cmd/operator-sdk/generate/kustomize/manifests.go Outdated Show resolved Hide resolved
@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 25, 2020
Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

IMO it is blocked by #3341.

Note that in #3341 we are centralizing the code to getOperatorName where has the validations suggested by @joelanford in the review made here. And then, we can:

PS.: Note that the goal of #3341 is to fixes OLM subcommands for NoGo operators and add the tests to ensure that all will work well as expected.

@camilamacedo86 camilamacedo86 dismissed their stale review July 28, 2020 14:45

Now it can be merged :-)

@joelanford joelanford mentioned this pull request Jul 29, 2020
92 tasks
@estroz estroz changed the title *: use config's projectName over --operator-name, and remove flag generate: remove --operator-name Jul 29, 2020
@openshift-ci-robot openshift-ci-robot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 29, 2020
@estroz estroz force-pushed the chore/use-project-name branch 3 times, most recently from 35077ce to bf0d53d Compare July 29, 2020 20:09
Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 29, 2020
Copy link
Member

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

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

Minor nit if you have to fix other things. If not ignore. And a question to make sure we meant to remove the lower casing.

# release notes and/or the migration guide
entries:
- description: >
Remove `--operator-name` from `generate` subcommands in favor of using `project-name`
Copy link
Member

Choose a reason for hiding this comment

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

Nit, not a PR blocker: I ended up having to update these to be past tense Removed because the changelog read weird with just Remove. For the migration guide Remove makes sense since it's an instruction.

@@ -173,7 +172,7 @@ func (g Generator) makeBaseGetter(inputDir string) func() (*apimanifests.Package

// makePkgManFileName will return the file name of a PackageManifest.
func makePkgManFileName(operatorName string) string {
return strings.ToLower(operatorName) + packageManifestFileExt
return operatorName + packageManifestFileExt
Copy link
Member

Choose a reason for hiding this comment

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

Do we no longer need to lowercase this?

Copy link
Member Author

Choose a reason for hiding this comment

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

We should assume operatorName is lowercased at this point.

Copy link
Member

@rashmigottipati rashmigottipati 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 bbc2f25 into operator-framework:master Jul 29, 2020
@estroz estroz deleted the chore/use-project-name branch July 29, 2020 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants