-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve user experience for nested NodeExecutions (#77)
* feat: adds more identifying information for node executions (#70) * feat: show workflow node name beneath node execution ids * feat: updating DetailsPanel info for NodeExecutions * fix lint errors * adding tests for new formatter function * test: adding new test for NodeExecutionDetails * test: adding test for new code in NodeExecutionsTable * refactor: fetch child node executions for NodeExecution rows (#72) * refactor: fetch child node executions to determine expandability * fix: handling detection of children for sub-workflows as well * fix: poor performance with object-hash on some identifiers * docs: cleanup and docs for newly exposed functions * test: ensure request config is used for all levels * chore: remove unused import * feat: Remove intermediate NodeExecutionsTable row content (#75) * refactor: removing specialized rows and rendering only nodes * refactor: moving contexts up to common folder * refactor: use a data cache for nested node mapping * refactor: update loading of workflow data * fix: update usage of NodeExecutions in graph tab * fix: update TaskExecutionDetails to use data cache * fix: getting tests and stories working again * chore: docs and cleanup * test: use a more robust element query * refactor: use filter instead of reduce * docs: adding some missing function docs * fix: cleanup for dynamic tasks refactoring (#76) * test: creating dynamic task cases for NodeExecutionsTable stories * fix: styling for child group labels * fix: mock api context for NodeExecutionsTable stories * test: mock nodeExecutionData endpoint * chore: remove unused imports * fix: extract nodes from subworkflows as well * fix: adjust borders to make child groups more obvious * refactor: checkpoint for getting the nesting styles correct * refactor: adding logic for borders/spacing based on nesting/index * fix: correct workflow execution table row styles
- Loading branch information
Showing
67 changed files
with
1,576 additions
and
1,153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/components/Executions/ExecutionDetails/ExecutionNodeDetails/OutputNodeDetails.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/components/Executions/ExecutionDetails/test/NodeExecutionDetails.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { render, waitFor } from '@testing-library/react'; | ||
import { mockAPIContextValue } from 'components/data/__mocks__/apiContext'; | ||
import { APIContext } from 'components/data/apiContext'; | ||
import { | ||
DetailedNodeExecution, | ||
NodeExecutionDisplayType | ||
} from 'components/Executions/types'; | ||
import { createMockNodeExecutions } from 'models/Execution/__mocks__/mockNodeExecutionsData'; | ||
import { listTaskExecutions } from 'models/Execution/api'; | ||
import * as React from 'react'; | ||
import { NodeExecutionDetails } from '../NodeExecutionDetails'; | ||
|
||
describe('NodeExecutionDetails', () => { | ||
let execution: DetailedNodeExecution; | ||
let mockListTaskExecutions: jest.Mock<ReturnType< | ||
typeof listTaskExecutions | ||
>>; | ||
beforeEach(() => { | ||
const { executions } = createMockNodeExecutions(1); | ||
execution = { | ||
...executions[0], | ||
displayType: NodeExecutionDisplayType.PythonTask, | ||
displayId: 'com.flyte.testTask', | ||
cacheKey: 'abcdefg' | ||
}; | ||
mockListTaskExecutions = jest.fn().mockResolvedValue({ entities: [] }); | ||
}); | ||
|
||
const renderComponent = () => | ||
render( | ||
<APIContext.Provider | ||
value={mockAPIContextValue({ | ||
listTaskExecutions: mockListTaskExecutions | ||
})} | ||
> | ||
<NodeExecutionDetails execution={execution} /> | ||
</APIContext.Provider> | ||
); | ||
|
||
it('renders displayId', async () => { | ||
const { queryByText } = renderComponent(); | ||
await waitFor(() => {}); | ||
expect(queryByText(execution.displayId)).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.