Skip to content

Commit bb0137a

Browse files
committed
Fix after recent behavioral change in FastAPI/Starlette. The HTTPBearer security scheme now returns 401 instead of 403 when no credentials are provided.
1 parent 82bba36 commit bb0137a

File tree

12 files changed

+14
-14
lines changed

12 files changed

+14
-14
lines changed

.github/workflows/pytest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Install dependencies
4242
run: |
4343
python -m pip install --upgrade pip wheel setuptools uv
44-
uv pip install torch==2.9.0+cpu -f https://download.pytorch.org/whl/cpu/torch --system
44+
uv pip install torch==2.9.1+cpu -f https://download.pytorch.org/whl/cpu/torch --system
4545
uv pip install -e ".[all-test]" --system
4646
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
4747

opentofu/modules/vm/templates/cloudinit-compute.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ write_files:
6969
python3.11 -m venv .venv
7070
source .venv/bin/activate
7171
pip3.11 install --upgrade pip wheel setuptools uv
72-
uv pip install torch==2.9.0+cpu -f https://download.pytorch.org/whl/cpu/torch
72+
uv pip install torch==2.9.1+cpu -f https://download.pytorch.org/whl/cpu/torch
7373
uv pip install -e ".[all]" &
7474
INSTALL_PID=$!
7575

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dependencies = [
1717
"langchain-core==0.3.80",
1818
"httpx==0.28.1",
1919
"oracledb~=3.1",
20-
"plotly==6.3.1",
20+
"plotly==6.5.0",
2121
]
2222

2323
[project.optional-dependencies]
@@ -26,7 +26,7 @@ server = [
2626
"bokeh==3.8.1",
2727
"evaluate==0.4.6",
2828
"faiss-cpu==1.13.0",
29-
"fastapi==0.121.3",
29+
"fastapi==0.122.0",
3030
"fastmcp==2.13.1",
3131
"giskard==2.18.0",
3232
"langchain-aimlapi==0.1.0",
@@ -50,7 +50,7 @@ server = [
5050
"oci~=2.0",
5151
"psutil==7.1.3",
5252
"python-multipart==0.0.20",
53-
"torch==2.9.0",
53+
"torch==2.9.1",
5454
"umap-learn==0.5.9.post2",
5555
"uvicorn==0.38.0",
5656
]

src/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ COPY --chown=$RUNUSER:$RUNUSER src /opt/package/src
2121
COPY pyproject.toml /opt/package/pyproject.toml
2222

2323
RUN ${VIRTUAL_ENV}/bin/pip install --upgrade pip wheel setuptools uv && \
24-
${VIRTUAL_ENV}/bin/uv pip install torch==2.9.0+cpu -f https://download.pytorch.org/whl/cpu/torch && \
24+
${VIRTUAL_ENV}/bin/uv pip install torch==2.9.1+cpu -f https://download.pytorch.org/whl/cpu/torch && \
2525
${VIRTUAL_ENV}/bin/uv pip install "/opt/package[all]"
2626

2727
##################################################

src/server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ COPY --chown=$RUNUSER:$RUNUSER src /opt/package/src
2323
COPY pyproject.toml /opt/package/pyproject.toml
2424

2525
RUN ${VIRTUAL_ENV}/bin/pip install --upgrade pip wheel setuptools uv && \
26-
${VIRTUAL_ENV}/bin/uv pip install torch==2.9.0+cpu -f https://download.pytorch.org/whl/cpu/torch && \
26+
${VIRTUAL_ENV}/bin/uv pip install torch==2.9.1+cpu -f https://download.pytorch.org/whl/cpu/torch && \
2727
${VIRTUAL_ENV}/bin/uv pip install "/opt/package[server]"
2828

2929
##################################################

tests/server/integration/test_endpoints_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class TestEndpoints:
2222
@pytest.mark.parametrize(
2323
"auth_type, status_code",
2424
[
25-
pytest.param("no_auth", 403, id="no_auth"),
25+
pytest.param("no_auth", 401, id="no_auth"),
2626
pytest.param("invalid_auth", 401, id="invalid_auth"),
2727
],
2828
)

tests/server/integration/test_endpoints_databases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class TestEndpoints:
1818
@pytest.mark.parametrize(
1919
"auth_type, status_code",
2020
[
21-
pytest.param("no_auth", 403, id="no_auth"),
21+
pytest.param("no_auth", 401, id="no_auth"),
2222
pytest.param("invalid_auth", 401, id="invalid_auth"),
2323
],
2424
)

tests/server/integration/test_endpoints_embed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class TestEndpoints:
4646
@pytest.mark.parametrize(
4747
"auth_type, status_code",
4848
[
49-
pytest.param("no_auth", 403, id="no_auth"),
49+
pytest.param("no_auth", 401, id="no_auth"),
5050
pytest.param("invalid_auth", 401, id="invalid_auth"),
5151
],
5252
)

tests/server/integration/test_endpoints_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class TestEndpoints:
1717
@pytest.mark.parametrize(
1818
"auth_type, status_code",
1919
[
20-
pytest.param("no_auth", 403, id="no_auth"),
20+
pytest.param("no_auth", 401, id="no_auth"),
2121
pytest.param("invalid_auth", 401, id="invalid_auth"),
2222
],
2323
)

tests/server/integration/test_endpoints_oci.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class TestEndpoints:
9595
@pytest.mark.parametrize(
9696
"auth_type, status_code",
9797
[
98-
pytest.param("no_auth", 403, id="no_auth"),
98+
pytest.param("no_auth", 401, id="no_auth"),
9999
pytest.param("invalid_auth", 401, id="invalid_auth"),
100100
],
101101
)

0 commit comments

Comments
 (0)