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

Decoupled Constraints API object from internal representation #1603

Merged
merged 1 commit into from
Mar 31, 2022

Conversation

ellistarn
Copy link
Contributor

1. Issue, if available:
#1350

2. Description of changes:
This is the first change in a series of changes to decouple the v1alpha5 API package from our internal node representation.

3. How was this change tested?

4. Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: link to issue
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ellistarn ellistarn requested a review from a team as a code owner March 31, 2022 16:27
@netlify
Copy link

netlify bot commented Mar 31, 2022

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit dd35abc
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/62460b4f76c72900082f6b9e

@ellistarn ellistarn force-pushed the provider branch 4 times, most recently from 17b953f to af39618 Compare March 31, 2022 17:42
aws := &AWS{}
_, gvk, err := Codec.UniversalDeserializer().Decode(constraints.Provider.Raw, nil, aws)
p := &Provider{}
_, gvk, err := Codec.UniversalDeserializer().Decode(provider.Raw, nil, p)
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this wasn't changed, but it looked weird and from my reading of the docs we are safer to use the return value as opposed to assuming it populates p:

        // If into is non-nil, it will be used as the target type
	// and implementations may choose to use it rather than reallocating an object. However, the object is not
	// guaranteed to be populated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To derisk, we can we cover this in another PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

SGTM

pkg/cloudprovider/aws/cloudprovider.go Outdated Show resolved Hide resolved
pkg/cloudprovider/aws/cloudprovider.go Outdated Show resolved Hide resolved
@ellistarn ellistarn force-pushed the provider branch 2 times, most recently from 0583d99 to a7acc52 Compare March 31, 2022 19:56
Copy link
Contributor

@bwagner5 bwagner5 left a comment

Choose a reason for hiding this comment

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

lgtm

@ellistarn ellistarn merged commit bc2273f into aws:main Mar 31, 2022
@ellistarn ellistarn deleted the provider branch April 1, 2022 02:29
@suket22 suket22 mentioned this pull request May 23, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants