Skip to content
This repository was archived by the owner on Aug 9, 2024. It is now read-only.

Conversation

@Jeffwan
Copy link
Member

@Jeffwan Jeffwan commented Nov 30, 2018

I am trying to add v1beta1 validation, make schema generation code more generic for all versions.

I am very new to go, I meet issue when I build code. I do think that's the issue from dependency conflicts. Looks like common from tf-operator is not compatible with crd-validation.
Could someone tell me how to make the changes in Gopkg.toml?

# github.com/kubeflow/crd-validation/pkg/crd
pkg/crd/tfjob.go:38:63: cannot use "github.com/kubeflow/tf-operator/pkg/apis/tensorflow/v1beta1".GetOpenAPIDefinitions (type func("github.com/kubeflow/tf-operator/vendor/k8s.io/kube-openapi/pkg/common".ReferenceCallback) map[string]"github.com/kubeflow/tf-operator/vendor/k8s.io/kube-openapi/pkg/common".OpenAPIDefinition) as type func("github.com/kubeflow/crd-validation/vendor/k8s.io/kube-openapi/pkg/common".ReferenceCallback) map[string]"github.com/kubeflow/crd-validation/vendor/k8s.io/kube-openapi/pkg/common".OpenAPIDefinition in argument to utils.GetCustomResourceValidation


This change is Reviewable

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:

If they are not already assigned, you can assign the PR to them by writing /assign in a comment when ready.

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
Copy link

Hi @Jeffwan. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@Jeffwan
Copy link
Member Author

Jeffwan commented Nov 30, 2018

/hold

@Jeffwan
Copy link
Member Author

Jeffwan commented Nov 30, 2018

@gaocegege Hi, could you help take a look at this change?

@gaocegege
Copy link
Member

@Jeffwan

Hi, thanks for your contribution. While I think the repo is not ready to produce validation for our API becasue it does not support map. Thus we should wait until k8s supports validation feature for map field.

@Jeffwan
Copy link
Member Author

Jeffwan commented Dec 3, 2018

Thanks. @gaocegege What's your suggestion? Should I close this PR? What I need is the validation process during tfjob creation. Otherwise, it's hard for entry users to detect errors from tfcontroller. Do you have any suggestion?

@gaocegege
Copy link
Member

I think we could keep sync with k8s community and wait until k8s supports validation feature for map field. Currently, we have to export errors in the runtime instead of ahead of time. I do not have a better solution.

@Jeffwan
Copy link
Member Author

Jeffwan commented Dec 4, 2018

Thanks @gaocegege I will temporarily leave this PR open and go back to kubernetes side for verification. If k8s has progress on it, we can provide more straightforward messages by enabling map validation

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants