Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23.1] Fix tag ownership check #16877

Merged
merged 2 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/galaxy/tools/actions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@ def _new_job_for_session(self, trans, tool, history):
job.session_id = model.cached_id(galaxy_session)
if trans.user is not None:
job.user_id = model.cached_id(trans.user)
job.user = trans.user
if history:
job.history_id = model.cached_id(history)
job.tool_id = tool.id
Expand Down
38 changes: 38 additions & 0 deletions lib/galaxy_test/api/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -5876,6 +5876,44 @@ def test_run_remove_tag_on_collection_output(self):
), details_collection_without_tag
assert len(details_collection_without_tag["tags"]) == 0, details_collection_without_tag

@skip_without_tool("collection_creates_pair")
@skip_without_tool("cat")
def test_run_add_tag_on_database_operation_output(self):
with self.dataset_populator.test_history() as history_id:
self._run_jobs(
"""
class: GalaxyWorkflow
inputs:
input1: data_collection
steps:
extrat:
tool_id: __EXTRACT_DATASET__
in:
input: input1
outputs:
output:
add_tags:
- "name:foo"
""",
test_data="""
input1:
collection_type: list
name: the_dataset_list
elements:
- identifier: el1
value: 1.fastq
type: File
""",
history_id=history_id,
round_trip_format_conversion=True,
)
details_dataset_with_tag = self.dataset_populator.get_history_dataset_details(
history_id, hid=3, wait=True, assert_ok=True
)

assert details_dataset_with_tag["history_content_type"] == "dataset", details_dataset_with_tag
assert details_dataset_with_tag["tags"][0] == "name:foo", details_dataset_with_tag

@skip_without_tool("cat1")
def test_run_with_runtime_pja(self):
workflow = self.workflow_populator.load_workflow(name="test_for_pja_runtime")
Expand Down
Loading