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

fix: add paused state #595

Merged
merged 101 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
286e1f8
chore: move src to a new location
anrusina Apr 24, 2022
0efd1df
ci: allow branch to be built again
anrusina Apr 24, 2022
b49fed5
chore: replace link to github repository to a proper one
anrusina Apr 25, 2022
9503a4c
ci: basic test and test-coverage setup
anrusina Apr 25, 2022
3091c4b
chore: add first plugin package
anrusina Apr 25, 2022
3573659
chore: allow to start test from main directory
anrusina Apr 25, 2022
8d1fef9
ci: update lowest mkdirp version (#423)
anrusina Apr 25, 2022
48a1c92
chore: add build scripts for console app (#429)
ursucarina Apr 26, 2022
caaf5c2
fix: hide the legend (#435)
eugenejahn Apr 28, 2022
133038a
ci: move storybook related packages to top level (#434)
anrusina Apr 28, 2022
1651a6f
fix: fix issue 386 (#437)
eugenejahn Apr 28, 2022
eeb551b
ci: ensure unified tsconfig and remove mocks, test, stories from buil…
anrusina Apr 28, 2022
b6e9941
Make whole row clickable to open TaskExecutionDetails panel (#444)
eugenejahn May 2, 2022
b513280
ci: allow to start jest config for all project at once (#447)
anrusina May 3, 2022
ecfdd4c
minor: unable to view all the workflow versions (#446)
ursucarina May 4, 2022
5b44539
chore(tsc): exclude test/stories/mock files only from build (#451)
anrusina May 5, 2022
560b645
ci: ensure that webpack too doesn't include test/mock/specs files (#452)
anrusina May 6, 2022
5e2bcbc
minor: add support for StructuredDataSet Input/Output type (#445)
ursucarina May 6, 2022
86d5636
chore: Provide basic repo structure and ensure that stories, tests, v…
anrusina May 11, 2022
acf3cb9
ci: minimize babel presence (#457)
anrusina May 11, 2022
38a4e96
fix: update node executions to display map tasks (#455)
olga-union May 13, 2022
c2ee154
ci: resolve docker build issues (#462)
anrusina May 13, 2022
e84a3c0
Chore: Rebase devmain on top of master (#464)
anrusina May 13, 2022
0853680
fix: ensure that admin version is fully shown (#465)
anrusina May 14, 2022
093210b
chore: fix for console not respecting admin url (#468)
ursucarina May 17, 2022
1859cf5
chore: rebase on top of master
anrusina May 17, 2022
42d2632
fix: trigger release #patch (#477)
anrusina May 18, 2022
324b4f5
feat: add task version info (#485)
apTalya May 19, 2022
821299e
chore: update Readme with python note + package version update (#486)
apTalya May 19, 2022
c25daea
hotfix ci pipeline (#487)
yindia May 20, 2022
747b100
[Mapping][TaskInfo] V.2 - Update Task details to allow check informat…
olga-union May 18, 2022
b70d14b
fix: add eventVersion check for map tasks (#484)
olga-union May 19, 2022
7f6305f
fix: resolve minimist package to v1.2.6 (#492)
anrusina May 19, 2022
144349c
ci: add flyte-api plugin package (#490)
anrusina May 19, 2022
64b2793
fix: update/add graph related stories (#493)
olga-union May 23, 2022
7ea0c9f
fix: separate api auth to plugin folder (#495)
anrusina May 25, 2022
4a23f4e
feat: rerun task action in execution page (#488)
eugenejahn May 26, 2022
aaca9db
chore: update release version (#501)
anrusina Jun 2, 2022
d407301
chore(deps-dev): bump protobufjs from 6.8.9 to 6.11.3 (#502)
dependabot[bot] Jun 3, 2022
606e37e
chore: add package generator for basics/composites/plugins (#503)
anrusina Jun 6, 2022
1a0dc0f
fix(bug-508): executions can not be filtered by start time (#509)
anrusina Jun 9, 2022
1013deb
chore(deps-dev): bump semantic-release from 17.2.3 to 19.0.3 (#510)
dependabot[bot] Jun 10, 2022
32686cc
feat: support flyte decks (#504)
james-union Jun 13, 2022
1386b40
feat: navbar navigation dropdown (#511)
anrusina Jun 16, 2022
7606fdf
chore: support internal/external navigsation better (#513)
anrusina Jun 17, 2022
075a1f9
Update Contributing.md (#515)
anrusina Jun 23, 2022
161d7ee
chore: update navigationDropdown usage (#517)
anrusina Jun 23, 2022
32b92b4
chore(deps): bump jsdom from 16.4.0 to 16.7.0 (#516)
dependabot[bot] Jun 23, 2022
c1c386c
feat: launch plans list & detail page #none; (#507)
james-union Jun 27, 2022
54c8ca1
chore: release 1.1.3 (#520)
anrusina Jun 27, 2022
e933f21
fix: cache icon fro map task (#519)
eugenejahn Jun 28, 2022
1be5572
fix: Relaunch form does not persist security context values when chan…
james-union Jun 29, 2022
4006e3b
fix: release process (#529)
yindia Jun 30, 2022
a05e295
fix: fix semantic-release config (#532)
yindia Jul 1, 2022
daf28e6
test: fix time sensitive test (#533)
anrusina Jul 1, 2022
d191445
Rename upgrade idl workflow (#534)
yindia Jul 1, 2022
506b953
fix: support mapped tasks (#494)
james-union Jul 1, 2022
59d5d2a
fix(491): remove favicon package + use favicon.svg by default (#537)
anrusina Jul 1, 2022
7e44dca
Fixed undefined task input types access in NodeExecutionActions (#538)
Jul 6, 2022
f6f8283
feat: support union type for launch plan (#540)
eugenejahn Jul 13, 2022
64440c0
fix: graph has realtime updates as execution progresses (#543)
olga-union Jul 15, 2022
168d383
fix: make sure groups used in graph aren't undefined (#545)
olga-union Jul 19, 2022
7d196cd
Hotfix docker push GHWF (#547)
yindia Jul 20, 2022
e62b43b
fix: Graph Center on initial render (#541)
james-union Jul 20, 2022
28a224e
fix: graph edge overlaps nodes (#542)
james-union Jul 20, 2022
33b1cee
fix: flyteconsole tag in ci pipeline (#550)
yindia Jul 25, 2022
16d70a9
enable docker push for console (#552)
yindia Jul 26, 2022
bcdd464
chore(deps): bump terser from 4.8.0 to 4.8.1 (#548)
dependabot[bot] Jul 26, 2022
3f2bbfb
Update Flyteidl version (#558)
flyte-bot Aug 10, 2022
1f89e2b
fix: fix searchbar X button (#564)
ursucarina Aug 16, 2022
9b10e5f
fix: update timeline view to show dynamic wf internals on first rende…
olga-union Aug 17, 2022
a4bf213
fix: webmanifest missing crossorigin attribute (#566)
ursucarina Aug 17, 2022
cdd94b7
fix: console showing subworkflows as unknown (#570)
olga-union Aug 19, 2022
b6e1e40
fix: Dict value loses 1 trailing character on UI Launch. (#561)
james-union Aug 22, 2022
9c2632a
fix: launchform validation (#557)
james-union Aug 25, 2022
a3bbeb0
fix: integrate timeline and graph tabs wrappers under one component (…
olga-union Aug 31, 2022
e453bfe
chore(deps-dev): bump moment from 2.29.3 to 2.29.4 (#549)
dependabot[bot] Aug 31, 2022
dc1c73f
added none type in union type (#577)
eugenejahn Sep 6, 2022
7e3c6db
fix: correctly coerce `defaultValue` when rendering LaunchPlan detail…
rahul-theorem Sep 6, 2022
f027c43
#minor: inputHelpers InputProps (#579)
ursucarina Sep 7, 2022
afd85bf
fix: fix test of launchform (#581)
james-union Sep 7, 2022
250ab96
Pruning some unused packages (#583)
jsonporter Sep 8, 2022
ce59d55
feat: minor change (#584)
jsonporter Sep 9, 2022
786bced
fix: floor seconds to int in the edge case moment returns it as float…
olga-union Sep 9, 2022
9a1ae4c
Update Flyteidl version (#575)
flyte-bot Sep 12, 2022
a5cad5d
fix: add BASE_URL to dev startup, open deeply nested urls (#589)
ursucarina Sep 13, 2022
6fa1cc1
fix: add default disabled state for only mine filter (#585)
olga-union Sep 14, 2022
64e55be
Update Flyteidl version (#590)
flyte-bot Sep 15, 2022
b9eed42
Launch plan ref v2 (#601)
jsonporter Sep 29, 2022
c211f94
fix: add paused state
olga-union Sep 19, 2022
3d97b66
fix: add paused tasks button on a graph, move checks to utils
olga-union Sep 29, 2022
4fad131
fix: add gate nodes to graph, update paused table, custom nodes clean-up
olga-union Sep 26, 2022
8dc8064
fix: final touch-ups
olga-union Sep 27, 2022
18a09ec
fix: add return types to helpers
olga-union Sep 28, 2022
ae30dcc
fix: update state and resume in details tab, add some tests
olga-union Sep 29, 2022
544ec69
fix: add more tests
olga-union Sep 30, 2022
94822b1
Merge branch 'devmain' of https://github.com/flyteorg/flyteconsole in…
olga-union Oct 3, 2022
0e5d195
fix: post-merge build fixes
olga-union Oct 3, 2022
ad1b68b
fix: add more unit tests
olga-union Oct 3, 2022
3e9728d
fix: add ticket number to launch form todos
olga-union Oct 3, 2022
f255d10
fix: workflow graph test
olga-union Oct 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions packages/zapp/console/src/components/Executions/CacheStatus.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
import { SvgIconProps, Tooltip, Typography } from '@material-ui/core';
import { makeStyles, Theme } from '@material-ui/core/styles';
import CachedOutlined from '@material-ui/icons/CachedOutlined';
import ErrorOutlined from '@material-ui/icons/ErrorOutlined';
import InfoOutlined from '@material-ui/icons/InfoOutlined';
import classnames from 'classnames';
import { assertNever } from 'common/utils';
import { PublishedWithChangesOutlined } from 'components/common/PublishedWithChanges';
import { useCommonStyles } from 'components/common/styles';
import { CatalogCacheStatus } from 'models/Execution/enums';
import { TaskExecutionIdentifier } from 'models/Execution/types';
import { MapCacheIcon } from '@flyteconsole/ui-atoms';
import * as React from 'react';
import { Link as RouterLink } from 'react-router-dom';
import { Routes } from 'routes/routes';
import {
cacheStatusMessages,
unknownCacheStatusString,
viewSourceExecutionString,
} from './constants';

const useStyles = makeStyles((theme: Theme) => ({
cacheStatus: {
alignItems: 'center',
display: 'flex',
marginTop: theme.spacing(1),
},
sourceExecutionLink: {
fontWeight: 'normal',
},
}));

/** Renders the appropriate icon for a given CatalogCacheStatus */
const NodeExecutionCacheStatusIcon: React.FC<
SvgIconProps & {
status: CatalogCacheStatus;
}
> = React.forwardRef(({ status, ...props }, ref) => {
switch (status) {
case CatalogCacheStatus.CACHE_DISABLED:
case CatalogCacheStatus.CACHE_MISS: {
return <InfoOutlined {...props} ref={ref} data-testid="cache-icon" />;
}
case CatalogCacheStatus.CACHE_HIT: {
return <CachedOutlined {...props} ref={ref} data-testid="cache-icon" />;
}
case CatalogCacheStatus.CACHE_POPULATED: {
return <PublishedWithChangesOutlined {...props} ref={ref} data-testid="cache-icon" />;
}
case CatalogCacheStatus.CACHE_LOOKUP_FAILURE:
case CatalogCacheStatus.CACHE_PUT_FAILURE: {
return <ErrorOutlined {...props} ref={ref} data-testid="cache-icon" />;
}
case CatalogCacheStatus.MAP_CACHE: {
return <MapCacheIcon {...props} ref={ref} data-testid="cache-icon" />;
}
default: {
assertNever(status);
return null;
}
}
});

export interface CacheStatusProps {
cacheStatus: CatalogCacheStatus | null | undefined;
/** `normal` will render an icon with description message beside it
* `iconOnly` will render just the icon with the description as a tooltip
*/
variant?: 'normal' | 'iconOnly';
sourceTaskExecutionId?: TaskExecutionIdentifier;
iconStyles?: React.CSSProperties;
}

export const CacheStatus: React.FC<CacheStatusProps> = ({
cacheStatus,
sourceTaskExecutionId,
variant = 'normal',
iconStyles,
}) => {
const commonStyles = useCommonStyles();
const styles = useStyles();

if (cacheStatus == null) {
return null;
}

const message = cacheStatusMessages[cacheStatus] || unknownCacheStatusString;

return variant === 'iconOnly' ? (
<Tooltip title={message}>
<NodeExecutionCacheStatusIcon
className={classnames(commonStyles.iconRight, commonStyles.iconSecondary)}
style={iconStyles}
status={cacheStatus}
/>
</Tooltip>
) : (
<>
<Typography className={styles.cacheStatus} variant="subtitle1" color="textSecondary">
<NodeExecutionCacheStatusIcon
status={cacheStatus}
className={classnames(commonStyles.iconSecondary, commonStyles.iconLeft)}
/>
{message}
</Typography>
{sourceTaskExecutionId && (
<RouterLink
className={classnames(commonStyles.primaryLink, styles.sourceExecutionLink)}
to={Routes.ExecutionDetails.makeUrl(sourceTaskExecutionId.nodeExecutionId.executionId)}
>
{viewSourceExecutionString}
</RouterLink>
)}
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { literalsToLiteralValueMap } from 'components/Launch/LaunchForm/utils';
import { TaskInitialLaunchParameters } from 'components/Launch/LaunchForm/types';
import { NodeExecutionPhase } from 'models/Execution/enums';
import Close from '@material-ui/icons/Close';
import { useEffect, useState } from 'react';
import { NodeExecutionDetails } from '../types';
import t from './strings';
import { ExecutionNodeDeck } from './ExecutionNodeDeck';
Expand Down Expand Up @@ -57,26 +58,28 @@ const useStyles = makeStyles((theme: Theme) => {
});

interface ExecutionDetailsActionsProps {
details: NodeExecutionDetails;
details?: NodeExecutionDetails;
nodeExecutionId: NodeExecutionIdentifier;
phase?: NodeExecutionPhase;
phase: NodeExecutionPhase;
}

export const ExecutionDetailsActions = (props: ExecutionDetailsActionsProps): JSX.Element => {
const { details, nodeExecutionId, phase } = props;
export const ExecutionDetailsActions = ({
details,
nodeExecutionId,
phase,
}: ExecutionDetailsActionsProps): JSX.Element => {
const styles = useStyles();

const [showLaunchForm, setShowLaunchForm] = React.useState<boolean>(false);

const [initialParameters, setInitialParameters] = React.useState<
const [showLaunchForm, setShowLaunchForm] = useState<boolean>(false);
const [initialParameters, setInitialParameters] = useState<
TaskInitialLaunchParameters | undefined
>(undefined);

const executionData = useNodeExecutionData(nodeExecutionId);
const execution = useNodeExecution(nodeExecutionId);
const id = details.taskTemplate?.id;
const id = details?.taskTemplate?.id;

React.useEffect(() => {
useEffect(() => {
if (!id) {
return;
}
Expand All @@ -99,15 +102,15 @@ export const ExecutionDetailsActions = (props: ExecutionDetailsActionsProps): JS
const [showDeck, setShowDeck] = React.useState(false);
const onCloseDeck = () => setShowDeck(false);

if (!id || !initialParameters) {
return <></>;
}

const rerunOnClick = (e: React.MouseEvent<HTMLElement>) => {
e.stopPropagation();
setShowLaunchForm(true);
};

const resumeAction = () => {
// TODO https://github.com/flyteorg/flyteconsole/issues/587 Launch form for node id
};

return (
<>
<div className={styles.actionsContainer}>
Expand All @@ -121,17 +124,26 @@ export const ExecutionDetailsActions = (props: ExecutionDetailsActionsProps): JS
{t('flyteDeck')}
</Button>
)}
<Button variant="outlined" color="primary" onClick={rerunOnClick}>
{t('rerun')}
</Button>
{id && initialParameters && details && (
<Button variant="outlined" color="primary" onClick={rerunOnClick}>
{t('rerun')}
</Button>
)}
{phase === NodeExecutionPhase.PAUSED && (
<Button variant="outlined" color="primary" onClick={resumeAction}>
{t('resume')}
</Button>
)}
</div>
<LaunchFormDialog
id={id as ResourceIdentifier}
initialParameters={initialParameters}
showLaunchForm={showLaunchForm}
setShowLaunchForm={setShowLaunchForm}
/>
{execution?.value?.closure?.deckUri ? (
{id && initialParameters && (
<LaunchFormDialog
id={id as ResourceIdentifier}
initialParameters={initialParameters}
showLaunchForm={showLaunchForm}
setShowLaunchForm={setShowLaunchForm}
/>
)}
{execution?.value?.closure?.deckUri && (
<Dialog PaperProps={{ className: styles.dialog }} maxWidth={false} open={showDeck}>
<div className={styles.dialogTitle}>
<h2 className={styles.deckTitle}>{t('flyteDeck')}</h2>
Expand All @@ -141,7 +153,7 @@ export const ExecutionDetailsActions = (props: ExecutionDetailsActionsProps): JS
</div>
<ExecutionNodeDeck deckUri={execution.value.closure.deckUri} />
</Dialog>
) : null}
)}
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ export const ExecutionTabContent: React.FC<ExecutionTabContentProps> = ({
return (
<div className={styles.wrapper}>
<div className={styles.container}>
<NodeExecutionsTimelineContext.Provider value={timelineContext}>
<ExecutionTimeline chartTimezone={chartTimezone} initialNodes={initialNodes} />
</NodeExecutionsTimelineContext.Provider>
<ExecutionTimeline chartTimezone={chartTimezone} initialNodes={initialNodes} />
</div>
<ExecutionTimelineFooter onTimezoneChange={handleTimezoneChange} />
</div>
Expand All @@ -159,6 +157,7 @@ export const ExecutionTabContent: React.FC<ExecutionTabContentProps> = ({
mergedDag={mergedDag}
error={error}
dynamicWorkflows={dynamicWorkflows}
initialNodes={initialNodes}
onNodeSelectionChanged={onNodeSelectionChanged}
selectedPhase={selectedPhase}
onPhaseSelectionChanged={setSelectedPhase}
Expand All @@ -181,13 +180,15 @@ export const ExecutionTabContent: React.FC<ExecutionTabContentProps> = ({

return (
<>
{renderContent()}
<NodeExecutionsTimelineContext.Provider value={timelineContext}>
{renderContent()}
</NodeExecutionsTimelineContext.Provider>
{/* Side panel, shows information for specific node */}
<DetailsPanel open={!isDetailsTabClosed} onClose={onCloseDetailsPanel}>
{!isDetailsTabClosed && selectedExecution && (
<NodeExecutionDetailsPanelContent
onClose={onCloseDetailsPanel}
phase={selectedPhase}
taskPhase={selectedPhase ?? TaskExecutionPhase.UNDEFINED}
nodeExecutionId={selectedExecution}
/>
)}
Expand Down
Loading