You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Record runs as a store-agnostic record with a PROV view - #2
RunRecord (rec.record) is what rec knows of a run: OSLC state and verdict, times, result and fail trace, program and recording software, trigger, host, agents, sources, repositories, dependencies, resources, artefacts and metrics
Observer(store) records every event once for any store through store.edit; only a run that has not started can start or be cancelled, and a step logged again replaces its value
A store is any object with load, edit, run_ids and close (rec.stores.Store); edit is atomic per run across processes, so a start and a cancel cannot both succeed; FileStore keeps a run as its PROV document (fmt="rdf") or its record as JSON (fmt="json") under an flock, MariaDBStore as one row with state and verdict columns under SELECT ... FOR UPDATE
MariaDBStore does not migrate tables created by MariaDBObserver
rec.provenance maps a record to PROV with the rdf-utils helpers and back: an unstarted run is a prov:Activity, a started one a prov-ext:Execution associated with rec whose plan is the file defining the run; run ids are percent-encoded in IRIs; a structured result is an rdf:JSON literal; files are entities, relative paths prov-ext:RelativeLocation under the directory they were logged from
Run records the program it ran, stops the heartbeat before any outcome (also on SystemExit), and runs post-run hooks after completion, so a hook that raises no longer rewrites the verdict
rdflib and rdf-utils become dependencies; MariaDB stays an extra; observers are replaced by the observer and stores
- RunRecord (rec.record) is what rec knows of a run: OSLC state and verdict, times, result and fail trace, program and recording software, trigger, host, agents, sources, repositories, dependencies, resources, artefacts and metrics
- Observer(store) records every event once for any store: load the record, change it, save it; a run cancelled in the store does not start, only a run that has not started can be cancelled, and a step logged again replaces its value
- A store is any object with load, save, run_ids and close (rec.stores.Store); FileStore keeps a run as its PROV document (fmt="rdf") or its record as JSON (fmt="json"), MariaDBStore as one row with state and verdict columns, migrating the previous release's table
- rec.provenance maps a record to PROV with the rdf-utils helpers and back: an unstarted run is a prov:Activity, a started one a prov-ext:Execution associated with rec whose plan is the file defining the run; files are entities, relative paths prov-ext:RelativeLocation under the directory they were logged from
- Run records the program it ran, stops the heartbeat before completion, and runs post-run hooks after it, so a hook that raises no longer rewrites the verdict
- rdflib and rdf-utils become dependencies; MariaDB stays an extra; observers are replaced by the observer and stores
- Store.edit(run_id) replaces save: FileStore holds an flock on <id>.lock, MariaDBStore a SELECT ... FOR UPDATE transaction, so a start and a cancel from separate observers cannot both succeed
- A run starts only when new or queued, in Run.run and Observer.log_started_run
- Run ids are percent-encoded in run IRIs
- A list or mapping result is an rdf:JSON literal and reads back as itself
- Drop the migration of MariaDBObserver's table and its test
- Drop Run's unused ingredients, scenario and **kwargs
Pin VCS dependency to a released or immutable version
pyproject.toml:11
Depending on the moving main branch makes installations and CI non-reproducible; an upstream change can break this package without any REC commit, especially because the code imports an underscore-prefixed helper from this dependency. Use a released version or pin the VCS reference to an immutable commit/tag.
Select next step above the maximum existing metric step
rec/observer.py:96
Counting existing metrics does not reliably select a new step. For example, after explicitly logging step 1, the next call without a step also chooses 1 and silently replaces it; sparse explicit steps have the same problem. Choose one greater than the maximum existing step for this metric.
Guard missing run start before RDF trigger lookup
rec/provenance.py:218
When a run has no qualified start, start is None; in rdflib, g.value(None, PROV.entity) searches for a subject with that predicate rather than returning None. A run with resources but no trigger can therefore deserialize a prov:Usage node as its trigger, breaking the RDF/record round trip. Guard both lookups with if start.
- The heartbeat stops in a finally around the hooks and main, so SystemExit no longer leaves its non-daemon thread running
- MariaDBStore.number had no caller; the id column stays to order runs
- Only a new run can be queued and only a queued run cancelled, so a finished run cannot be queued and run again, and cancelling an unknown id creates nothing
- Run queues and cancels only once its stores accept, as it already started
- A record with a value JSON cannot keep is refused for every store, so a result or metric no longer passes in one store and fails in another
- add_agent accepts only PROV-O's agent classes
- MariaDBStore serializes its threads on its one connection; the observer no longer locks
- Queueing, starting, cancelling and ending hold every store's record at once, so a refusal by one store leaves all unchanged; observers sharing a store are refused
- Ending a run and its heartbeat require it in progress
- The observer keeps lists in one order and refuses a change JSON or PROV would not give back unchanged: lossy JSON values, NaN, empty strings, an entity logged twice
- A file is generated once per run (PROV-Constraints generation-uniqueness)
- provenance.record reads only the requested run, and a file's IRI includes its root
- The heartbeat is a daemon thread, so one stuck on a store cannot keep the process alive
- FileStore.save is private to edit
- README states the multi-store limits: no two-phase commit, and opposite store orders can deadlock
- graph() types a run prov-ext:Execution and oslc_auto:AutomationResult whatever its state; a started run adds its start time and association
- A queued or cancelled run conforms with no start time, association or usage
- The shapes refuse a run without a verdict, a queued run with a start time, and a run that is not an execution or not an automation result
- README describes the run's types
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.