Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement task restart policies #280

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Commits on Jul 16, 2024

  1. Added placeholder tests for proposed methods

    * Test: test_add_task_restart_policy_patterns
    * Test: test_get_task_restart_policy_patterns
    * Test: test_remove_task_restart_policy_patterns
    * Test: test_clear_task_restart_policy_patterns
    * Test: test_task_resolve_restarts
    ianmkenney committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    7f752b3 View commit details
    Browse the repository at this point in the history
  2. Added models for new node types

    * TaskRestartPattern
    * TaskRestartPolicy
    * TaskHistory
    ianmkenney committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    dd8f0e9 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2024

  1. Updated new GufeTokenizable models in statestore

    * Removed TaskRestartPolicy and TaskHistory
    * Added Traceback
    ianmkenney committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    da17e45 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b7f63d4 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2024

  1. Added validation and unit tests for storage models

    * TaskReturnPattern: Confirm that the input pattern is a string type and that it is not empty.
    * Traceback: Confirm that the input is a list of strings and that none of them are empty.
    ianmkenney committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    6a167f1 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2024

  1. Added taskhub_sk to TaskRestartPattern

    Similar to `TaskHub`s, the `TaskRestartPattern` needs additonal hashed
    data to uniquely identify it as a Neo4j node (via the gufe key). The
    unit tests have been updated to reflect this change.
    ianmkenney committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    a10e235 View commit details
    Browse the repository at this point in the history
  2. Added statestore methods for restart patterns

    `statestore` methods have been added to modify the database state:
    
    * add_task_restart_patterns
    * remove_task_restart_patterns
    * get_task_restart_patterns
    
    Tests were added for each method in the integration tests for the
    statestore.
    ianmkenney committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    b99d8ef View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2024

  1. Added APPLIES relationship when adding pattern

    The `add_task_restart_patterns` method now establishes the APPLIES
    relationship between the each new pattern and all Tasks ACTIONED
    on the corresponding TaskHub.
    
    Added testing for creation of the APPLIES relationship, asserting
    the number of created connections over multiple TaskHubs and Tasks.
    
    Further subdivided the test classes.
    
    Additionally added a `set_task_restart_patterns_max_retries` method
    for updating the max_retries of a TaskRestartPattern.
    ianmkenney committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    39f9868 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2024

  1. Establish APPLIES when actioning a Task

    "actioning" a Task on a TaskHub with preexisting TaskRestartPatterns
    created the APPLIES relationship between them with a num_retries value
    of 0. This behavior is tested in the test_action_task function in
    the statestore.
    ianmkenney committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    988155f View commit details
    Browse the repository at this point in the history
  2. Canceling a Task removes the APPLIES relationship

    When an actioned Task is canceled and also has an APPLIES relationship
    with a TaskRestartPattern, APPLIES is removed between the two
    nodes.
    
    Removed org, project, and campaign fields since they are not
    necessary for the APPLIES relationship.
    ianmkenney committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    d3f25f8 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2024

  1. Task status changes affect APPLIES relationship

    Setting an actioned Task status to the following statuses now removes
    the APPLIES relationship from attached TaskRestartPatterns:
    
    * complete
    * invalid
    * deleted
    
    NOTE: tests have not been added for this yet
    ianmkenney committed Aug 1, 2024
    Configuration menu
    Copy the full SHA
    510ae66 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2024

  1. Tests for Task status change on APPLIES

    Confirming that changing the status of an actioned Task to any of
    the following removes the APPLIES relationship:
    
    * complete
    * invalid
    * deleted
    ianmkenney committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    2310fd5 View commit details
    Browse the repository at this point in the history