Repository navigation
Tags
Tags
Use the last data location match of a requeued job log (#133) A job requeued by Slurm appends to the same log, so the Running ... Job w/ line appears twice and the data location came back doubled. Print only the last match. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Retry the cancel and claim reads after a short database outage (#130) * Retry the event store after a dropped database connection Treat a dropped connection (OperationalError, PendingRollbackError, connection_invalidated) as retryable in retry_on_database_conflict, which already rolls back and backs off, and give the cancel and claim reads (raise_if_cancel_requested, is_workflow_finished) the same retry. Raise the retry budget from 3 to 8 so the backoff spans a database restart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Narrow the retry to the idempotent cancel and claim reads Writes keep the existing short conflict retry: replaying a write after a failure inside the same save can duplicate events (biomero#128). Only the reads, which are safe to repeat, get a separate, longer budget (DATABASE_READ_MAX_RETRIES). Drop the dropped-connection classification and the larger shared conflict budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Skip events another process projected; keep final workflow rows (#127) * Skip events another process projected; keep final workflow rows Every process with a SlurmClient runs its own copy of the four view projections inside the producer's save(), sharing one tracking position per projection. When another process recorded an event's position first, eventsourcing raised a message-less IntegrityError out of the producer's save(), and a lagging process could overwrite a DONE workflow row with an older IMPORTED status. - ViewProjection (base of the four projections) skips an event whose tracking position is already recorded, before handling it or when recording conflicts; a conflict for an unrecorded position still raises. - WorkflowProgress reads the row with a lock and never replaces a DONE or FAILED row with a non-final status (workflow_status.FINAL). - retry_on_database_conflict logs the error type with the message. Fixes #126. Refs NL-BioImaging/NL-BIOMERO#123. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Raise database tracking conflicts; drop caches on skipped events Review follow-up for #126: - A recording conflict that the database reported (eventsourcing IntegrityError with a cause) is raised, not checked against the aborted transaction, so retry_on_database_conflict rolls back. - Skipping an already projected event drops the projection's caches; TaskCreated records its workflow, and a cached task without a workflow is looked up, so later task events are not dropped. - super().__init__() in the projections, one alias for the eventsourcing IntegrityError, wfs.FINAL in the durability test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Stage each generated job script upload under its own name (#125) * Stage each generated job script upload under its own name Concurrent workflows publishing the same generated script shared the fixed staging file, so one upload truncated or renamed the other's and failed with a size mismatch or FileNotFoundError. Each publication now chooses one unique staging suffix (stable across its retries) and removes its staging file when the publication fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Harden staging cleanup of generated job script uploads Use `rm -f --`, log the removal only when it succeeded, and pin the exact cleanup command and the error-propagation path in tests. Sort the TRANSFER_PARTIAL_SUFFIX import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
-
Nov 20, 2026 - 384a72e
- zip
- tar.gz
- 10BC8 Notes
Install the shallower helper image named by the caller (#118) * Install the shallower helper image named by the caller Core no longer reads the helper image or version from the INI or the constructor. The caller names the helper image: setup_slurm(helper_image=) installs it and shallow_results_on_slurm(helper_image=) runs it. When a new shallowing finds the image not installed, the full results are kept and a WARNING tells the administrator to run Slurm Init; a started task whose image is missing still raises, because its helper job may have changed the results. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Require biomero-schema 0.3.0b4 for the storage record and marker models biomero-scripts reads the import-storage record and the canonical marker through the models that first ship in biomero-schema 0.3.0b4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Review fixes: setup_slurm leaves the helper image to the caller; one resolver Drops the unreachable helper_image parameter of setup_slurm (callers install the helper through setup_container_images(extra_image_specs=)), which also removes the spurious warning on every init_slurm. Adds resolve_helper_image() so the scripts share one way to ask the installed shallower for its image. Splits _start_or_resume_helper into named steps, pins the image check in the report validation with a test, documents the new signature. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * resolve_helper_image takes no provider and imports the shallower lazily Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Docs: Slurm Init installs the helper through setup_container_images; tidy a test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Define cancel script and Slurm_Path names in biomero.constants (#117) * Define cancel script and Slurm_Path names in biomero.constants Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Define the workflow metadata annotation keys in biomero.constants Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Define the detached launcher param names in biomero.constants (#115) * Define the detached launcher param names in biomero.constants Add constants.launcher_params with the six names (workflows, selected_output, group, batches, base_inputs, effective_type) that the workflow scripts write into a launcher task and the detached supervisor reads back. Values are unchanged; a unit test pins them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Add the output_settings launcher param name SLURM_Run_Workflow.py records output_settings on the launcher and on the Slurm task, and SLURM_Import_Results.py reads it: a name two scripts use. The other launcher keys are written and read by one script only, so they stay local. Value unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Clean up metadata views, projections and schema re-exports (#104) * Clean up metadata views, projections and schema re-exports - Remove biomero.zarr_contracts and its star import; the schema owns the contracts (import from biomero_schema.zarr). - Rename biomero.provenance to biomero.metadata_views, split into named steps with logging, constants and type hints; keep a deprecated alias. - Pin the reduced-field text contract with the scripts. - views: one tracker lookup and one phase table, owner of a workflow is resolved from the tracker for every projection, only a missing aggregate is handled. - database: only a lost table-creation race is tolerated. - Move the Blueprint colour logic out of constants (now in biomero-scripts). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Address review: shared launcher rule, aggregate invariants, exports - Launcher marker, task names and the legacy claim status move to constants; is_launcher_task lives in eventsourcing (same names and places as the detached PR); views and metadata_views use them. - Task.storage_provenance is initialised in __init__; target keys are normalised before comparison; the canonical-input invariants are enforced by the WorkflowRun aggregate. - Drop the biomero.provenance alias (prerelease-only name). - views: __all__; the owner lookup no longer tolerates database outages. - database: guard commit/rollback against a missing session and log or raise, not both; keep the original table-creation error. - software version: read from the last line of the workflow description, WARNING on fallback. - Tests for the surviving mutants and the new behaviour. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Address review: keep deprecated colour names, tolerant lookups, readability - constants: resolve_workflow_color and QUALITATIVE_COLOR_SCHEME stay as deprecated names (they shipped in stable 2.8.x) until the scripts release that no longer uses them; shared progress/prefix/status constants move here. - views: tracker lookups log a WARNING with the traceback on a database error and continue; one commit_after_event decorator and one write_view_row helper replace the repeated commit and IntegrityError blocks; the dead retry decorators are removed (update_view_table retries for real); Google-style docstrings, type hints, flake8 clean. - database: retry_on_database_conflict split into named steps with constants. - metadata_views: licence header, no private id in logs, param prefix derived from the launcher marker, no warning for workflows without a description. - eventsourcing: __all__, unused imports, docstring. - tests for the surviving mutants; docs for the phase table. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Address second-round review: lookup errors, pinned retries, JobProgress restart - Lookups catch eventsourcing's PersistenceError as well as SQLAlchemy's, and the direct view-table lookups are guarded too (first_view_row). - The retry-then-succeed and exhausted-retry tests cover all four projections; the commit-after-event test counts the views' own commits for a lifecycle. - JobProgress resolves the job of a task it has not seen (listener restart) from the tracker and keeps the stored status/progress. - views.__all__ lists only the projection classes; named constants for the retry counts; Args docstrings use name (type): text. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Replay test: the old job's status updates after a listener restart Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
PreviousNext