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

Add version bump for ApproveCondition PR #691

Merged
merged 2 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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