mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge remote-tracking branch 'upstream/release_23.0' into dev
This commit is contained in:
@@ -3,6 +3,15 @@ import { shallowMount } from "@vue/test-utils";
|
||||
import { getLocalVue } from "tests/jest/helpers";
|
||||
import Vuex from "vuex";
|
||||
import invocationData from "../Workflow/test/json/invocation.json";
|
||||
import { useConfig } from "composables/config";
|
||||
|
||||
jest.mock("composables/config");
|
||||
useConfig.mockReturnValue({
|
||||
config: {
|
||||
enable_celery_tasks: true,
|
||||
},
|
||||
isLoaded: true,
|
||||
});
|
||||
|
||||
const invocationJobsSummaryById = {
|
||||
id: "d9833097445452b0",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<!-- <b-tab title="Workflow Overview">
|
||||
<p>TODO: Insert readonly version of workflow editor here</p>
|
||||
</b-tab> -->
|
||||
<b-tab title="Export">
|
||||
<b-tab v-if="canExecuteTasks" title="Export">
|
||||
<div v-if="invocationAndJobTerminal">
|
||||
<workflow-invocation-export-options :invocation-id="invocation.id" />
|
||||
</div>
|
||||
@@ -39,6 +39,7 @@ import WorkflowInvocationExportOptions from "./WorkflowInvocationExportOptions.v
|
||||
import JOB_STATES_MODEL from "utils/job-states-model";
|
||||
import mixin from "components/JobStates/mixin";
|
||||
import { mapGetters, mapActions } from "vuex";
|
||||
import { useConfig } from "composables/config";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -59,6 +60,13 @@ export default {
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup() {
|
||||
const { config, isLoaded: isConfigLoaded } = useConfig();
|
||||
return {
|
||||
config,
|
||||
isConfigLoaded,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
stepStatesInterval: null,
|
||||
@@ -94,6 +102,9 @@ export default {
|
||||
const jobsSummary = this.getInvocationJobsSummaryById(this.invocationId);
|
||||
return !jobsSummary ? null : new JOB_STATES_MODEL.JobStatesSummary(jobsSummary);
|
||||
},
|
||||
canExecuteTasks() {
|
||||
return this.isConfigLoaded && this.config.enable_celery_tasks;
|
||||
},
|
||||
},
|
||||
created: function () {
|
||||
this.pollStepStatesUntilTerminal();
|
||||
|
||||
@@ -61,7 +61,7 @@ ecdsa==0.18.0 ; python_version >= "3.7" and python_version < "3.12"
|
||||
edam-ontology==1.25.2 ; python_version >= "3.7" and python_version < "3.12"
|
||||
email-validator==1.3.1 ; python_version >= "3.7" and python_version < "3.12"
|
||||
fastapi-utils==0.2.1 ; python_version >= "3.7" and python_version < "3.12"
|
||||
fastapi==0.89.1 ; python_version >= "3.7" and python_version < "3.12"
|
||||
fastapi==0.91.0 ; python_version >= "3.7" and python_version < "3.12"
|
||||
flupy==1.2.0 ; python_version >= "3.7" and python_version < "3.12"
|
||||
frozenlist==1.3.3 ; python_version >= "3.7" and python_version < "3.12"
|
||||
fs==2.4.16 ; python_version >= "3.7" and python_version < "3.12"
|
||||
@@ -170,7 +170,7 @@ sqlalchemy==1.4.46 ; python_version >= "3.7" and python_version < "3.12"
|
||||
sqlitedict==2.1.0 ; python_version >= "3.7" and python_version < "3.12"
|
||||
sqlparse==0.4.3 ; python_version >= "3.7" and python_version < "3.12"
|
||||
starlette-context==0.3.5 ; python_version >= "3.7" and python_version < "3.12"
|
||||
starlette==0.22.0 ; python_version >= "3.7" and python_version < "3.12"
|
||||
starlette==0.24.0 ; python_version >= "3.7" and python_version < "3.12"
|
||||
supervisor==4.2.5 ; python_version >= "3.7" and python_version < "3.12"
|
||||
svgwrite==1.4.3 ; python_version >= "3.7" and python_version < "3.12"
|
||||
tempita==0.5.2 ; python_version >= "3.7" and python_version < "3.12"
|
||||
|
||||
@@ -198,6 +198,11 @@ def parse_port_text(port_text):
|
||||
>>> slurm_ports[8888]['host']
|
||||
'0.0.0.0'
|
||||
>>> ports = parse_port_text("5432/tcp -> :::5432")
|
||||
>>> len(ports)
|
||||
0
|
||||
>>> ports_new = parse_port_text("5432/tcp -> [::]:5432")
|
||||
>>> len(ports_new)
|
||||
0
|
||||
"""
|
||||
ports = None
|
||||
if port_text is not None:
|
||||
@@ -207,7 +212,7 @@ def parse_port_text(port_text):
|
||||
raise Exception(f"Cannot parse host and port from line [{line}]")
|
||||
tool, host = line.split(" -> ", 1)
|
||||
hostname, port = host.rsplit(":", 1)
|
||||
if hostname == "::":
|
||||
if hostname in ["::", "[::]"]:
|
||||
# Skip unspecified IPv6 address, which is also specified as 0:0:0:0 in another line.
|
||||
# This is brittle of course, but so is parsing the container ports like this.
|
||||
continue
|
||||
|
||||
@@ -15,6 +15,7 @@ from galaxy.app_unittest_utils.galaxy_mock import MockApp
|
||||
from galaxy.webapps.base.api import add_request_id_middleware
|
||||
|
||||
app = FastAPI()
|
||||
add_request_id_middleware(app)
|
||||
GX_APP = None
|
||||
|
||||
|
||||
@@ -95,7 +96,6 @@ def assert_scoped_session_is_thread_local(gx_app):
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_request_scoped_sa_session_single_request():
|
||||
add_request_id_middleware(app)
|
||||
async with AsyncClient(app=app, base_url="http://test") as client:
|
||||
response = await client.get("/")
|
||||
assert response.status_code == 200
|
||||
@@ -106,7 +106,6 @@ async def test_request_scoped_sa_session_single_request():
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_request_scoped_sa_session_exception():
|
||||
add_request_id_middleware(app)
|
||||
async with AsyncClient(app=app, base_url="http://test") as client:
|
||||
with pytest.raises(UnexpectedException):
|
||||
await client.get("/internal_server_error")
|
||||
@@ -116,7 +115,6 @@ async def test_request_scoped_sa_session_exception():
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_request_scoped_sa_session_concurrent_requests_sync():
|
||||
add_request_id_middleware(app)
|
||||
async with AsyncClient(app=app, base_url="http://test") as client:
|
||||
awaitables = (client.get("/sync_wait") for _ in range(10))
|
||||
result = await asyncio.gather(*awaitables)
|
||||
@@ -131,7 +129,6 @@ async def test_request_scoped_sa_session_concurrent_requests_sync():
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_request_scoped_sa_session_concurrent_requests_async():
|
||||
add_request_id_middleware(app)
|
||||
async with AsyncClient(app=app, base_url="http://test") as client:
|
||||
awaitables = (client.get("/async_wait") for _ in range(10))
|
||||
result = await asyncio.gather(*awaitables)
|
||||
@@ -146,7 +143,6 @@ async def test_request_scoped_sa_session_concurrent_requests_async():
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_request_scoped_sa_session_concurrent_requests_and_background_thread():
|
||||
add_request_id_middleware(app)
|
||||
loop = asyncio.get_running_loop()
|
||||
target = functools.partial(assert_scoped_session_is_thread_local, GX_APP)
|
||||
with concurrent.futures.ThreadPoolExecutor() as pool:
|
||||
|
||||
Reference in New Issue
Block a user