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
Commits
b10f3545
Commit
b10f3545
authored
3 years ago
by
Nathan Hertz
Browse files
Options
Downloads
Patches
Plain Diff
Schema revision for new three-stage DAG-ified `null` workflow
parent
408467ea
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
schema/versions/990c5cd70082_add_dag_ified_null_workflow.py
+73
-0
73 additions, 0 deletions
schema/versions/990c5cd70082_add_dag_ified_null_workflow.py
with
73 additions
and
0 deletions
schema/versions/990c5cd70082_add_dag_ified_null_workflow.py
0 → 100644
+
73
−
0
View file @
b10f3545
"""
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
'"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment