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

Add integration tests for API servers #112

Merged
merged 28 commits into from
Nov 10, 2018
Merged

Add integration tests for API servers #112

merged 28 commits into from
Nov 10, 2018

Conversation

IronPan
Copy link
Member

@IronPan IronPan commented Nov 7, 2018

This change is Reviewable

if err != nil {
glog.Exitf("Failed to get RPC connection. Error: %s", err.Error())
}
s.experimentClient = api.NewExperimentServiceClient(s.conn)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we please use the wrapper in https://github.com/kubeflow/pipelines/tree/master/backend/src/common/client/api_server?

(Here and in other places)

Copy link
Member Author

Choose a reason for hiding this comment

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

Would it make more sense to test using the raw client? There might be retries and error handling in the wrapper that I would be hesitate to use when the goal is to test the plain API.

Copy link
Contributor

@vicaire vicaire Nov 8, 2018

Choose a reason for hiding this comment

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

The goal of the wrapper is to be used by anything that needs to make the call in GO. Let's please switch to using it so that we don't duplicate work. For instance, be adding retries/timeout in the wrapper, any user of the wrapper immediately benefits from it.

If the wrapper does things that are problematic for the API e2e test, let's modify the wrapper accordingly.

Copy link
Contributor

Choose a reason for hiding this comment

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

The goal of the wrapper is to be used by anything that needs to make the call in GO. Let's please switch to using it so that we don't duplicate work. For instance, be adding retries/timeout in the wrapper, any user of the wrapper immediately benefits from it.

If the wrapper does things that are problematic for the API e2e test, let's modify the wrapper accordingly.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can use it once it's ready. Right now it's missing quite a few clients and it's using HTTP which is not what being used by tests. Let;s add a todo and prioritize that work. The test itself is ready and really high priority.

requestStartTime := time.Now().Unix()
/* ---------- Upload pipelines YAML ---------- */
pipelineBody, writer := uploadPipelineFileOrFail("resources/arguments-parameters.yaml")
response, err := clientSet.RESTClient().Post().
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we please use the wrapper in https://github.com/kubeflow/pipelines/tree/master/backend/src/common/client/api_server instead of making raw REST calls?

Could we also use these wrappers in any place were the the API is called?

IronPan and others added 7 commits November 7, 2018 13:50
* add tensorboard routing rule

* rename tb routing rule

* address comments

* remove debugger

* fix url prefix
@IronPan IronPan changed the title [WIP] Add integration tests for API servers Add integration tests for API servers Nov 8, 2018
argParamsRun := listRunsResponse.Runs[0]
s.checkArgParamsRun(t, argParamsRun, argParamsExperiment.Id, argParamsJob.Id, requestStartTime)

/* ---------- Clean up ---------- */
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we please turn this into a utility that anyone can reuse? Otherwise all the e2e tests have to do their own clean up in the current setup.

Additionally, since these tests are not concurrent, let's use the list calls to list and then delete all the resources.

if err != nil {
glog.Exitf("Failed to get RPC connection. Error: %s", err.Error())
}
s.experimentClient = api.NewExperimentServiceClient(s.conn)
Copy link
Contributor

Choose a reason for hiding this comment

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

The goal of the wrapper is to be used by anything that needs to make the call in GO. Let's please switch to using it so that we don't duplicate work. For instance, be adding retries/timeout in the wrapper, any user of the wrapper immediately benefits from it.

If the wrapper does things that are problematic for the API e2e test, let's modify the wrapper accordingly.

@IronPan
Copy link
Member Author

IronPan commented Nov 9, 2018

fix #112

@vicaire
Copy link
Contributor

vicaire commented Nov 9, 2018

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vicaire

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
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vicaire

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

@IronPan
Copy link
Member Author

IronPan commented Nov 9, 2018

/test presubmit-unit-test

@IronPan
Copy link
Member Author

IronPan commented Nov 9, 2018

/test build-image

2 similar comments
@IronPan
Copy link
Member Author

IronPan commented Nov 9, 2018

/test build-image

@IronPan
Copy link
Member Author

IronPan commented Nov 9, 2018

/test build-image

@Ark-kun
Copy link
Contributor

Ark-kun commented Nov 10, 2018

/test presubmit-e2e-test

1 similar comment
@vicaire
Copy link
Contributor

vicaire commented Nov 10, 2018

/test presubmit-e2e-test

@k8s-ci-robot k8s-ci-robot merged commit b494e3d into master Nov 10, 2018
IronPan added a commit that referenced this pull request Nov 11, 2018
@IronPan IronPan deleted the yangpa/test branch December 10, 2018 22:26
magdalenakuhn17 pushed a commit to magdalenakuhn17/pipelines that referenced this pull request Oct 22, 2023
* Add kfserving mnist S3 saved model example

* Add service account yaml

* Wire up service account
HumairAK referenced this pull request in red-hat-data-services/data-science-pipelines Mar 11, 2024
* organizing main readme

* organizing main readme

* 2nd round of changes

* edit service account and rbac page
HumairAK referenced this pull request in red-hat-data-services/data-science-pipelines Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants