This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-releases-client.git
The following commit(s) were added to refs/heads/main by this push:
new 8c04cc2 Add a command for admins to delete any release, and use it in
the tests
8c04cc2 is described below
commit 8c04cc22c6699a397c9db6ee3fec80fc386aab8c
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Jul 14 20:15:48 2025 +0100
Add a command for admins to delete any release, and use it in the tests
---
pyproject.toml | 4 ++--
src/atrclient/client.py | 11 +++++++++++
tests/cli_workflow.t | 8 +++++++-
uv.lock | 4 ++--
4 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 01c6070..44941fa 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -11,7 +11,7 @@ build-backend = "hatchling.build"
[project]
name = "apache-trusted-releases"
-version = "0.20250714.1904"
+version = "0.20250714.1914"
description = "ATR CLI and Python API"
readme = "README.md"
requires-python = ">=3.13"
@@ -72,4 +72,4 @@ select = [
]
[tool.uv]
-exclude-newer = "2025-07-14T19:04:00Z"
+exclude-newer = "2025-07-14T19:14:00Z"
diff --git a/src/atrclient/client.py b/src/atrclient/client.py
index 1d02f47..5615c34 100755
--- a/src/atrclient/client.py
+++ b/src/atrclient/client.py
@@ -215,6 +215,17 @@ def app_config_path() -> None:
print(config_path())
+@APP_DEV.command(name="delete", help="Delete a release.")
+def app_dev_delete(project: str, version: str, /) -> None:
+ # Only ATR admins may do this
+ jwt_value = config_jwt_usable()
+ host, verify_ssl = config_host_get()
+ args = models.api.ProjectVersion(project=project, version=version)
+ url = f"https://{host}/api/releases/delete"
+ result = asyncio.run(web_post(url, args, jwt_value, verify_ssl))
+ print_json(result)
+
+
@APP_DEV.command(name="env", help="Show the environment variables.")
def app_dev_env() -> None:
total = 0
diff --git a/tests/cli_workflow.t b/tests/cli_workflow.t
index 4365f61..afb9047 100644
--- a/tests/cli_workflow.t
+++ b/tests/cli_workflow.t
@@ -39,6 +39,12 @@ $ atr vote start tooling-test-example 0.3+cli 00002 -m
"<!user!>@apache.org"
$ atr vote resolve tooling-test-example 0.3+cli failed
{"success": "Vote marked as failed"}
+$ atr vote start tooling-test-example 0.3+cli 00002 -m "<!user!>@apache.org"
+<.skip.>"email_to": "<!user!>@apache.org"<.skip.>
+
+$ atr vote resolve tooling-test-example 0.3+cli passed
+{"success": "Vote marked as passed"}
+
<# Tidy up. #>
-* atr draft delete tooling-test-example 0.3+cli
+* atr dev delete tooling-test-example 0.3+cli
<.etc.>
diff --git a/uv.lock b/uv.lock
index 55a918e..cf275be 100644
--- a/uv.lock
+++ b/uv.lock
@@ -2,7 +2,7 @@ version = 1
requires-python = ">=3.13"
[options]
-exclude-newer = "2025-07-14T19:04:00Z"
+exclude-newer = "2025-07-14T19:14:00Z"
[[package]]
name = "aiohappyeyeballs"
@@ -83,7 +83,7 @@ wheels = [
[[package]]
name = "apache-trusted-releases"
-version = "0.20250714.1904"
+version = "0.20250714.1914"
source = { editable = "." }
dependencies = [
{ name = "aiohttp" },
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]