-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
*: upgrade kubebuilder, add go/v3-alpha to the list of available plugins #4282
*: upgrade kubebuilder, add go/v3-alpha to the list of available plugins #4282
Conversation
Note: because we're blocking the next release on having a stable go/v3 plugin in operator-sdk, I'm foregoing adding a changelog fragment for go/v3-alpha and updating docs until go/v3 is stabilized then made the default plugin. |
274c755
to
6cf9458
Compare
manifests.sdk.operatorframework.io/v2: {} | ||
scorecard.sdk.operatorframework.io/v2: {} |
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.
Notice that these two plugins have been componentized from the go plugin wrapper. This was done to make their config objects more akin to how they'll look after they're implemented as phase 2 plugins. This doesn't break any projects because the old go.sdk.operatorframework.io/v2-alpha
plugin still exists, but for go.kubebuilder.io/v2
projects only.
// NewPartialTestContext returns a TestContext containing a partial kubebuilder TestContext. | ||
// This object needs to be populated with GVK information. The underlying TestContext is | ||
// created directly rather than through a constructor so cluster-based setup is skipped. | ||
func NewPartialTestContext(binaryName, dir string, env ...string) (tc TestContext, err error) { |
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.
This constructor was needed because kbtestutils.NewTestContext()
is for live cluster testing and uses cluster API calls to set up e2e state. The partial context returned here is useful for local, non-cluster testing because it doesn't include these calls.
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.
The problem shows to be the kubetcl.Version() kubernetes-sigs/kubebuilder@ea3a94a#diff-7b614da29899d7d7eb4aa3b60ed598604da518c4f2dd1e6af954c942fb1c3dc3R62 introduced in the PR: kubernetes-sigs/kubebuilder#1840
However, it shows fine. But WDTY about rename it accordingly with the definition that you made on the comment? I mean, something such as NewNoClusterTestContext
or NewLocalTestContext
?
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 was thinking Partial
to inform the caller that the context they get back won't have certain fields populated, but cluster vs. local could work too. Follow-up?
6cf9458
to
f8e26b5
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.
See: #4232 (comment)
// KustomizeBuild runs 'kustomize build <dir>' and returns its output and an error if any. | ||
func (tc TestContext) KustomizeBuild(dir string) ([]byte, error) { | ||
return tc.Run(exec.Command("kustomize", "build", dir)) | ||
} |
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.
👍 good catcher.
1059737
to
b03ecd5
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.
Hi @estroz,
I am ok with we move forward here. Just a few nits:
- Should not we add a changelog entry for the new alpha plugin?
- Also, wdyt about we add a statement policy in the docs here such as
backport-policy/
describing that alpha plugins are tech-preview and are not supported? - Then, should we not replicated the e2e test for the v3/go-alpha plugin as well?
This plugin version won't be in a release since we're blocking the next release on go/v3 being stable.
See above.
Yes there should be two sets of tests, I'll do this in a follow-up since it'll be more difficult to review this PR with them. |
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.
Based on the definitions in #4282 (comment) it shows fine and accordingly with the sttategy in place 👍
/lgtm
hack/generate/samples/internal/go/v2/memcached_with_webhooks.go
Outdated
Show resolved
Hide resolved
b03ecd5
to
712f9d5
Compare
New changes are detected. LGTM label has been removed. |
712f9d5
to
5329d28
Compare
plugins testdata: regenerate samples with go/v3-alpha test: test go/v3-alpha
5329d28
to
8eee970
Compare
…ins (operator-framework#4282) go.mod: upgrade kubebuilder to latest master commit internal/came/operator-sdk: add go/v3-alpha to the list of available plugins testdata: update v2 samples and add v3 samples test: test go/v3-alpha
…ins (operator-framework#4282) go.mod: upgrade kubebuilder to latest master commit internal/came/operator-sdk: add go/v3-alpha to the list of available plugins testdata: update v2 samples and add v3 samples test: test go/v3-alpha Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
…ins (operator-framework#4282) go.mod: upgrade kubebuilder to latest master commit internal/came/operator-sdk: add go/v3-alpha to the list of available plugins testdata: update v2 samples and add v3 samples test: test go/v3-alpha Signed-off-by: rearl <rearl@secureworks.com>
Description of the change:
Motivation for the change: changes necessary for the upcoming stabilization of go/v3 and use as the default plugin.
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs