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

✨ (kustomize/v1) add validation to let users know when the architecture used to run the plugin is not supported #2698

Merged

Conversation

camilamacedo86
Copy link
Member

Description
(kustomize/v1) add validation to let users know when the architecture used to run the plugin is not supported

Motivation
We have seen many users get stuck. So, the idea here is clarifying for contributors, KB lib consumers and end-users what are the current support architectures by kustomize/v1. Example: operator-framework/operator-sdk#5785

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 24, 2022
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 24, 2022
@camilamacedo86
Copy link
Member Author

/test pull-kubebuilder-e2e-k8s-1-16-15

Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

First round. I like the idea of improving the error message to be more descriptive!

docs/book/src/plugins/kustomize-v1.md Outdated Show resolved Hide resolved
docs/book/src/plugins/kustomize-v1.md Outdated Show resolved Hide resolved
docs/book/src/plugins/kustomize-v1.md Outdated Show resolved Hide resolved
pkg/plugins/common/kustomize/v1/init.go Outdated Show resolved Hide resolved
pkg/plugins/common/kustomize/v1/init.go Outdated Show resolved Hide resolved
pkg/plugins/common/kustomize/v1/init.go Outdated Show resolved Hide resolved
pkg/plugins/common/kustomize/v1/init.go Outdated Show resolved Hide resolved
pkg/plugins/common/kustomize/v1/init.go Show resolved Hide resolved
pkg/plugins/common/kustomize/v1/init.go Outdated Show resolved Hide resolved
pkg/plugins/common/kustomize/v1/init.go Outdated Show resolved Hide resolved
@camilamacedo86 camilamacedo86 force-pushed the kustomize-warnings branch 3 times, most recently from 3d4bb04 to 7873b85 Compare May 25, 2022 01:18
@camilamacedo86
Copy link
Member Author

@everettraven thank you for the excellent review!

Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

A couple minor nits and a question regarding the x86_64 replaces

docs/book/src/plugins/kustomize-v1.md Outdated Show resolved Hide resolved
pkg/plugins/common/kustomize/v1/init.go Outdated Show resolved Hide resolved
pkg/plugins/common/kustomize/v1/init.go Outdated Show resolved Hide resolved
pkg/plugins/common/kustomize/v1/init.go Outdated Show resolved Hide resolved
pkg/plugins/common/kustomize/v1/init.go Outdated Show resolved Hide resolved
pkg/plugins/common/kustomize/v1/init.go Show resolved Hide resolved
@camilamacedo86
Copy link
Member Author

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label May 26, 2022
Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot
Copy link
Contributor

@everettraven: changing LGTM is restricted to collaborators

In response to this:

/lgtm

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.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, everettraven

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@camilamacedo86 camilamacedo86 force-pushed the kustomize-warnings branch 2 times, most recently from 216963a to fd4765c Compare May 26, 2022 15:57
Copy link

@FillZpp FillZpp left a comment

Choose a reason for hiding this comment

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

Just some nits :)

docs/book/src/plugins/kustomize-v1.md Outdated Show resolved Hide resolved
docs/book/src/plugins/kustomize-v1.md Outdated Show resolved Hide resolved
pkg/plugins/common/kustomize/v1/init.go Outdated Show resolved Hide resolved
supportedArchs)
}

return nil
Copy link

Choose a reason for hiding this comment

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

It seems the error return of this function will always be nil?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, because we will never return an error here so far.
See that it is an implementation of the interface:

// PreScaffold executes tasks before the main scaffolding.
	PreScaffold(machinery.Filesystem) error

…re used to run the plugin is not supported

Co-authored-by: Bryce Palmer <everettraven@gmail.com>
@camilamacedo86
Copy link
Member Author

camilamacedo86 commented May 29, 2022

Hi @FillZpp,

Thank you for the review. 🥇
All addressed :-)

@FillZpp
Copy link

FillZpp commented May 30, 2022

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 30, 2022
@k8s-ci-robot k8s-ci-robot merged commit c7d57aa into kubernetes-sigs:master May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants