This is an automated email from the ASF dual-hosted git repository.
arm pushed a commit to branch atr_tagging
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/atr_tagging by this push:
new 65cc07f #475 - Remove endpoint as not needed for distribution any more
65cc07f is described below
commit 65cc07f2068c3bba3b49098de9905c172b622397
Author: Alastair McFarlane <[email protected]>
AuthorDate: Thu Jan 22 15:02:02 2026 +0000
#475 - Remove endpoint as not needed for distribution any more
---
atr/api/__init__.py | 21 ---------------------
atr/models/api.py | 12 ------------
2 files changed, 33 deletions(-)
diff --git a/atr/api/__init__.py b/atr/api/__init__.py
index bf201d9..e253a14 100644
--- a/atr/api/__init__.py
+++ b/atr/api/__init__.py
@@ -304,27 +304,6 @@ async def update_distribution_task_status(data:
models.api.DistributeStatusUpdat
).model_dump(), 200
[email protected]("/distribute/tagging", methods=["POST"])
-@quart_schema.validate_request(models.api.DistributeTaggingArgs)
-@quart_schema.validate_response(models.api.DistributeTaggingResults)
-async def get_distribution_tags(data: models.api.DistributeTaggingArgs) ->
DictResponse:
- """
- Get the tagging spec for a given project/version
- """
- _payload, _asf_uid = await
interaction.validate_trusted_jwt(data.publisher, data.jwt)
- async with db.session() as db_data:
- release = await db_data.release(
- project_name=data.project_name, version=data.version_name,
_release_policy=True
- ).demand(exceptions.NotFound(f"Release
{data.project_name}/{data.version_name} not found"))
-
- if (not release.release_policy) or (not
release.release_policy.atr_file_tagging_spec):
- raise exceptions.NotFound(f"No tagging spec found for
{data.project_name}/{data.version_name}")
- return models.api.DistributeTaggingResults(
- endpoint="/distribute/tagging",
- tagging_spec=release.release_policy.atr_file_tagging_spec,
- ).model_dump(), 200
-
-
@api.route("/distribution/record", methods=["POST"])
@jwtoken.require
@quart_schema.security_scheme([{"BearerAuth": []}])
diff --git a/atr/models/api.py b/atr/models/api.py
index d5c2ab6..ad9842e 100644
--- a/atr/models/api.py
+++ b/atr/models/api.py
@@ -99,18 +99,6 @@ class DistributeStatusUpdateResults(schema.Strict):
success: Literal[True] = schema.example(True)
-class DistributeTaggingArgs(schema.Strict):
- publisher: str = schema.example("user")
- jwt: str = schema.example("eyJhbGciOiJIUzI1[...]mMjLiuyu5CSpyHI=")
- project_name: str = schema.description("Project name in ATR")
- version_name: str = schema.description("Version name in ATR")
-
-
-class DistributeTaggingResults(schema.Strict):
- endpoint: Literal["/distribute/tagging"] = schema.alias("endpoint")
- tagging_spec: dict[str, Any]
-
-
class DistributionRecordArgs(schema.Strict):
project: str = schema.example("example")
version: str = schema.example("0.0.1")
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]