llnl / llnl/merlin

Add Status-Related Data Models & DB Commands

Open
#535 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Merlin 2.0
Dominant language
Python
Stars
151
Forks
30
PR merge metrics
No merged PRs in 30d

Description

In order for the status commands to start using the Merlin database, we need to store the necessary information in this database. We'll likely need the following data models:

  • StepModel
    • name
    • description
    • batch settings (implement later when we refactor the batch.py file)
    • parameters -> this might need its own data model
    • associated queue
    • link to logical worker (if we do this, we don't really need to store the queue in the bullet above)
    • list of tasks associated with this step (link to TaskModel)
    • link to StudyModel
    • status? Not sure if this is necessary as we can build the progress bar from TaskModel statuses
  • TaskModel
    • workspace
    • status
    • return code
    • time since last start
    • number of restarts
    • physical worker(s) that have processed this task
    • Note: if we save this for each task then I'm worried about how much space we'll take up in the database

We'll also need the ability to interact with these models via:

  • merlin database get step <step id or name>
  • merlin database get all-steps [--filters]
  • merlin database delete step <step id or name>
  • merlin database delete all-steps [--filters]
  • merlin database get task <task id or workspace>
  • merlin database get all-tasks [--filters]
  • merlin database delete task <task id or workspace>
  • merlin database delete all-tasks [--filters]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing Merlin database models and the CLI entry point for merlin database. Read how current models and database commands are structured before defining the StepModel and TaskModel scope. Done means the required status data can be stored and the listed get/delete commands work with IDs, names, workspaces, and filters.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.