From 2487eab72a8bf0e62ce39e46b4c81c9abb04cd33 Mon Sep 17 00:00:00 2001 From: jcschaff Date: Tue, 28 Oct 2025 11:33:18 -0400 Subject: [PATCH 1/4] increase nginx ingress proxy-body-size to 20m --- kustomize/overlays/biosim-gke/ingress.yaml | 1 + kustomize/overlays/biosim-rke/ingress.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/kustomize/overlays/biosim-gke/ingress.yaml b/kustomize/overlays/biosim-gke/ingress.yaml index 7394a60..b2669b0 100644 --- a/kustomize/overlays/biosim-gke/ingress.yaml +++ b/kustomize/overlays/biosim-gke/ingress.yaml @@ -6,6 +6,7 @@ metadata: app: api-ingress annotations: cert-manager.io/cluster-issuer: "letsencrypt-prod" + nginx.ingress.kubernetes.io/proxy-body-size: 20m spec: ingressClassName: nginx tls: diff --git a/kustomize/overlays/biosim-rke/ingress.yaml b/kustomize/overlays/biosim-rke/ingress.yaml index f43c2e5..f2ee3ce 100644 --- a/kustomize/overlays/biosim-rke/ingress.yaml +++ b/kustomize/overlays/biosim-rke/ingress.yaml @@ -6,6 +6,7 @@ metadata: app: api-ingress annotations: cert-manager.io/cluster-issuer: "letsencrypt-prod" + nginx.ingress.kubernetes.io/proxy-body-size: "20m" spec: ingressClassName: nginx tls: From cea56e96d952fad9f8bde2318ba1b2d217c4de1e Mon Sep 17 00:00:00 2001 From: jcschaff Date: Tue, 28 Oct 2025 11:34:10 -0400 Subject: [PATCH 2/4] manually deploy swagger-ui to avoid broken cdn --- biosim_server/api/main.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/biosim_server/api/main.py b/biosim_server/api/main.py index 841fa48..07b9b1d 100644 --- a/biosim_server/api/main.py +++ b/biosim_server/api/main.py @@ -8,7 +8,9 @@ import dotenv import uvicorn from fastapi import FastAPI, File, UploadFile, Query, APIRouter, Depends, HTTPException +from fastapi.openapi.docs import get_swagger_ui_html from starlette.middleware.cors import CORSMiddleware +from starlette.responses import HTMLResponse from biosim_server.biosim_omex import OmexFile, get_cached_omex_file_from_upload from biosim_server.biosim_runs import BiosimulatorVersion @@ -81,7 +83,7 @@ async def lifespan(_app: FastAPI) -> AsyncGenerator[None, None]: await shutdown_standalone() -app = FastAPI(title=APP_TITLE, version=APP_VERSION, servers=APP_SERVERS, lifespan=lifespan) +app = FastAPI(openapi_url="/docs", docs_url=None, redoc_url=None, title=APP_TITLE, version=APP_VERSION, servers=APP_SERVERS, lifespan=lifespan) # add origins app.add_middleware( @@ -106,6 +108,16 @@ def root() -> dict[str, str]: def get_version() -> str: return APP_VERSION +@app.get("/docs", include_in_schema=False) +async def custom_swagger_ui_html() -> HTMLResponse: + if app.openapi_url is None: + raise HTTPException(status_code=404, detail="OpenAPI schema not available") + return get_swagger_ui_html( + openapi_url=app.openapi_url, + title=app.title + " - Swagger UI", + swagger_js_url="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.0.21/swagger-ui-bundle.js", # Replace with your CDN URL + swagger_css_url="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.0.21/swagger-ui.css", # Replace with your CDN URL + ) @app.post( "/verify/omex", From 632f45b98d0879118da812c54463626ca9063d5e Mon Sep 17 00:00:00 2001 From: jcschaff Date: Tue, 28 Oct 2025 11:34:34 -0400 Subject: [PATCH 3/4] bump version to 0.2.3 --- biosim_server/api/spec/openapi_3_1_0_generated.yaml | 2 +- biosim_server/version.py | 2 +- kustomize/overlays/biosim-gke/kustomization.yaml | 4 ++-- kustomize/overlays/biosim-local/kustomization.yaml | 4 ++-- kustomize/overlays/biosim-rke/kustomization.yaml | 4 ++-- pyproject.toml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/biosim_server/api/spec/openapi_3_1_0_generated.yaml b/biosim_server/api/spec/openapi_3_1_0_generated.yaml index caf254d..b521b1c 100644 --- a/biosim_server/api/spec/openapi_3_1_0_generated.yaml +++ b/biosim_server/api/spec/openapi_3_1_0_generated.yaml @@ -1,7 +1,7 @@ openapi: 3.1.0 info: title: biosim-server - version: 0.2.1 + version: 0.2.3 paths: /: get: diff --git a/biosim_server/version.py b/biosim_server/version.py index 984fc57..4f7052b 100644 --- a/biosim_server/version.py +++ b/biosim_server/version.py @@ -1 +1 @@ -__version__ = "0.2.2" \ No newline at end of file +__version__ = "0.2.3" \ No newline at end of file diff --git a/kustomize/overlays/biosim-gke/kustomization.yaml b/kustomize/overlays/biosim-gke/kustomization.yaml index e6eeae0..2cf2025 100644 --- a/kustomize/overlays/biosim-gke/kustomization.yaml +++ b/kustomize/overlays/biosim-gke/kustomization.yaml @@ -5,9 +5,9 @@ namespace: biosim-gke images: - name: ghcr.io/biosimulations/biosim-api - newTag: amd64_0.2.2 + newTag: amd64_0.2.3 - name: ghcr.io/biosimulations/biosim-worker - newTag: amd64_0.2.2 + newTag: amd64_0.2.3 - name: docker.io/library/mongo newTag: 8.0.4 diff --git a/kustomize/overlays/biosim-local/kustomization.yaml b/kustomize/overlays/biosim-local/kustomization.yaml index 7202a0b..9edaf99 100644 --- a/kustomize/overlays/biosim-local/kustomization.yaml +++ b/kustomize/overlays/biosim-local/kustomization.yaml @@ -5,9 +5,9 @@ namespace: biosim-local images: - name: ghcr.io/biosimulations/biosim-api - newTag: arm64_0.2.1 + newTag: arm64_0.2.3 - name: ghcr.io/biosimulations/biosim-worker - newTag: arm64_0.2.1 + newTag: arm64_0.2.3 - name: docker.io/library/mongo newTag: 8.0.4 diff --git a/kustomize/overlays/biosim-rke/kustomization.yaml b/kustomize/overlays/biosim-rke/kustomization.yaml index 6586ef4..7e5bb71 100644 --- a/kustomize/overlays/biosim-rke/kustomization.yaml +++ b/kustomize/overlays/biosim-rke/kustomization.yaml @@ -5,9 +5,9 @@ namespace: biosim-rke images: - name: ghcr.io/biosimulations/biosim-api - newTag: amd64_0.2.1 + newTag: amd64_0.2.3 - name: ghcr.io/biosimulations/biosim-worker - newTag: amd64_0.2.1 + newTag: amd64_0.2.3 - name: docker.io/library/mongo newTag: 8.0.4 diff --git a/pyproject.toml b/pyproject.toml index 56afbb5..06dcb3c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "biosim-server" -version = "0.2.2" +version = "0.2.3" description = "Server for the consolidated Biosimulations API" authors = ["Alex Patrie , Jim Schaff "] readme = "README.md" From 96cc14c9c76c966c320d47bcfc43af5343e3d18f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 15:36:00 +0000 Subject: [PATCH 4/4] Bump h11 from 0.14.0 to 0.16.0 Bumps [h11](https://github.com/python-hyper/h11) from 0.14.0 to 0.16.0. - [Commits](https://github.com/python-hyper/h11/compare/v0.14.0...v0.16.0) --- updated-dependencies: - dependency-name: h11 dependency-version: 0.16.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- poetry.lock | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/poetry.lock b/poetry.lock index e7b2a23..359ad83 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. [[package]] name = "aiocache" @@ -766,14 +766,14 @@ rsa = ">=3.1.4,<5.0.0" [[package]] name = "h11" -version = "0.14.0" +version = "0.16.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["main", "dev"] files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, + {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, + {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, ] [[package]] @@ -817,19 +817,19 @@ numpy = ">=1.19.3" [[package]] name = "httpcore" -version = "1.0.7" +version = "1.0.9" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"}, - {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"}, + {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, + {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, ] [package.dependencies] certifi = "*" -h11 = ">=0.13,<0.15" +h11 = ">=0.16" [package.extras] asyncio = ["anyio (>=4.0,<5.0)"] @@ -1801,6 +1801,14 @@ files = [ {file = "python_libsbml-5.20.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:b1ef224f746aac4e1b0f917113b6334abd2fa3eb63bde41149a1b006bacfba81"}, {file = "python_libsbml-5.20.4-cp312-cp312-win32.whl", hash = "sha256:b5cc68b5fe6d139a4557cba9d9913b3e196582bdb7975bea6a2c25faaecdfadb"}, {file = "python_libsbml-5.20.4-cp312-cp312-win_amd64.whl", hash = "sha256:40c5e9ec86c467b4f325b5365ca369ecc1c9ced608e390d3cc1726f79da68968"}, + {file = "python_libsbml-5.20.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:233c01e17a0750ea73411ce79b069bf113968cabeb88d61fc9378d068c4c585c"}, + {file = "python_libsbml-5.20.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:6e8c99146b15b0c5c9aabb6ec85e30489a1b8105cf7d2483b44e0407d7d04309"}, + {file = "python_libsbml-5.20.4-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cde96e40eb6809de40443e28f8242674842e2cfbb9c84d2c28321f553fbd344e"}, + {file = "python_libsbml-5.20.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ff1eb26b1d39531c80813ed9c18f9dc6aca66e437a81131bd0ed1c97371df11"}, + {file = "python_libsbml-5.20.4-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:576d6a64d3bd04803db160d992b7e6ac9be4bc2ba735a3a33fa623ca4e86fe09"}, + {file = "python_libsbml-5.20.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:2c0d0eddb043a5065abead423dec089d99191727a0f6505ddd2c942512a4307d"}, + {file = "python_libsbml-5.20.4-cp313-cp313-win32.whl", hash = "sha256:1c5539b2189e38e5b39c34eafe1ef86ffb9179ece91c48623a48412cb88a6f5c"}, + {file = "python_libsbml-5.20.4-cp313-cp313-win_amd64.whl", hash = "sha256:aac5a989e24341713e3c2fd126c6deebdb062adb287b41a45c48c72a4bd828ca"}, {file = "python_libsbml-5.20.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:feeecfffa72f94ac74475180f1046feb019b30ec86f9ef435c31e4585a0762f4"}, {file = "python_libsbml-5.20.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4bd57cc81dc508c42c0bed66e6aed67b8dc2d3b56802d56192be418bf032a175"}, {file = "python_libsbml-5.20.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:56402db093a38adb35b985a0c31b8875b360aeba04f29e5675be9a691a6911bf"},