Skip to content

Conversation

apelisse
Copy link
Contributor

No description provided.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: apelisse

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

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

/assign @jennybuckley

@apelisse
Copy link
Contributor Author

I'm writing tests now.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 17, 2019
Antoine Pelisse added 5 commits January 17, 2019 13:42
Some types don't have a schema (CRDs), and so we're creating the schema
on the fly for these values. We also build the infrastructure to create
these types easily and similarly to how we handled existing types.
Since we may not need the schema at all to resolve the path (and now we
may not even have it), let's not dereference it until necessary.
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 17, 2019
Copy link

@jennybuckley jennybuckley left a comment

Choose a reason for hiding this comment

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

Looks good to me just a couple questions


// DeducedParseableType is a ParseableType that deduces the type from
// the content of the object.
type DeducedParseableType struct{}

Choose a reason for hiding this comment

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

Why is DeducedParseableType exported, but parsableType isn't?

Choose a reason for hiding this comment

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

Is it because this type is just a struct{} alias?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the other one needs to be created in a "fancy way", so it's build through a method that returns the interface?
I could do

func NewDeducedParseableType() ParseableType {
    return deducedParseableType{}
}

but I don't think it's very useful

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in fewer words, yes =)

FromUnstructured(interface{}) (TypedValue, error)
}

type parseableType struct {

Choose a reason for hiding this comment

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

Maybe this could be named, schemaParseableType, explicitParseableType or something else (neither of those sound too good to me), to indicate that this one comes from a schema?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's private though so it's less critical?

@jennybuckley
Copy link

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 17, 2019
@k8s-ci-robot k8s-ci-robot merged commit 3e9f406 into kubernetes-sigs:master Jan 17, 2019
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants