diff --git a/services/web/server/src/simcore_service_webserver/statics/_events.py b/services/web/server/src/simcore_service_webserver/statics/_events.py index 49cef6deb64..e515e3b4b44 100644 --- a/services/web/server/src/simcore_service_webserver/statics/_events.py +++ b/services/web/server/src/simcore_service_webserver/statics/_events.py @@ -130,9 +130,14 @@ async def create_and_cache_statics_json(app: web.Application) -> None: and product.vendor and (template_url := product.vendor.get("release_notes_url_template", None)) ): - # template URL should be somethign like: + # As pattern vX.Y.Z is already guaranteed, we replace the the minor version with 0 + parts = vtag.split(".") + parts[-1] = "0" + updated_vtag = ".".join(parts) + + # template URL should be something like: # https://github.com/ITISFoundation/osparc-issues/blob/master/release-notes/osparc/{vtag}.md - data["vcsReleaseUrl"] = template_url.format(vtag=vtag) + data["vcsReleaseUrl"] = template_url.format(vtag=updated_vtag) data_json = json_dumps(data) _logger.debug("Front-end statics.json: %s", data_json) diff --git a/services/web/server/tests/unit/with_dbs/01/test_statics.py b/services/web/server/tests/unit/with_dbs/01/test_statics.py index f6cd1191577..314cf3e3a63 100644 --- a/services/web/server/tests/unit/with_dbs/01/test_statics.py +++ b/services/web/server/tests/unit/with_dbs/01/test_statics.py @@ -154,6 +154,12 @@ def mock_product_vendor(postgres_db: sa.engine.Engine, template_url: str) -> Non "https://example.com/no_vtag.md", id="vtag_not_repalced_if_missing", ), + pytest.param( + "v1.75.4", + "https://example.com/releases/some_target_{vtag}.md", + "https://example.com/releases/some_target_v1.75.0.md", + id="production_replacement_hotfix_version", + ), ], ) async def test_create_and_cache_statics_json_vendor_vcs_overwrite(