Skip to content

Commit

Permalink
[AN-404] Clearer workflow submission setting messaging (#5244)
Browse files Browse the repository at this point in the history
  • Loading branch information
LizBaldo authored Feb 7, 2025
1 parent 49cc0c5 commit 8c35beb
Showing 1 changed file with 58 additions and 50 deletions.
108 changes: 58 additions & 50 deletions src/pages/workspaces/workspace/workflows/WorkflowView.js
Original file line number Diff line number Diff line change
Expand Up @@ -1100,8 +1100,60 @@ export const WorkflowView = _.flow(
]),
]),
]),
div({ style: { display: 'flex', alignItems: 'baseline', minWidth: 'max-content' } }, [
span({ style: { marginTop: '1.0rem', marginBottom: '0.5rem' } }, [
div([
span([
'Runtime options: ',
h(InfoBox, { style: { marginLeft: '0.1rem', whiteSpace: 'pre-line' } }, [
'Terra will remember these submission settings in this browser.',
]),
]),
]),
isFeaturePreviewEnabled(PREVIEW_COST_CAPPING) &&
div(
{
style: {
display: 'flex',
flexDirection: 'column',
alignSelf: 'flex-start',
marginTop: '0.0rem',
fontSize: 12,
},
},
[
span([
'Set cost limit per workflow (BETA) ',
h(InfoBox, { style: { marginLeft: '0.1rem', whiteSpace: 'pre-line' } }, [
'Important cost limit considerations:',
h('br'),
'1. Costs are in USD.',
h('br'),
'2. Costs are VM and disk costs only. Bucket storage and egress costs are not included.',
h('br'),
'3. Based on GCP list prices. Discounts are not included.',
h('br'),
'4. GPU costs are not included (coming soon!).',
h('br'),
'5. Workflows may not terminate immediately upon hitting limit, plan for a margin of error.',
h('br'),
'6. Workflow costs vary by input. Set a limit that considers variability.',
]),
]),
div({ style: { display: 'flex', alignItems: 'center', marginLeft: '0rem', marginBottom: '0.5rem' } }, [
span({ style: { marginRight: '0.5rem' } }, ['$']),
h(NumberInput, {
id: 'workflow-run-budget',
value: perWorkflowCostCap || '',
min: 0.01,
max: 9999999999.99,
placeholder: 'Example: 1.00',
onChange: (v) => this.setState({ perWorkflowCostCap: v ? v.toFixed(2) : undefined }),
style: { fontSize: 12, marginTop: '0.5rem', width: '100%', marginLeft: '0.1rem' },
}),
]),
]
),
div({ style: { fontSize: 12, display: 'flex', alignItems: 'baseline', minWidth: 'max-content' } }, [
span({ style: { marginTop: '0.5rem', marginBottom: '0.5rem' } }, [
div([
span({ style: { ...styles.checkBoxSpanMargins, marginLeft: 0 } }, [
h(
Expand Down Expand Up @@ -1200,7 +1252,7 @@ export const WorkflowView = _.flow(
isClearable: false,
onlyInteger: false,
value: retryMemoryFactor,
style: { width: '5rem' },
style: { fontSize: 12, width: '5rem' },
onChange: (v) => this.setState({ retryMemoryFactor: v }),
}),
]),
Expand Down Expand Up @@ -1248,7 +1300,7 @@ export const WorkflowView = _.flow(
placeholder: 'Script',
value: monitoringScript,
onChange: (v) => this.setState({ monitoringScript: v }),
style: { marginTop: '0.5rem', width: '90%', marginRight: '0.5rem' },
style: { fontSize: 12, marginTop: '0.5rem', width: '90%', marginRight: '0.5rem' },
}),
h(InfoBox, ['Standalone .sh script that runs inside task container']),
]),
Expand All @@ -1258,7 +1310,7 @@ export const WorkflowView = _.flow(
placeholder: 'Image',
value: monitoringImage,
onChange: (v) => this.setState({ monitoringImage: v }),
style: { marginTop: '0.5rem', width: '90%', marginRight: '0.5rem' },
style: { fontSize: 12, marginTop: '0.5rem', width: '90%', marginRight: '0.5rem' },
}),
h(InfoBox, ['Image that runs as a sibling alongside task container']),
]),
Expand All @@ -1268,57 +1320,13 @@ export const WorkflowView = _.flow(
placeholder: 'Image script',
value: monitoringImageScript,
onChange: (v) => this.setState({ monitoringImageScript: v }),
style: { marginTop: '0.5rem', width: '90%', marginRight: '0.5rem' },
style: { fontSize: 12, marginTop: '0.5rem', width: '90%', marginRight: '0.5rem' },
}),
h(InfoBox, ['Script that runs inside the sibling container']),
]),
]),
]),
]),
isFeaturePreviewEnabled(PREVIEW_COST_CAPPING) &&
div(
{
style: {
display: 'flex',
flexDirection: 'column',
marginLeft: '2rem',
alignSelf: 'flex-start',
marginBottom: '-2rem',
},
},
[
span({ style: { fontWeight: 'bold' } }, [
'Set cost limit per workflow (BETA) ',
h(InfoBox, { style: { marginLeft: '0.1rem', whiteSpace: 'pre-line' } }, [
'Important cost limit considerations:',
h('br'),
'1. Costs are in USD.',
h('br'),
'2. Costs are VM and disk costs only. Bucket storage and egress costs are not included.',
h('br'),
'3. Based on GCP list prices. Discounts are not included.',
h('br'),
'4. GPU costs are not included (coming soon!).',
h('br'),
'5. Workflows may not terminate immediately upon hitting limit, plan for a margin of error.',
h('br'),
'6. Workflow costs vary by input. Set a limit that considers variability.',
]),
]),
div({ style: { display: 'flex', alignItems: 'center', marginLeft: '0rem' } }, [
span({ style: { marginRight: '0.5rem' } }, ['$']),
h(NumberInput, {
id: 'workflow-run-budget',
value: perWorkflowCostCap || '',
min: 0.01,
max: 9999999999.99,
placeholder: 'Example: 1.00',
onChange: (v) => this.setState({ perWorkflowCostCap: v ? v.toFixed(2) : undefined }),
style: { marginTop: '0.5rem', width: '100%', marginLeft: '0.1rem' },
}),
]),
]
),
]),
h(StepButtons, {
tabs: [
Expand Down

0 comments on commit 8c35beb

Please sign in to comment.