Skip to content

Commit

Permalink
Add version bump for ApproveCondition PR (#691)
Browse files Browse the repository at this point in the history
* fix: add version bump

Signed-off-by: James <[email protected]>

* fix: pausedTaskComponent test

Signed-off-by: James <[email protected]>

---------

Signed-off-by: James <[email protected]>
  • Loading branch information
james-union authored Feb 23, 2023
1 parent 860e356 commit 3c5d6e8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/console/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@flyteorg/console",
"version": "0.0.8",
"version": "0.0.9",
"description": "Flyteconsole main app module",
"main": "./dist/index.js",
"module": "./lib/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ async function submit(
{ compiledNode, nodeExecutionId }: TaskResumeContext,
) {
const signalId =
compiledNode?.gateNode?.signal?.signalId || compiledNode?.gateNode?.approve?.signalId;
compiledNode?.gateNode?.signal?.signalId ||
compiledNode?.gateNode?.approve?.signalId;
const isApprovedCondition = !!compiledNode?.gateNode?.approve?.signalId;
if (!signalId) {
throw new Error('SignalId is empty');
Expand All @@ -91,7 +92,9 @@ async function submit(
signalId,
executionId: nodeExecutionId?.executionId,
},
value: isApprovedCondition ? { scalar: { primitive: { boolean: true } } } : literals['signal'],
value: isApprovedCondition
? { scalar: { primitive: { boolean: true } } }
: literals['signal'],
});

return response;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const PausedTasksComponent: React.FC<PausedTasksComponentProps> = ({
pausedNodes,
initialIsVisible = false,
}) => {
const nodeExecutionsById = useContext(NodeExecutionsByIdContext);
const { nodeExecutionsById } = useContext(NodeExecutionsByIdContext);
const { compiledWorkflowClosure } = useNodeExecutionContext();
const [isVisible, setIsVisible] = useState(initialIsVisible);
const [showResumeForm, setShowResumeForm] = useState<boolean>(false);
Expand Down Expand Up @@ -77,6 +77,10 @@ export const PausedTasksComponent: React.FC<PausedTasksComponentProps> = ({
compiledWorkflowClosure?.primary.template.nodes ?? []
).find(node => node.id === selectedNodeId);

const selectedNode = (pausedNodes ?? []).find(
node => node.id === selectedNodeId,
);

const renderPausedTasksBlock = () => (
<div style={popupContainerStyle} data-testid="paused-tasks-table">
<TaskNames
Expand Down Expand Up @@ -106,11 +110,11 @@ export const PausedTasksComponent: React.FC<PausedTasksComponentProps> = ({
</CustomBadge>
</div>
</div>
{compiledNode && selectedNodeId ? (
{compiledNode && selectedNode ? (
<LaunchFormDialog
compiledNode={compiledNode}
initialParameters={undefined}
nodeExecutionId={nodeExecutionsById[selectedNodeId].id}
nodeExecutionId={nodeExecutionsById[selectedNode.scopedId].id}
showLaunchForm={showResumeForm}
setShowLaunchForm={setShowResumeForm}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ describe('flytegraph > ReactFlow > PausedTasksComponent', () => {
compiledWorkflowClosure,
}}
>
<NodeExecutionsByIdContext.Provider value={nodeExecutionsById}>
<NodeExecutionsByIdContext.Provider
value={{ nodeExecutionsById, setCurrentNodeExecutionsById: () => {} }}
>
<PausedTasksComponent {...props} />
</NodeExecutionsByIdContext.Provider>
</NodeExecutionDetailsContext.Provider>,
Expand Down

0 comments on commit 3c5d6e8

Please sign in to comment.