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

Exposing Swagger File through Executor and providing Swagger UI through endpoint #1730

Merged
merged 11 commits into from
Apr 24, 2020

Conversation

axsaucedo
Copy link
Contributor

@axsaucedo axsaucedo commented Apr 22, 2020

The current approach is to follow the standard introduced by FastAPI https://github.com/tiangolo/fastapi#interactive-api-docs

Fixes #1703

  • Exposes Swagger JSON through Executor
  • Provides versioned path for JSON
  • Exposes Swagger UI (both CDN (4kb) and Bundled (1.4mb) for airgapped setups) with seldon.json

What it doesn't include:

  • Dynamically adapted Seldon.json to include parameters specific to deployment
  • Updating API schema to include explain and metadata endpoints, etc

Things to consider:

  • seldon.json openapi schema has been replicated into the executor API, it may be best to keep it on the base folder and copy it in the docker file to avoid replication
  • Dynamically modify parameters would require loading the file dynamically and serving it as file/template, it would be good to align on what would be the best way
  • It could be possible in a separate PR to align the Metadata work to also expose some metadata information

@seldondev
Copy link
Collaborator

Wed Apr 22 21:42:45 UTC 2020
The logs for [lint] [2] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1730/2.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1730 --build=2

@seldondev
Copy link
Collaborator

Wed Apr 22 21:42:58 UTC 2020
The logs for [pr-build] [1] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1730/1.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1730 --build=1

@seldondev seldondev added size/L and removed size/XL labels Apr 24, 2020
@axsaucedo axsaucedo changed the title WIP: Exposing Swagger File through Executor and providing Swagger UI through endpoint Exposing Swagger File through Executor and providing Swagger UI through endpoint Apr 24, 2020
@axsaucedo axsaucedo requested review from ukclivecox and removed request for ryandawsonuk April 24, 2020 08:36
@seldondev
Copy link
Collaborator

Fri Apr 24 08:36:28 UTC 2020
The logs for [lint] [4] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1730/4.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1730 --build=4

@seldondev
Copy link
Collaborator

Fri Apr 24 08:36:31 UTC 2020
The logs for [pr-build] [3] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1730/3.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1730 --build=3

Copy link
Contributor

@adriangonz adriangonz left a comment

Choose a reason for hiding this comment

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

Nice one! It makes a lot of sense to expose an OpenAPI schema!

executor/Dockerfile Outdated Show resolved Hide resolved
executor/api/rest/server.go Outdated Show resolved Hide resolved
executor/api/rest/server.go Outdated Show resolved Hide resolved
@seldondev
Copy link
Collaborator

Fri Apr 24 13:00:03 UTC 2020
The logs for [lint] [6] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1730/6.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1730 --build=6

@seldondev
Copy link
Collaborator

Fri Apr 24 13:00:15 UTC 2020
The logs for [pr-build] [5] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1730/5.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1730 --build=5

@seldondev
Copy link
Collaborator

Fri Apr 24 13:34:25 UTC 2020
The logs for [lint] [8] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1730/8.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1730 --build=8

@seldondev
Copy link
Collaborator

Fri Apr 24 13:34:28 UTC 2020
The logs for [pr-build] [7] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1730/7.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1730 --build=7

@adriangonz
Copy link
Contributor

/approve

I think this looks great now and ready to land @axsaucedo!

@seldondev
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adriangonz

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

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.

Update swagger to work in executor and be up to date
3 participants