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
a40f6c38
Commit
a40f6c38
authored
10 months ago
by
Sam Kagan
Browse files
Options
Downloads
Patches
Plain Diff
Allowed PPR_FILENAME to be unset, removed unnecessary checks
parent
f3839aa5
No related branches found
No related tags found
2 merge requests
!1706
merge 2.8.4 to main
,
!1657
Got EVLA CMS restores working via casa_envoy, using casa_restorepipescript.py when it exists
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/cli/executables/pexable/casa_envoy/casa_envoy/configure.py
+16
-19
16 additions, 19 deletions
...li/executables/pexable/casa_envoy/casa_envoy/configure.py
with
16 additions
and
19 deletions
apps/cli/executables/pexable/casa_envoy/casa_envoy/configure.py
+
16
−
19
View file @
a40f6c38
...
...
@@ -36,14 +36,19 @@ class CasaConfigure:
"""
Set required environment variables
No need to audit them afterwards for None
'
s since the keys and values in `os.environ` must all be strings.
Source: https://docs.python.org/3.10/library/os.html#os.environ
:return:
"""
os
.
environ
[
"
SCIPIPE_ROOTDIR
"
]
=
self
.
parameters
[
"
rootDirectory
"
]
# If user specified CASA Version, use it.
if
"
casaHome
"
in
self
.
metadata_content
:
os
.
environ
[
"
CASA_HOME
"
]
=
self
.
metadata_content
.
get
(
"
casaHome
"
)
elif
"
main
"
in
self
.
metadata_content
and
"
CASA_HOME
"
in
self
.
metadata_content
[
"
main
"
]:
if
self
.
metadata_content
.
get
(
"
casaHome
"
)
is
not
None
:
os
.
environ
[
"
CASA_HOME
"
]
=
self
.
metadata_content
[
"
casaHome
"
]
elif
(
self
.
metadata_content
.
get
(
"
main
"
)
is
not
None
and
self
.
metadata_content
[
"
main
"
].
get
(
"
CASA_HOME
"
)
is
not
None
):
# Catch case of VLASS nesting
os
.
environ
[
"
CASA_HOME
"
]
=
self
.
metadata_content
[
"
main
"
][
"
CASA_HOME
"
]
else
:
...
...
@@ -54,31 +59,23 @@ class CasaConfigure:
os
.
environ
[
"
CASA_HOME
"
]
=
self
.
parameters
[
"
homeForReprocessing
"
]
os
.
environ
[
"
LANG
"
]
=
"
en_US.UTF-8
"
os
.
environ
[
"
PPR_FILENAME
"
]
=
self
.
parameters
[
"
ppr
"
]
# Restores oftentimes use a piperestorescript instead of a PPR.xml
# AuditFiles would catch an erroneously absent PPR
if
self
.
parameters
.
get
(
"
ppr
"
)
is
not
None
:
os
.
environ
[
"
PPR_FILENAME
"
]
=
self
.
parameters
[
"
ppr
"
]
self
.
check
_processing_env
()
self
.
log
_processing_env
()
def
check
_processing_env
(
self
):
def
log
_processing_env
(
self
):
"""
Varify processing environment is ready for
CASA
Log out environment variables relevant to
CASA
:return:
"""
self
.
logger
.
info
(
"
Checking processing environment:
"
)
env_list
=
[
"
SCIPIPE_ROOTDIR
"
,
"
CASA_HOME
"
,
"
PPR_FILENAME
"
,
"
LANG
"
]
result_list
=
[]
for
var
in
env_list
:
env
=
os
.
environ
.
get
(
var
)
result_list
.
append
(
env
)
self
.
logger
.
info
(
f
"
{
var
}
:
{
env
}
"
)
if
"
None
"
in
result_list
:
self
.
logger
.
error
(
"
Environment setup Failed!
"
)
sys
.
exit
(
1
)
else
:
self
.
logger
.
info
(
"
Environment ready for processing
"
)
self
.
logger
.
info
(
f
"
{
var
}
:
{
os
.
environ
.
get
(
var
)
}
"
)
class
StandardRunner
(
RunnerABC
):
...
...
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