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

Enable Strict mode to decode KubeOne API #802

Merged
merged 1 commit into from
Feb 24, 2020
Merged

Conversation

kron4eg
Copy link
Member

@kron4eg kron4eg commented Feb 24, 2020

What this PR does / why we need it:
To warn people at very early stages that they have some mistakes in their YAMLs

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #759

Does this PR introduce a user-facing change?:

Strict KubeOne config decoding

Signed-off-by: Artiom Diomin <artiom@loodse.com>
@kron4eg kron4eg requested a review from xmudrii February 24, 2020 11:24
@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. labels Feb 24, 2020
@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kron4eg

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

@kubermatic-bot kubermatic-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 24, 2020
@xmudrii
Copy link
Member

xmudrii commented Feb 24, 2020

Would it make sense to add a unit test to take the example configuration from pkg/cmd/config.go and try to parse it? In that case, we would know that example config and API are correct and that unmarshaling works as expected.

We can leave this for a follow-up, but I'm just wondering would that make any sense.

@kron4eg
Copy link
Member Author

kron4eg commented Feb 24, 2020

To me it would be "testing k8s.io/apimachinery/pkg/runtime/serializer" and why would we want it? So I avoided those tests.

Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

/lgtm

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 24, 2020
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c98486690fc1e6e421ad39555f516e1e23297660

@kubermatic-bot kubermatic-bot merged commit 88c89e0 into master Feb 24, 2020
@kubermatic-bot kubermatic-bot added this to the v0.11 milestone Feb 24, 2020
@kubermatic-bot kubermatic-bot deleted the strict_api_decoding branch February 24, 2020 12:03
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. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use strict config unmarshaling
3 participants