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

Updates to apiserver swagger ui #1387

Closed
wants to merge 27 commits into from

Conversation

z103cb
Copy link
Contributor

@z103cb z103cb commented Sep 4, 2023

Why are these changes needed?

The swagger ui presented by the api-server was the stock pet store version, this PR rectifies this situation and displays the swagger for KubeRay API Server.

Related issue number

Closes #1343

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

Copy link
Contributor

@anishasthana anishasthana left a comment

Choose a reason for hiding this comment

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

Have one immediate change. Will run through the instructions later today to confirm they work

apiserver/DEVELOPMENT.md Outdated Show resolved Hide resolved
* [local service -- http://localhost:8888/swagger-ui/](http://localhost:8888/swagger-ui/)
* [kind cluster -- http://localhost:31888/swagger-ui/](http://localhost:31888/swagger-ui/)

Please note that for the local service to properly serve the swagger content the location of the swagger files would need to be changed in [code](https://github.com/ray-project/kuberay/blob/f1067378bc99987f3eba1e5b12b4cc797465336d/apiserver/cmd/main.go#L138-L142) as follows (lines 138-142 of [main.go](cmd/main.go)):
Copy link
Contributor

@tedhtchang tedhtchang Sep 7, 2023

Choose a reason for hiding this comment

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

@z103cb For running local apiserver, should we have something like this in main.go so we can do KUBERAY_APISERVER_SWAGGER=local make run

	if os.Getenv("KUBERAY_APISERVER_SWAGGER") == "local" {
		p = path.Join("../proto/swagger/", p)
	} else {
		p = path.Join("/workspace/proto/swagger/", p)
	}

Then we would not need to manually change the file for local service.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking about this issue, and I wasn't sure if I should include a fix in this PR. But since you've asked, you have convinced me that we should probably do it. I will push a commit along the lines you have suggested

Copy link
Contributor Author

@z103cb z103cb Sep 8, 2023

Choose a reason for hiding this comment

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

Take a look at the latest commit (b88d4bd)

@kevin85421
Copy link
Member

@z103cb would you mind rebasing with the master branch? Thanks!

Copy link
Contributor

@tedhtchang tedhtchang left a comment

Choose a reason for hiding this comment

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

LGTM. I verified the following:

  1. Ran make run and opened http://localhost:8888/swagger-ui/ in browser.
  2. Run make docker-image operator-image cluster load-image load-operator-image deploy deploy-operator and opened http://localhost:31888/swagger-ui/ in browser.
    • some hiccup. The deploy and deplpoy-operator would not work unless I --set image.repository=localhost/kuberay/apiserver and --set image.repository=localhost/kuberay/operator explicitly for the helm commands in the makefile. I will track in this issue.
  3. Called a few APIs using swagger-ui and had no error

kevin85421 and others added 20 commits September 11, 2023 10:41
…#1395)

[CI] Remove RayService tests from comopatibility-test.py
…b container (ray-project#1375)

Enable job log streaming by setting `PYTHONUNBUFFERED` in job container
Update Autoscaler YAML for the Autoscaler tutorial
…er container (ray-project#1401)

Use image of Ray head container as the default Ray Autoscaler container
[services] Add text ml rayservice yaml
…#1403)

[serve] Change text ml yaml to use french in user config
…1369)

implemented liveness/readyness probe for the API server
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20211210111614-af8b64212486 to 0.1.0.
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/emicklei/go-restful](https://github.com/emicklei/go-restful) from 2.9.5+incompatible to 2.16.0+incompatible.
- [Release notes](https://github.com/emicklei/go-restful/releases)
- [Changelog](https://github.com/emicklei/go-restful/blob/v3/CHANGES.md)
- [Commits](emicklei/go-restful@v2.9.5...v2.16.0)

---
updated-dependencies:
- dependency-name: github.com/emicklei/go-restful
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20210813160813-60bc85c4be6d to 0.7.0.
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20210510120138-977fb7262007 to 0.1.0.
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ay-project#1407)

Bumps [go.mongodb.org/mongo-driver](https://github.com/mongodb/mongo-go-driver) from 1.3.4 to 1.5.1.
- [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
- [Commits](mongodb/mongo-go-driver@v1.3.4...v1.5.1)

---
updated-dependencies:
- dependency-name: go.mongodb.org/mongo-driver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.5 to 0.3.8.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](golang/text@v0.3.5...v0.3.8)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20210405180319-a5a99cb37ef4 to 0.7.0.
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@z103cb
Copy link
Contributor Author

z103cb commented Sep 11, 2023

The git history got way too crazy. Closing this PR in favour of: #1410

@z103cb z103cb closed this Sep 11, 2023
@z103cb z103cb mentioned this pull request Sep 11, 2023
4 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.

[Bug] KubeRay API Server shows the pet store swagger UI>
8 participants