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 2025/03/06 13:55:13 UTC

(tooling-atr-experiments) branch main updated: Update the plans and improve the platform specific ASFQuart fix

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-atr-experiments.git


The following commit(s) were added to refs/heads/main by this push:
     new d362057  Update the plans and improve the platform specific ASFQuart fix
d362057 is described below

commit d362057eb0b14880b653003dc69b5fd531856c4b
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Thu Mar 6 15:54:51 2025 +0200

    Update the plans and improve the platform specific ASFQuart fix
---
 asfquart/src/asfquart/__init__.py | 35 ++++++-----------------------------
 docs/plan.html                    | 17 +++++++++++------
 docs/plan.md                      | 16 ++++++++++------
 3 files changed, 27 insertions(+), 41 deletions(-)

diff --git a/asfquart/src/asfquart/__init__.py b/asfquart/src/asfquart/__init__.py
index 81d6dea..4fd3704 100644
--- a/asfquart/src/asfquart/__init__.py
+++ b/asfquart/src/asfquart/__init__.py
@@ -3,36 +3,13 @@
 import sys
 import types
 
+# This fix will be unnecessary once asfpy is released with:
+# https://github.com/apache/infrastructure-asfpy/commit/330b223
+# And ASFQuart is updated to use the updated asfpy
 if sys.platform == "darwin":
-    # Create a dummy module for asyncinotify._ffi
-    dummy_ffi = types.ModuleType("_ffi")
-
-    def dummy_inotify_init():
-        raise NotImplementedError("inotify is not supported on macOS")
-
-    dummy_ffi.inotify_init = dummy_inotify_init  # type: ignore
-
-    # Define a dummy Inotify class with no-op methods
-    class DummyInotify:
-        def __init__(self, *args, **kwargs):
-            pass
-
-        def fileno(self):
-            return -1
-
-        def read(self, *args, **kwargs):
-            return b""
-
-        def close(self):
-            pass
-
-    # Create a dummy asyncinotify module that contains our dummy _ffi and Inotify
-    dummy_asyncinotify = types.ModuleType("asyncinotify")
-    dummy_asyncinotify._ffi = dummy_ffi  # type: ignore
-    dummy_asyncinotify.Inotify = DummyInotify  # type: ignore
-
-    # Insert our dummy module into sys.modules so future imports use it
-    sys.modules["asyncinotify"] = dummy_asyncinotify
+    sys.modules["asyncinotify"] = types.ModuleType("asyncinotify")
+    sys.modules["asyncinotify"]._ffi = types.ModuleType("_ffi")
+    sys.modules["asyncinotify"].Inotify = type("Inotify", (), {"__init__": lambda *_: None})
 
 # ensure all submodules are loaded
 from . import config, base, session, utils
diff --git a/docs/plan.html b/docs/plan.html
index df91dcb..6d7e6c7 100644
--- a/docs/plan.html
+++ b/docs/plan.html
@@ -12,7 +12,9 @@
 <li>[DONE] Allow package deletion</li>
 <li>[DONE] Allow RCs to be deleted</li>
 <li>[DONE] Move signature verification to a task runner</li>
-<li>Add methods to allow the bulk addition of RC artifacts</li>
+<li>[DONE] Add a method to allow the bulk addition of RC artifacts</li>
+<li>Improve the existing method to allow the bulk addition of RC artifacts</li>
+<li>Add further methods to allow the bulk addition of RC artifacts</li>
 </ul>
 </li>
 <li>
@@ -83,18 +85,18 @@
 </ul>
 </li>
 <li>
-<p>Orchestrating scheduler and resource management</p>
+<p>Orchestrating manager and resource management</p>
 <ul>
 <li>[DONE] Implement process-based task isolation</li>
 <li>[DONE] Create task table in sqlite database</li>
 <li>[DONE] Add task queue management</li>
-<li>Track and limit disk usage per task in the scheduler</li>
+<li>Track and limit disk usage per task in the manager</li>
 </ul>
 </li>
 <li>
 <p>Improve the task UI</p>
 <ul>
-<li>[DONE] Allow restarting all tasks</li>
+<li>[DONE] Allow restarting all tasks when inactive</li>
 <li>Test that tasks are deleted when a package is deleted</li>
 </ul>
 </li>
@@ -112,9 +114,8 @@
 <li>[DONE] Add ATR commit or version number to the UI</li>
 <li>[DONE] Fix and improve the package checks summary count</li>
 <li>Ensure that all errors are caught and logged or displayed</li>
-<li>Add tests</li>
 <li>Improve the proprietary platform patch in ASFQuart and submit upstream</li>
-<li>Patch the synchronous behaviour in Jinja and submit upstream</li>
+<li>Add further tests</li>
 </ul>
 </li>
 <li>
@@ -132,6 +133,10 @@
 </ul>
 </li>
 </ol>
+<p>Advanced tasks, possibly deferred</p>
+<ul>
+<li>Patch the synchronous behaviour in Jinja and submit upstream</li>
+</ul>
 <h2>Basic RC validation</h2>
 <p>These tasks are dependent on the task scheduler above.</p>
 <ol>
diff --git a/docs/plan.md b/docs/plan.md
index 56959aa..0d82090 100644
--- a/docs/plan.md
+++ b/docs/plan.md
@@ -12,7 +12,9 @@ This is a rough plan of immediate tasks. The priority of these tasks may change,
    - [DONE] Allow package deletion
    - [DONE] Allow RCs to be deleted
    - [DONE] Move signature verification to a task runner
-   - Add methods to allow the bulk addition of RC artifacts
+   - [DONE] Add a method to allow the bulk addition of RC artifacts
+   - Improve the existing method to allow the bulk addition of RC artifacts
+   - Add further methods to allow the bulk addition of RC artifacts
 
 2. Enhance RC display
    - [DONE] Augment raw file hashes with the original filenames in the UI
@@ -65,14 +67,14 @@ We aim to work on the task scheduler in parallel with the UX improvements above.
    - Allow dependencies between tasks to reduce duplication of effort
    - Add UI to restart all waiting workers
 
-2. Orchestrating scheduler and resource management
+2. Orchestrating manager and resource management
    - [DONE] Implement process-based task isolation
    - [DONE] Create task table in sqlite database
    - [DONE] Add task queue management
-   - Track and limit disk usage per task in the scheduler
+   - Track and limit disk usage per task in the manager
 
 3. Improve the task UI
-   - [DONE] Allow restarting all tasks
+   - [DONE] Allow restarting all tasks when inactive
    - Test that tasks are deleted when a package is deleted
 
 Advanced tasks, possibly deferred
@@ -85,9 +87,8 @@ Advanced tasks, possibly deferred
    - [DONE] Add ATR commit or version number to the UI
    - [DONE] Fix and improve the package checks summary count
    - Ensure that all errors are caught and logged or displayed
-   - Add tests
    - Improve the proprietary platform patch in ASFQuart and submit upstream
-   - Patch the synchronous behaviour in Jinja and submit upstream
+   - Add further tests
 
 2. Ensure that performance is optimal
    - [DONE] Add page load timing metrics to a log
@@ -97,6 +98,9 @@ Advanced tasks, possibly deferred
    - [DONE] Potentially add blockbuster
    - Create website UX integration tests using a browser driver
 
+Advanced tasks, possibly deferred
+   - Patch the synchronous behaviour in Jinja and submit upstream
+
 ## Basic RC validation
 
 These tasks are dependent on the task scheduler above.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org