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
!489
fix WS carta launch
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix WS carta launch
carta_testing
into
main
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Charlotte Hausman
requested to merge
carta_testing
into
main
3 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
99bcc20f
1 commit,
3 years ago
1 file
+
7
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
shared/workspaces/workspaces/workflow/services/workflow_info.py
+
7
−
7
Options
@@ -49,9 +49,7 @@ class WorkflowInfo(WorkflowInfoIF):
"""
return
self
.
session
.
query
(
WorkflowRequest
).
all
()
def
create_workflow_request
(
self
,
workflow
:
Union
[
str
,
WorkflowIF
],
argument
:
Dict
)
->
WorkflowRequest
:
def
create_workflow_request
(
self
,
workflow
:
Union
[
str
,
WorkflowIF
],
argument
:
Dict
)
->
WorkflowRequest
:
"""
Create new workflow request and save to database
@@ -66,7 +64,11 @@ class WorkflowInfo(WorkflowInfoIF):
if
any
(
item
in
workflow_name
for
item
in
[
"
null
"
,
"
download
"
,
"
carta
"
,
"
seci
"
]):
argument
[
"
need_project_metadata
"
]
=
False
if
workflow_name
==
"
carta
"
and
len
(
argument
[
"
product_locator
"
].
split
(
"
,
"
))
==
1
:
if
(
workflow_name
==
"
carta
"
and
argument
[
"
need_data
"
]
is
True
and
len
(
argument
[
"
product_locator
"
].
split
(
"
,
"
))
==
1
):
argument
[
"
single_image
"
]
=
True
argument
[
"
need_project_metadata
"
]
=
True
if
workflow_name
==
"
carta
"
and
"
parent_wf_request_id
"
in
argument
:
@@ -95,9 +97,7 @@ class WorkflowInfo(WorkflowInfoIF):
self
.
session
.
add
(
request
)
self
.
session
.
flush
()
def
save_file
(
self
,
request
:
WorkflowRequest
,
filename
:
str
,
content
:
bytes
)
->
WorkflowRequestFile
:
def
save_file
(
self
,
request
:
WorkflowRequest
,
filename
:
str
,
content
:
bytes
)
->
WorkflowRequestFile
:
"""
Save a given file for the specified request to the database
Loading