Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Merge requests
!504
WS-677: Multi-stage workflow research & development
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
WS-677: Multi-stage workflow research & development
WS-677-dag-support-for-workflows
into
main
Overview
0
Commits
5
Pipelines
3
Changes
1
Merged
Nathan Hertz
requested to merge
WS-677-dag-support-for-workflows
into
main
3 years ago
Overview
0
Commits
5
Pipelines
3
Changes
1
Expand
Changes
Updated
workflow_service
to handle DAG submission
Added new three-stage DAG-ified
null_dag
workflow and templates
Testing
Unit tests are written and pass
Submitting normal jobs still works
Submitting DAGs works
Completes
WS-677
Edited
3 years ago
by
Nathan Hertz
0
0
Merge request reports
Viewing commit
d3d8539c
Prev
Next
Show latest version
1 file
+
73
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
d3d8539c
Schema revision for new three-stage DAG-ified `null` workflow
· d3d8539c
Nathan Hertz
authored
3 years ago
schema/versions/990c5cd70082_add_dag_ified_null_workflow.py
0 → 100644
+
73
−
0
Options
"""
add DAG-ified null workflow
Revision ID: 990c5cd70082
Revises: 257537f99abc
Create Date: 2021-09-14 15:12:31.154288
"""
from
alembic
import
op
# revision identifiers, used by Alembic.
revision
=
"
990c5cd70082
"
down_revision
=
"
257537f99abc
"
branch_labels
=
None
depends_on
=
None
null_dag_script
=
"""
#!/bin/sh
./null $*
"""
null_dag_job_submit
=
"""
executable = null_dag.sh
arguments = {}
output = null_dag.$(jobname).out
error = null_dag.$(jobname).err
log = null_dag.$(jobname).log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
should_transfer_files = yes
transfer_input_files = $(SBIN_PATH)/null
queue
"""
null_dag_dag_submit
=
"""
JOB GREET null_dag_greeting.condor
VARS GREET jobname=
"
$(JOB)
"
JOB NAP null_dag_nap.condor
VARS NAP jobname=
"
$(JOB)
"
JOB VBOSE_GREET null_dag_verbose_greeting.condor
VARS VBOSE_GREET jobname=
"
$(JOB)
"
PARENT GREET CHILD NAP
PARENT NAP CHILD VBOSE_GREET
"""
def
upgrade
():
op
.
execute
(
"
INSERT INTO workflows (workflow_name) VALUES (
'
null_dag
'
)
"
)
op
.
execute
(
"
INSERT INTO workflow_templates (workflow_name, filename, content)
"
f
"
VALUES (
'
null_dag
'
,
'
null_dag.sh
'
, E
'
{
null_dag_script
}
'
)
"
)
op
.
execute
(
"
INSERT INTO workflow_templates (workflow_name, filename, content)
"
f
"
VALUES (
'
null_dag
'
,
'
null_dag_greeting.condor
'
, E
'
{
null_dag_job_submit
.
format
(
'
--greeting
'
)
}
'
)
"
)
op
.
execute
(
"
INSERT INTO workflow_templates (workflow_name, filename, content)
"
f
"
VALUES (
'
null_dag
'
,
'
null_dag_nap.condor
'
, E
'
{
null_dag_job_submit
.
format
(
'
--verbose --nap
'
)
}
'
)
"
)
op
.
execute
(
"
INSERT INTO workflow_templates (workflow_name, filename, content)
"
f
"
VALUES (
'
null_dag
'
,
'
null_dag_verbose_greeting.condor
'
, E
'
{
null_dag_job_submit
.
format
(
'
--verbose --greeting
'
)
}
'
)
"
)
op
.
execute
(
"
INSERT INTO workflow_templates (workflow_name, filename, content)
"
f
"
VALUES (
'
null_dag
'
,
'
null_dag.dag
'
, E
'
{
null_dag_dag_submit
}
'
)
"
)
def
downgrade
():
op
.
execute
(
"
DELETE FROM workflows WHERE workflow_name =
'
null_dag
'"
)
op
.
execute
(
"
DELETE FROM workflow_templates WHERE workflow_name =
'
null_dag
'"
)
Loading