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
42c67f67
Commit
42c67f67
authored
1 year ago
by
Daniel Nemergut
Committed by
Charlotte Hausman
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
(Don't migrate) made new curator workflow, input files are still incomplete
parent
09360686
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!1571
catch 2.8.2.3 up with main
,
!1559
2.8.2.2-DEVELOPMENT into main
,
!1551
Cherry pick partial curation for patch
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
shared/workspaces/alembic/versions/3eae1178cace_add_curator_workflow.py
+104
-0
104 additions, 0 deletions
...ces/alembic/versions/3eae1178cace_add_curator_workflow.py
with
104 additions
and
0 deletions
shared/workspaces/alembic/versions/3eae1178cace_add_curator_workflow.py
0 → 100644
+
104
−
0
View file @
42c67f67
"""
add curator workflow
Revision ID: 3eae1178cace
Revises: 61cbcd1d83f7
Create Date: 2023-10-12 11:25:34.165586
"""
from
alembic
import
op
import
sqlalchemy
as
sa
# revision identifiers, used by Alembic.
revision
=
'
3eae1178cace
'
down_revision
=
'
61cbcd1d83f7
'
branch_labels
=
None
depends_on
=
None
wf_name
=
"
curator
"
# TODO: What input files?
curator_condor
=
"""
executable = curator.sh
arguments = metadata.json {{curator_type}}
output = curator.out
error = curator.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
SPOOL_DIR = {{spool_dir}}
should_transfer_files = yes
transfer_input_files = $ENV(HOME)/.ssh/condor_transfer, nraorsync://$(SBIN_PATH)/pycapo, nraorsync://$(SBIN_PATH)/ingest_envoy, nraorsync://$(SBIN_PATH)/ingest, nraorsync://$(SBIN_PATH)/observation-product-collector.sh, ./metadata.json
+WantIOProxy = True
request_memory = {{ramInGb}}
getenv = True
environment =
"
CAPO_PATH=/home/casa/capo
"
requirements = HasLustre == True
queue
"""
curator_sh
=
"""
#!/bin/sh
set -o errexit
./ingest_envoy curate --$2 $1
"""
metadata_json
=
"""
{
"
product_locator
"
:
"
{{product_locator}}
"
,
"
data_location
"
:
"
{{data_location}}
"
,
"
product_type
"
:
"
{{product_type}}
"
,
"
target_list
"
: [
"
{{target_list}}
"
],
"
projectMetadata
"
: {
"
telescope
"
:
"
{{telescope}}
"
,
"
projectCode
"
:
"
{{project_code}}
"
}
}
"""
def
upgrade
():
op
.
execute
(
f
"""
INSERT INTO workflows (workflow_name, requires_lustre) VALUES (E
'
{
wf_name
}
'
, true)
"""
)
op
.
execute
(
f
"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES (
'
curator.condor
'
, E
'
{
curator_condor
}
'
, E
'
{
wf_name
}
'
)
"""
)
op
.
execute
(
f
"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES (
'
curator.sh
'
, E
'
{
curator_sh
}
'
, E
'
{
wf_name
}
'
)
"""
)
op
.
execute
(
f
"""
INSERT INTO workflow_templates (filename, content, workflow_name)
VALUES (
'
metadata.json
'
, E
'
{
metadata_json
}
'
, E
'
{
wf_name
}
'
)
"""
)
def
downgrade
():
op
.
execute
(
f
"""
DELETE FROM workflow_templates WHERE workflow_name = E
'
{
wf_name
}
'
"""
)
op
.
execute
(
f
"""
DELETE FROM workflows WHERE workflow_name = E
'
{
wf_name
}
'
"""
)
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