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

[3/n] Refactor workflow details page to use v2 nodes route #1310

Conversation

likawind
Copy link
Contributor

Describe your changes and why you are making these changes

This PR refactors workflow details page to use v2 nodes route. We mainly handle node selection and retrieval logic to directly use nodes from V2 endpoints, rather than the convoluted operators and artifacts objects in selectedDag reducer state.

We are not yet touching the node rendering part, which is a huge change and will include in a separate PR.

Related issue number (if any)

Loom demo (if any)

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.
  • 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).
  • 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)

@likawind likawind marked this pull request as ready for review May 17, 2023 17:32
@likawind likawind force-pushed the eng-2699-m1-refactor-wf-detail-pages-to-use-new-3 branch from 4196cf7 to 80babf5 Compare May 17, 2023 21:25
… eng-2699-m1-refactor-wf-detail-pages-to-use-new-3
… eng-2699-m1-refactor-wf-detail-pages-to-use-new-3
(state: RootState) => state.nodeSelectionReducer.selected
const selectedNodeState = useSelector(
(state: RootState) =>
state.workflowPageReducer.perWorkflowPageStates[workflowId]?.SelectedNode
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this perWorkflowPageStates do? Does it manage the sidesheet state?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After getting deep into most refactors, I think the only thing it's managing is the selected node (which controls whether to show and which sidesheet to show). It doesn't further manage any page states, which will be controlled by page components or already handled by RTK

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds good

@@ -120,6 +120,7 @@ func NewArtifactFromDBObject(dbArtifactNode *views.ArtifactNode) *Artifact {
type ArtifactResult struct {
// Contains only the `result`. It mostly mirrors 'artifact_result' schema.
ID uuid.UUID `json:"id"`
ArtifactID uuid.UUID `json:"artifact_id"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@likawind likawind merged commit ed0b20d into eng-2699-m1-refactor-wf-detail-pages-to-use-new-2 May 18, 2023
@likawind likawind deleted the eng-2699-m1-refactor-wf-detail-pages-to-use-new-3 branch May 22, 2023 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants