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
!398
tweaking settings and ingestion script
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
tweaking settings and ingestion script
misc
into
main
Overview
5
Commits
3
Pipelines
3
Changes
4
All threads resolved!
Hide all comments
Merged
Charlotte Hausman
requested to merge
misc
into
main
3 years ago
Overview
5
Commits
3
Pipelines
3
Changes
3
All threads resolved!
Hide all comments
Expand
0
0
Merge request reports
Compare
version 1
version 2
a703d308
3 years ago
version 1
80f09420
3 years ago
main (base)
and
latest version
latest version
93c04a51
3 commits,
3 years ago
version 2
a703d308
2 commits,
3 years ago
version 1
80f09420
1 commit,
3 years ago
Show latest version
3 files
+
4
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
schema/versions/d6d6c2ffaa66_add_memory_to_ingestion_workflows.py
0 → 100644
+
122
−
0
Options
"""
add memory to ingestion workflows
Revision ID: d6d6c2ffaa66
Revises: d295036a7c72
Create Date: 2021-08-04 14:16:40.092084
"""
from
alembic
import
op
import
sqlalchemy
as
sa
# revision identifiers, used by Alembic.
revision
=
"
d6d6c2ffaa66
"
down_revision
=
"
d295036a7c72
"
branch_labels
=
None
depends_on
=
None
cal_content
=
"""
executable = ingest_cal.sh
arguments = metadata.json
output = ingest.out
error = ingest.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
should_transfer_files = yes
transfer_input_files = $(SBIN_PATH)/pycapo, $(SBIN_PATH)/conveyor, $(SBIN_PATH)/ingest_envoy, $(SBIN_PATH)/ingest, $(SBIN_PATH)/calibration-table-collector.sh, ./metadata.json
request_memory = {{ramInGb}}
getenv = True
environment =
"
CAPO_PATH=/home/casa/capo CFLAGS=-I/usr/include/mysql LDFLAGS=-L/usr/lib64/mysql ORACLE_HOME=/home/ssa/share/oracle/instantclient_12_1 LD_LIBRARY_PATH=/home/ssa/share/oracle/instantclient_12_1 PATH=/bin:/usr/bin:$(PATH)/home/ssa/share/oracle/instantclient_12_1
"
queue
"""
img_content
=
"""
executable = ingest_image.sh
arguments = metadata.json
output = ingest.out
error = ingest.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
should_transfer_files = yes
transfer_input_files = $(SBIN_PATH)/pycapo, $(SBIN_PATH)/conveyor, $(SBIN_PATH)/ingest_envoy, $(SBIN_PATH)/ingest, $(SBIN_PATH)/image-product-collector.sh, ./metadata.json, ./aux_image_metadata.json
request_memory = {{ramInGb}}
getenv = True
environment =
"
CAPO_PATH=/home/casa/capo
"
queue
"""
old_cal
=
"""
executable = ingest_cal.sh
arguments = metadata.json
output = ingest.out
error = ingest.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
should_transfer_files = yes
transfer_input_files = $(SBIN_PATH)/pycapo, $(SBIN_PATH)/conveyor, $(SBIN_PATH)/ingest_envoy, $(SBIN_PATH)/ingest, $(SBIN_PATH)/calibration-table-collector.sh, ./metadata.json
request_memory = 1G
getenv = True
environment =
"
CAPO_PATH=/home/casa/capo CFLAGS=-I/usr/include/mysql LDFLAGS=-L/usr/lib64/mysql ORACLE_HOME=/home/ssa/share/oracle/instantclient_12_1 LD_LIBRARY_PATH=/home/ssa/share/oracle/instantclient_12_1 PATH=/bin:/usr/bin:$(PATH)/home/ssa/share/oracle/instantclient_12_1
"
queue
"""
old_img
=
"""
executable = ingest_image.sh
arguments = metadata.json
output = ingest.out
error = ingest.err
log = condor.log
SBIN_PATH = /lustre/aoc/cluster/pipeline/$ENV(CAPO_PROFILE)/workspaces/sbin
should_transfer_files = yes
transfer_input_files = $(SBIN_PATH)/pycapo, $(SBIN_PATH)/conveyor, $(SBIN_PATH)/ingest_envoy, $(SBIN_PATH)/ingest, $(SBIN_PATH)/image-product-collector.sh, ./metadata.json, ./aux_image_metadata.json
getenv = True
environment =
"
CAPO_PATH=/home/casa/capo
"
queue
"""
def
upgrade
():
op
.
execute
(
f
"""
UPDATE workflow_templates
SET content=E
'
{
cal_content
}
'
WHERE filename=
'
ingest_cal.condor
'
"""
)
op
.
execute
(
f
"""
UPDATE workflow_templates
SET content=E
'
{
img_content
}
'
WHERE filename=
'
ingest_image.condor
'
"""
)
def
downgrade
():
op
.
execute
(
f
"""
UPDATE workflow_templates
SET content=E
'
{
old_cal
}
'
WHERE filename=
'
ingest_cal.condor
'
"""
)
op
.
execute
(
f
"""
UPDATE workflow_templates
SET content=E
'
{
old_img
}
'
WHERE filename=
'
ingest_image.condor
'
"""
)
Loading