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

Eng 2735 Add order by and limit parameters for V2 workflow results #1240

Merged
merged 8 commits into from
Apr 26, 2023

Conversation

eunice-chan
Copy link
Contributor

Describe your changes and why you are making these changes

Support order_by and limit in query params. order_by assumes it is a column in workflow result dag table.

Related issue number (if any)

Eng 2735

Checklist before requesting a review

  • I have created a descriptive PR title. The PR title should complete the sentence "This PR...".
  • I have performed a self-review of my code.
  • [N/A] I have included a small demo of the changes. For the UI, this would be a screenshot or a Loom video.
  • If this is a new feature, I have added unit tests and integration tests.
  • I have run the integration tests locally and they are passing.
  • I have run the linter script locally (See python3 scripts/run_linters.py -h for usage).
  • [N/A] All features on the UI continue to work correctly.
  • Added one of the following CI labels:
    • run_integration_test: Runs integration tests
    • skip_integration_test: Skips integration tests (Should be used when changes are ONLY documentation/UI)

@eunice-chan eunice-chan added the run_integration_test Triggers integration tests label Apr 24, 2023
@@ -184,7 +184,7 @@ func (h *GetWorkflowHandler) Perform(ctx context.Context, interfaceArgs interfac
dags[dbDAG.ID] = constructedDAG
}

dagResults, err := h.DAGResultRepo.GetByWorkflow(ctx, args.workflowID, h.Database)
dagResults, err := h.DAGResultRepo.GetByWorkflow(ctx, args.workflowID, "", -1, h.Database)
Copy link
Contributor

Choose a reason for hiding this comment

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

similar here, let's make a comment to these default values, something like:

(
...,
"", // order_by_desc
-1, // limit, -1 means no limit
)

Copy link
Contributor

@likawind likawind left a comment

Choose a reason for hiding this comment

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

Great job! A couple small suggestions but once they are addressed, it should be good to go

@likawind
Copy link
Contributor

I'm not sure if we have a database test for the query you modified, just make sure make test-database pass locally

@eunice-chan eunice-chan merged commit f7e889e into main Apr 26, 2023
@vsreekanti vsreekanti deleted the eng-2735-m3-add-query-parameters-for-v2 branch May 9, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run_integration_test Triggers integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants