Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CloWM Workflow Service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Computational Metagenomics
CloWM
CloWM Workflow Service
Commits
ff7c8e97
Commit
ff7c8e97
authored
1 year ago
by
Daniel Göbel
Browse files
Options
Downloads
Plain Diff
Merge branch 'bugfix/50-escape-workflow-parameters-for-bash' into 'development'
Resolve "Escape workflow parameters for bash" Closes
#50
See merge request
!47
parents
4a2e5230
30984abf
No related branches found
Branches containing commit
No related tags found
2 merge requests
!69
Delete dev branch
,
!47
Resolve "Escape workflow parameters for bash"
Pipeline
#37115
canceled
1 year ago
Stage: test
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/api/endpoints/workflow_version.py
+1
-1
1 addition, 1 deletion
app/api/endpoints/workflow_version.py
app/api/utils.py
+5
-0
5 additions, 0 deletions
app/api/utils.py
mako_templates/nextflow_command.template
+1
-1
1 addition, 1 deletion
mako_templates/nextflow_command.template
with
7 additions
and
2 deletions
app/api/endpoints/workflow_version.py
+
1
−
1
View file @
ff7c8e97
...
...
@@ -289,7 +289,7 @@ async def download_workflow_documentation(
if
document
is
DocumentationEnum
.
PARAMETER_SCHEMA
:
path
=
workflow_mode
.
schema_path
return
StreamingResponse
(
repo
.
download_file_stream
(
path
,
client
))
return
StreamingResponse
(
repo
.
download_file_stream
(
path
,
client
)
,
headers
=
{
"
Cache-Control
"
:
"
max-age=86400
"
}
)
@router.post
(
...
...
This diff is collapsed.
Click to expand it.
app/api/utils.py
+
5
−
0
View file @
ff7c8e97
import
json
import
re
import
shlex
from
io
import
BytesIO
from
tempfile
import
SpooledTemporaryFile
from
typing
import
TYPE_CHECKING
,
Any
,
BinaryIO
,
Dict
,
Optional
,
Sequence
,
Union
...
...
@@ -173,6 +174,10 @@ async def start_workflow_execution(
f
.
write
(
json
.
dumps
(
parameters
).
encode
(
"
utf-8
"
))
f
.
seek
(
0
)
s3
.
Bucket
(
name
=
settings
.
PARAMS_BUCKET
).
Object
(
key
=
params_file_name
).
upload_fileobj
(
f
)
for
key
in
parameters
.
keys
():
if
isinstance
(
parameters
[
key
],
str
):
# Escape string parameters for bash shell
parameters
[
key
]
=
shlex
.
quote
(
parameters
[
key
]).
replace
(
"
$
"
,
"
\$
"
)
# Check if the there is an SCM file for the workflow
scm_file_name
=
None
...
...
This diff is collapsed.
Click to expand it.
mako_templates/nextflow_command.template
+
1
−
1
View file @
ff7c8e97
...
...
@@ -18,5 +18,5 @@ ${nx_bin} run ${repo.repo_url} \
% endif
-revision
${
repo
.git_commit_hash
}
\
%
for
param_name, param_value
in
parameters.items
()
:
--
${
param_name
}
"
${
param_value
}
"
\
--
${
param_name
}
${
param_value
}
\
% endfor
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