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 c45bca8  Allow disclaimer files in podling releases
c45bca8 is described below

commit c45bca876376e2344d3690fb360ea591758d102f
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Jun 30 17:15:29 2025 +0100

    Allow disclaimer files in podling releases
---
 atr/tasks/__init__.py     |  8 +++++++-
 atr/tasks/checks/paths.py | 10 +++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/atr/tasks/__init__.py b/atr/tasks/__init__.py
index 4c80ebc..90c5b37 100644
--- a/atr/tasks/__init__.py
+++ b/atr/tasks/__init__.py
@@ -79,7 +79,13 @@ async def draft_checks(
                     task.revision_number = revision_number
                     data.add(task)
 
-        path_check_task = queued(models.TaskType.PATHS_CHECK, release, 
revision_number)
+        is_podling = False
+        if release.project.committee is not None:
+            if release.project.committee.is_podling:
+                is_podling = True
+        path_check_task = queued(
+            models.TaskType.PATHS_CHECK, release, revision_number, 
extra_args={"is_podling": is_podling}
+        )
         data.add(path_check_task)
         if caller_data is None:
             await data.commit()
diff --git a/atr/tasks/checks/paths.py b/atr/tasks/checks/paths.py
index 3d7e4f4..5294604 100644
--- a/atr/tasks/checks/paths.py
+++ b/atr/tasks/checks/paths.py
@@ -69,6 +69,7 @@ async def check(args: checks.FunctionArguments) -> None:
         _LOGGER.error("Base release directory does not exist or is not a 
directory: %s", base_path)
         return
 
+    is_podling = args.extra_args.get("is_podling", False)
     relative_paths = [p async for p in util.paths_recursive(base_path)]
     relative_paths_set = set(str(p) for p in relative_paths)
     for relative_path in relative_paths:
@@ -80,6 +81,7 @@ async def check(args: checks.FunctionArguments) -> None:
             recorder_warnings,
             recorder_success,
             relative_paths_set,
+            is_podling,
         )
 
     return None
@@ -149,6 +151,7 @@ async def _check_path_process_single(
     recorder_warnings: checks.Recorder,
     recorder_success: checks.Recorder,
     relative_paths: set[str],
+    is_podling: bool,
 ) -> None:
     """Process and check a single path within the release directory."""
     full_path = base_path / relative_path
@@ -172,6 +175,11 @@ async def _check_path_process_single(
     ext_artifact = search.group("artifact") if search else None
     ext_metadata = search.group("metadata") if search else None
 
+    allowed_top_level = _ALLOWED_TOP_LEVEL
+    if is_podling:
+        # TODO: We must also require that one of these is present
+        allowed_top_level |= {"DISCLAIMER", "DISCLAIMER-WIP"}
+
     if ext_artifact:
         _LOGGER.info("Checking artifact rules for %s", full_path)
         await _check_artifact_rules(base_path, relative_path, relative_paths, 
errors)
@@ -180,7 +188,7 @@ async def _check_path_process_single(
         await _check_metadata_rules(base_path, relative_path, relative_paths, 
ext_metadata, errors, warnings)
     else:
         _LOGGER.info("Checking general rules for %s", full_path)
-        if (relative_path.parent == pathlib.Path(".")) and (relative_path.name 
not in _ALLOWED_TOP_LEVEL):
+        if (relative_path.parent == pathlib.Path(".")) and (relative_path.name 
not in allowed_top_level):
             warnings.append(f"Unknown top level file: {relative_path.name}")
 
     for error in errors:


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

Reply via email to