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-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new af522b8  Add a tutorial
af522b8 is described below

commit af522b8c48b3be0f209d6eea18d36e038ec374af
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Mar 28 16:12:29 2025 +0200

    Add a tutorial
---
 atr/routes/__init__.py   |  4 +++
 atr/routes/candidate.py  |  5 ++++
 atr/templates/index.html | 72 ++++++++++++++++++++++++++++++++++++------------
 3 files changed, 63 insertions(+), 18 deletions(-)

diff --git a/atr/routes/__init__.py b/atr/routes/__init__.py
index 6d96c40..6997f60 100644
--- a/atr/routes/__init__.py
+++ b/atr/routes/__init__.py
@@ -410,6 +410,10 @@ class CommitterSession:
     async def user_candidate_drafts(self) -> list[models.Release]:
         return await user.candidate_drafts(self.uid, 
user_projects=self._projects)
 
+    # @property
+    # async def user_committees(self) -> list[models.Committee]:
+    #     return ...
+
     @property
     async def user_projects(self) -> list[models.Project]:
         if self._projects is None:
diff --git a/atr/routes/candidate.py b/atr/routes/candidate.py
index 5665f0c..c0c7301 100644
--- a/atr/routes/candidate.py
+++ b/atr/routes/candidate.py
@@ -28,6 +28,7 @@ import wtforms
 import atr.db as db
 import atr.db.models as models
 import atr.routes as routes
+import atr.user as user
 import atr.util as util
 
 if asfquart.APP is ...:
@@ -126,6 +127,10 @@ async def vote_project(session: routes.CommitterSession, 
project_name: str, vers
         release = await data.release(name=release_name, _project=True, 
_committee=True).demand(
             routes.FlashError("Release candidate not found")
         )
+        # Check that the user is on the release project committee
+        if not user.is_committee_member(release.committee, session.uid):
+            return await session.redirect(vote, error="You do not have access 
to this project")
+
         if quart.request.method == "GET":
             return await quart.render_template(
                 "release-vote.html",
diff --git a/atr/templates/index.html b/atr/templates/index.html
index 09db81d..03d1a5d 100644
--- a/atr/templates/index.html
+++ b/atr/templates/index.html
@@ -13,28 +13,64 @@
     verify, and track release candidates.
   </p>
 
-  <h2>Key Features</h2>
-  <ul>
-    <li>Automated PMC roster synchronization with Whimsy</li>
-    <li>Release candidate tracking and state management</li>
-    <li>Secure key management for release managers</li>
-    <li>Signature verification for release artifacts</li>
-  </ul>
+  <h2>Quick tutorial</h2>
+  <p>
+    This is a preview of an early version of ATR, and we would like testers to 
try it out and give us feedback. This section provides a quick tutorial for 
using ATR. The basic workflow on ATR is Release Candidate Draft -> Release 
Candidate -> Release Preview -> Release. Note that, as the header says on every 
page, this is a preview and you cannot yet create actual releases with ATR.
+  </p>
+
+  <h3>Release candidate draft</h3>
+
+  <p>
+    We recommend that you start by <a href="{{ as_url(routes.keys.ssh_add) 
}}">uploading your SSH key</a>. This gives you rsync access which makes it 
easier to upload your files. We plan to obtain your SSH key from your ASF 
account via LDAP in the long run.
+  </p>
+
+  <p>
+    Once you've uploaded your SSH key, you may be able to <a href="{{ 
as_url(routes.draft.add) }}">add a release candidate draft</a>. Only committee 
members can do this. Once a draft has been created, all committee members and 
committers can add files to the draft or delete files from it.
+  </p>
+
+  <p>
+    When you add files, ATR automatically runs some checks on the files. 
You'll be able to browse the results of those checks. Note that our checks are 
currently very basic, and we'll be adding more checks as we get feedback from 
testers.
+  </p>
+
+  <p>
+    When you're happy with the files in the draft, you can <a href="{{ 
as_url(routes.draft.promote) }}">promote the draft</a> to a release candidate.
+  </p>
+
+  <h3>Release candidate</h3>
 
-  <h2>Getting Started</h2>
   <p>
-    To create a release candidate draft, you must be a committee member of the 
target project. First, <a href="{{ as_url(routes.keys.ssh_add) }}">add your SSH 
key</a>, then <a href="{{ as_url(routes.draft.add) }}">add a release candidate 
draft</a>.
+    When you've promoted the draft to a release candidate, you can use ATR to 
<a href="{{ as_url(routes.candidate.vote) }}">start a vote on the release 
candidate</a>. Currently we allow any committee member to start the vote, but 
in the future we may limit this to designated release managers. The ATR is 
designed to send the vote email itself, but we understand that projects send 
very detailed vote announcement emails. We plan to make it easier for you to 
send such announcement emails. We [...]
   </p>
 
-  <h2>Documentation</h2>
+  <p>
+    The vote email is not actually sent out, because ATR cannot yet be used to 
create releases. We are only testing the workflow.
+  </p>
+
+  <p>
+    When you're happy with the release candidate, you can <a href="{{ 
as_url(routes.candidate.resolve) }}">record the vote resolution</a> to promote 
the release candidate to a release preview.
+  </p>
+
+  <h3>Release preview</h3>
+
+  <p>
+    When you've promoted the release candidate to a release preview, you can 
review the files. We plan to make it possible to adjust the release preview 
before it's promoted to a release.
+  </p>
+
+  <p>
+    When you're happy with the release preview, you can <a href="{{ 
as_url(routes.preview.promote) }}">promote the release preview</a> to a 
release. This, again, should be an action limited to designated release 
managers.
+  </p>
+
+  <h3>Release</h3>
+
+  <p>
+    When you've promoted the release preview to a release, you can <a href="{{ 
as_url(routes.release.review) }}">browse the release</a>.
+  </p>
+
+  <h2>Key features</h2>
   <ul>
-    <li>
-      <a href="{{ as_url(routes.projects.directory) }}">Project directory and 
release manager assignments</a>
-    </li>
-    {% if current_user %}
-      <li>
-        <a href="{{ as_url(routes.candidate.vote) }}">Track your release 
candidates</a>
-      </li>
-    {% endif %}
+    <li>Support for rsync or HTML form based file uploads</li>
+    <li>Automatic checks of release artifacts</li>
+    <li>Templated email vote announcements</li>
   </ul>
+
 {% endblock content %}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to