fix(rename): second review pass on the package rename

- The post-task reclaim skip recognises the legacy application.* embed name,
  so query embeds queued by the previous release do not pay a full collect.
- The Azure compose file mounts host data on /app/{indexes,inputs,vectors},
  where the process actually reads and writes; it mounted /app/application/...
  before the rename and /app/docsgpt/... after it, and nothing wrote to either.
- The offline image check triggers on docsgpt/requirements*.txt again;
  dependabot's pip entry points at docsgpt/.
- install_hint() and its docstring name docsgpt/requirements-<extra>.txt;
  the test asserts the full path.
- application/vectors/ stays ignored: the compose files still mount it.
- The durability QA script quiets the docsgpt logger tree.
- Upgrade note: the three renamed source-sync entries start their timers
  from the upgrade.
This commit is contained in:
Alex committed 2026-09-07 14:02:59 +01:00
1 parent adb6963523
commit 2d9568ff79
10 files changed
+27 -20

No files matched your search

+5 -2
View File
@@ -121,6 +121,7 @@ def _trim_native_heap() -> None:
# measured at ~86 ms for the collect against ~8 ms for the embed itself on a
# worker holding the ONNX model, i.e. a 9x slowdown of the whole round trip.
_NO_RECLAIM_TASKS = frozenset({"docsgpt.vectorstore.embeddings_tasks.embed_texts"})
LEGACY_TASK_PREFIX = "application."
@task_postrun.connect
@@ -132,7 +133,10 @@ def _reclaim_memory_after_task(task=None, **kwargs):
generational collect after a task that allocated a few kilobytes just
charges the next task for walking the whole heap.
"""
if getattr(task, "name", None) in _NO_RECLAIM_TASKS:
name = getattr(task, "name", None)
if isinstance(name, str) and name.startswith(LEGACY_TASK_PREFIX):
name = "docsgpt." + name[len(LEGACY_TASK_PREFIX):]
if name in _NO_RECLAIM_TASKS:
return
gc.collect()
torch = sys.modules.get("torch")
@@ -169,7 +173,6 @@ celery = make_celery()
celery.config_from_object("docsgpt.celeryconfig")
#: Task-name prefix the package carried before the rename to ``docsgpt``.
LEGACY_TASK_PREFIX = "application."
def register_legacy_task_names(app: Celery) -> int: