-
Notifications
You must be signed in to change notification settings - Fork 1.8k
*: clean up samples #4035
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
*: clean up samples #4035
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
||
*\.DS_Store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -43,7 +41,7 @@ func main() { | |||
os.Exit(1) | |||
} | |||
|
|||
samplesPath := filepath.Join(currentPath, testdata) | |||
samplesPath := filepath.Join(currentPath, "testdata") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I caught this error on the ansible generator, missed it here. Good catch.
|
||
// Clean up built binaries, if any. | ||
pkg.CheckError("cleaning up", os.RemoveAll(filepath.Join(mh.ctx.Dir, "bin"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to removing binaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we should add this to the gitignore. @camilamacedo86 is doing that in her PR, so no change needed, just FYI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will need anyway. To solve the problem in the sanity I added git diff --exit-code -- . ':!testdata/go/memcached-operator/bin/*'
since the bin will be gen again in the CI process.
However, the sanity sh will be also be removed in the #4023
9dfdf2f
to
03271be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
We should also totally add a sanity check for lines that end with whitespace.
|
||
// NewSampleContextWithTestContext returns a SampleContext containing the kubebuilder TestContext informed | ||
// It is useful to allow the samples code be re-used in the e2e tests. | ||
func NewSampleContextWithTestContext(tc *testutils.TestContext) (s SampleContext, err error) { | ||
s.TestContext = *tc | ||
return s, err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is usefiul for the e2e test.
I am ok to remove that here but it will be added in the next follow-ups again.
@@ -68,7 +68,7 @@ operator-sdk init --domain example.com --repo github.com/example-inc/memcached-o | |||
|
|||
## Check if your project is multi-group | |||
|
|||
Before we start to create the APIs, check if your project has more than one group such as : `foo.example.com/v1` and `crew.example.com/v1`. If you intend to still working on with multiple groups in your project, then add the line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sidenote, maybe we ought to add these style checks in our linter to make reviews easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's track this need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Description of the change:
memcached_controller.go.tmpl
make
runsMotivation for the change: fixes CI and remove unnecessary files
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs