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

Change(WorkflowRunManager): update the workflowrun model #536

Merged
merged 8 commits into from
Sep 10, 2024

Conversation

raylrui
Copy link
Contributor

@raylrui raylrui commented Sep 9, 2024

  1. add relation name for 'reverse query' function in WorkflowRun
  2. add he 'current_state', 'libraries', and workflow in the serializer
  3. add prefetch_related, select_query, to reduce reduce the overall queries

For UI performance improvement, it is better to have WorkflowRun Data with some details in one call.
WorkflowRun after modification:

{
      "id": 111,
      "currentState": {
        "id": 111,
        "status": "SUCCEEDED",
        "timestamp": "2024-01-01T01:11:11.1111111Z",
        "comment": null,
        "workflowRun": 222,
        "payload": 333
      },
      "libraries": [
        {
          "orcabusId": "lib.xxxxxxxxx",
          "libraryId": "L000000"
        },
         ...
      ]
      "portalRunId": "xxxxxxxxxxx",
      "executionId": null,
      "workflowRunName": "umccr--automated--wts--x-x-x--xxxxxxxx",
      "comment": null,
      "workflow": {
        "id": 555,
        "workflowName": "wts",
        "workflowVersion": "X.X.X",
        "executionEngine": "Unknown",
        "executionEnginePipelineId": "Unknown",
        "approvalState": "SSSS"
      },
    },

@raylrui raylrui self-assigned this Sep 9, 2024
@raylrui raylrui marked this pull request as ready for review September 9, 2024 02:49
Copy link
Member

@reisingerf reisingerf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@raylrui
Copy link
Contributor Author

raylrui commented Sep 10, 2024

This commit is just to add some custom query params in workflow run so we can easily handle mix of "querys" for frontend.

No model and view changes.

so current workflowrun can have have query like this:
http://localhost:8000/api/v1/workflowrun/?start_time=2024-08-30T11:07:00Z&end_time=2024-09-10T23:59:59Z&is_ongoing=TRUE&workflow__workflowName=rnasum

@raylrui raylrui merged commit c152fcc into main Sep 10, 2024
1 check passed
@raylrui raylrui deleted the feat/modify-workflowrun-list-viewset branch September 10, 2024 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants