diff --git a/.bumpversion.toml b/.bumpversion.toml index b5d3fc21..fcac6615 100644 --- a/.bumpversion.toml +++ b/.bumpversion.toml @@ -1,5 +1,5 @@ [tool.bumpversion] -current_version = "1.19.0+260822" +current_version = "1.19.0+260829" parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)\\+(?P\\d+)" serialize = ["{major}.{minor}.{patch}+{build}"] search = "{current_version}" diff --git a/pyproject.toml b/pyproject.toml index 08a87cd3..14ab0ad3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "rasenmaeher_api" -version = "1.19.0+260822" +version = "1.19.0+260829" description = "python-rasenmaeher-api" authors = [ { name = "Aciid", email = "703382+Aciid@users.noreply.github.com" }, diff --git a/src/rasenmaeher_api/__init__.py b/src/rasenmaeher_api/__init__.py index 184d5e2c..68ae0b0e 100644 --- a/src/rasenmaeher_api/__init__.py +++ b/src/rasenmaeher_api/__init__.py @@ -1,3 +1,3 @@ """python-rasenmaeher-api""" -__version__ = "1.19.0+260822" # NOTE Use `bump-my-version` to bump versions correctly +__version__ = "1.19.0+260829" # NOTE Use `bump-my-version` to bump versions correctly diff --git a/src/rasenmaeher_api/productapihelpers.py b/src/rasenmaeher_api/productapihelpers.py index de8b2133..b1852021 100644 --- a/src/rasenmaeher_api/productapihelpers.py +++ b/src/rasenmaeher_api/productapihelpers.py @@ -122,7 +122,11 @@ async def _method_to_product( session = await get_session_winit() async with session as client: try: - url = f"{productconf['api']}{url_suffix}" + # Normalise the join: every manifest "api" value ends in "/" (see + # miniwerk manifests), so a suffix that also starts with one gave + # "https://host:4626//api/v1/..." — which Starlette does not route, + # so the product 404s and the caller sees only a swallowed None. + url = f"{productconf['api'].rstrip('/')}/{url_suffix.lstrip('/')}" LOGGER.debug(f"calling {methodname}({url})") if data is None: resp = await getattr(client, methodname)(url, timeout=rmconf.integration_api_timeout) diff --git a/src/rasenmaeher_api/web/api/product/views.py b/src/rasenmaeher_api/web/api/product/views.py index 9323d5fd..72bc8a9c 100644 --- a/src/rasenmaeher_api/web/api/product/views.py +++ b/src/rasenmaeher_api/web/api/product/views.py @@ -168,7 +168,7 @@ async def add_interop( raise HTTPException(status_code=500, detail="Manifest does not have products key") if tgtproduct not in manifest["products"]: raise HTTPException(status_code=404, detail=f"Unknown product {tgtproduct}") - resp = await post_to_product(tgtproduct, "/api/v1/interop/add", srcproduct.model_dump(), OperationResultResponse) + resp = await post_to_product(tgtproduct, "api/v1/interop/add", srcproduct.model_dump(), OperationResultResponse) if resp is None: return OperationResultResponse(success=False, error="post_to_product returned None") resp = cast(OperationResultResponse, resp) diff --git a/tests/test_rasenmaeher_api.py b/tests/test_rasenmaeher_api.py index 3882e13f..062a3464 100644 --- a/tests/test_rasenmaeher_api.py +++ b/tests/test_rasenmaeher_api.py @@ -15,7 +15,7 @@ def test_version() -> None: """Make sure version matches expected""" - assert __version__ == "1.19.0+260822" + assert __version__ == "1.19.0+260829" @pytest.mark.asyncio(loop_scope="session") diff --git a/uv.lock b/uv.lock index 922ecf51..f25792a9 100644 --- a/uv.lock +++ b/uv.lock @@ -2110,7 +2110,7 @@ wheels = [ [[package]] name = "rasenmaeher-api" -version = "1.19.0+260822" +version = "1.19.0+260829" source = { editable = "." } dependencies = [ { name = "aiodns" },