You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2026/05/27 18:59:43 UTC
(tooling-trusted-releases) branch sbp updated (21b61ddf -> 9407f252)
This is an automated email from the ASF dual-hosted git repository.
sbp pushed a change to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
discard 21b61ddf Add a manual SVN publication form to the finish phase page
add 00e8c7d9 #1280 - Add email template for finish vote. Includes ATR Tally as a variable
new 9407f252 Add a manual SVN publication form to the finish phase page
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (21b61ddf)
\
N -- N -- N refs/heads/sbp (9407f252)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
atr/api/__init__.py | 1 +
atr/construct.py | 24 ++++++-
atr/get/projects.py | 9 +++
atr/get/resolve.py | 49 +++++++++----
atr/get/vote.py | 10 +--
atr/models/api.py | 2 +
atr/models/sql.py | 22 ++++++
atr/post/resolve.py | 4 +-
atr/shared/projects.py | 4 ++
atr/storage/writers/policy.py | 17 +++++
atr/tabulate.py | 92 +++++--------------------
atr/tasks/vote.py | 23 +++++--
migrations/versions/0088_2026.05.27_449e0006.py | 27 ++++++++
tests/unit/test_vote_resolution.py | 4 ++
14 files changed, 182 insertions(+), 106 deletions(-)
create mode 100644 migrations/versions/0088_2026.05.27_449e0006.py
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org
(tooling-trusted-releases) 01/01: Add a manual SVN publication form to the finish phase page
Posted by sb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
commit 9407f25271cf84caa0270f32fb83deaa62fe2b70
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Wed May 27 15:58:59 2026 +0100
Add a manual SVN publication form to the finish phase page
---
atr/get/finish.py | 22 ++++++++++++++++++++++
atr/post/finish.py | 20 ++++++++++++++++++++
atr/sessions.py | 1 +
atr/shared/finish.py | 9 ++++++++-
4 files changed, 51 insertions(+), 1 deletion(-)
diff --git a/atr/get/finish.py b/atr/get/finish.py
index cd5f2bb6..8348c065 100644
--- a/atr/get/finish.py
+++ b/atr/get/finish.py
@@ -29,7 +29,9 @@ import quart
import atr.analysis as analysis
import atr.blueprints.get as get
+import atr.config as config
import atr.db as db
+import atr.db.interaction as interaction
import atr.form as form
import atr.get.announce as announce
import atr.get.distribution as distribution
@@ -328,6 +330,26 @@ async def _render_page(
page.append(_render_dist_warning())
page.append(_render_distribution_buttons(release))
+ if config.get().SVN_PUBLISH_URL:
+ proj, ver, rev = release.safe_project_key, release.safe_version_key, release.safe_latest_revision_number
+ in_flight = await interaction.release_in_flight_svn_publish_task(proj, ver, rev)
+ completed = await interaction.release_completed_svn_publish_task_for_revision(proj, ver, rev)
+ if (in_flight is None) and (completed is None):
+ download_path_suffix = ""
+ committee = release.project.committee
+ if (committee is not None) and (release.project.key != util.unwrap(committee.key)):
+ download_path_suffix = f"{release.project.key}-{release.version}"
+ page.h2["Publish to SVN"]
+ await form.render_block(
+ page,
+ shared.finish.PublishToSvnForm,
+ defaults={
+ "download_path_suffix": download_path_suffix,
+ "revision_number": release.latest_revision_number,
+ },
+ submit_label="Publish to SVN",
+ )
+
page.h2["Tidy up the release"]
# Delete directory form
if deletable_dirs:
diff --git a/atr/post/finish.py b/atr/post/finish.py
index 90bd324c..0bc0aef6 100644
--- a/atr/post/finish.py
+++ b/atr/post/finish.py
@@ -45,6 +45,8 @@ async def selected(
match finish_form:
case shared.finish.DeleteEmptyDirectoryForm() as delete_form:
return await _delete_empty_directory(delete_form, session, project_key, version_key, respond)
+ case shared.finish.PublishToSvnForm() as publish_form:
+ return await _publish_to_svn(publish_form, session, project_key, version_key, respond)
case shared.finish.RemoveRCTagsForm():
return await _remove_rc_tags(session, project_key, version_key, respond)
@@ -72,6 +74,24 @@ async def _delete_empty_directory(
return await respond(200, f"Deleted empty directory '{dir_to_delete_rel}'.")
+async def _publish_to_svn(
+ publish_form: shared.finish.PublishToSvnForm,
+ session: web.Committer,
+ project_key: safe.ProjectKey,
+ version_key: safe.VersionKey,
+ respond: shared.finish.Respond,
+) -> tuple[web.QuartResponse, int] | web.WerkzeugResponse:
+ try:
+ async with storage.write(session) as write:
+ wacp = await write.as_project_committee_participant(project_key)
+ await wacp.release.publish_to_svn(
+ project_key, version_key, publish_form.revision_number, publish_form.download_path_suffix
+ )
+ except storage.AccessError as e:
+ return await respond(e.status or 409, str(e))
+ return await respond(200, "SVN publish task queued.")
+
+
async def _remove_rc_tags(
session: web.Committer,
project_key: safe.ProjectKey,
diff --git a/atr/sessions.py b/atr/sessions.py
index cab71f0d..61e69ef4 100644
--- a/atr/sessions.py
+++ b/atr/sessions.py
@@ -139,6 +139,7 @@ def _prepare_session_data(session_data: dict[str, Any]) -> dict[str, Any]:
class Store:
async def create(self, hsid: str, session_data: dict[str, Any]) -> None:
+ log.info("OAuth session data received from ASFQuart", oauth_session_data=session_data)
prepared = _prepare_session_data(session_data)
ip_address = quart.request.remote_addr
now = time.time()
diff --git a/atr/shared/finish.py b/atr/shared/finish.py
index 7b511368..f3d980bb 100644
--- a/atr/shared/finish.py
+++ b/atr/shared/finish.py
@@ -25,6 +25,7 @@ import atr.web as web
type Respond = Callable[[int, str], Awaitable[tuple[web.QuartResponse, int] | web.WerkzeugResponse]]
type DELETE_DIR = Literal["DELETE_DIR"]
+type PUBLISH_TO_SVN = Literal["PUBLISH_TO_SVN"]
type REMOVE_RC_TAGS = Literal["REMOVE_RC_TAGS"]
@@ -33,11 +34,17 @@ class DeleteEmptyDirectoryForm(form.Form):
directory_to_delete: safe.RelPath = form.label("Directory to delete", widget=form.Widget.SELECT)
+class PublishToSvnForm(form.Form):
+ variant: PUBLISH_TO_SVN = form.value(PUBLISH_TO_SVN)
+ download_path_suffix: safe.OptionalRelPath = form.label("Download path suffix", default=None)
+ revision_number: safe.RevisionNumber = form.label("Revision number", widget=form.Widget.HIDDEN)
+
+
class RemoveRCTagsForm(form.Empty):
variant: REMOVE_RC_TAGS = form.value(REMOVE_RC_TAGS)
type FinishForm = Annotated[
- DeleteEmptyDirectoryForm | RemoveRCTagsForm,
+ DeleteEmptyDirectoryForm | PublishToSvnForm | RemoveRCTagsForm,
form.DISCRIMINATOR,
]
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org