From 57e718adb7a2e778d91b28529916bbb4d589797d Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 2 Apr 2020 09:52:58 -0400 Subject: [PATCH] Testing junk - some might be good though. --- lib/galaxy/jobs/runners/pulsar.py | 1 + test/integration/test_kubernetes_staging.py | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/galaxy/jobs/runners/pulsar.py b/lib/galaxy/jobs/runners/pulsar.py index c30271986cee..7635724f97f0 100644 --- a/lib/galaxy/jobs/runners/pulsar.py +++ b/lib/galaxy/jobs/runners/pulsar.py @@ -844,6 +844,7 @@ def __build_metadata_configuration(self, client, job_wrapper, remote_metadata, r return metadata_kwds def __async_update(self, full_status): + log.info("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n IN AN UPDATE \n\n\n\n\n\n\n\n\n\n") galaxy_job_id = None try: remote_job_id = full_status["job_id"] diff --git a/test/integration/test_kubernetes_staging.py b/test/integration/test_kubernetes_staging.py index ad65fd07b408..d4c76d5e1ef5 100644 --- a/test/integration/test_kubernetes_staging.py +++ b/test/integration/test_kubernetes_staging.py @@ -28,7 +28,7 @@ from .test_local_job_cancellation import CancelsJob TOOL_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 'tools')) -GALAXY_TEST_KUBERNETES_INFRASTRUCTURE_HOST = os.environ.get("GALAXY_TEST_KUBERNETES_INFRASTRUCTURE_HOST", "SOCKET_HOSTNAME") +GALAXY_TEST_KUBERNETES_INFRASTRUCTURE_HOST = os.environ.get("GALAXY_TEST_KUBERNETES_INFRASTRUCTURE_HOST", "DOCKER_INTERNAL") AMQP_URL = integration_util.AMQP_URL GALAXY_TEST_KUBERNETES_NAMESPACE = os.environ.get("GALAXY_TEST_K8S_NAMESPACE", "default") @@ -246,6 +246,12 @@ def test_mulled_simple(self): def set_infrastucture_url(config): + host = get_infrastructure_host() + infrastructure_url = "http://%s:$UWSGI_PORT" % host + config["galaxy_infrastructure_url"] = infrastructure_url + + +def get_infrastructure_host(): host = GALAXY_TEST_KUBERNETES_INFRASTRUCTURE_HOST if host == "DOCKER_INTERNAL": host = "host.docker.internal" @@ -253,20 +259,20 @@ def set_infrastucture_url(config): host = socket.gethostname() elif host == "SOCKET_FQDN": host = socket.getfqdn() - infrastructure_url = "http://%s:$UWSGI_PORT" % host - config["galaxy_infrastructure_url"] = infrastructure_url + return host def to_infrastructure_uri(uri): # remap MQ or file server URI hostnames for in-container versions, this is sloppy # should actually parse the URI and rebuild with correct host # similar code found in Pulsar integration_tests.py. + host = get_infrastructure_host() infrastructure_uri = uri - if GALAXY_TEST_KUBERNETES_INFRASTRUCTURE_HOST: + if host: if "0.0.0.0" in infrastructure_uri: - infrastructure_uri = infrastructure_uri.replace("0.0.0.0", GALAXY_TEST_KUBERNETES_INFRASTRUCTURE_HOST) + infrastructure_uri = infrastructure_uri.replace("0.0.0.0", host) elif "localhost" in infrastructure_uri: - infrastructure_uri = infrastructure_uri.replace("localhost", GALAXY_TEST_KUBERNETES_INFRASTRUCTURE_HOST) + infrastructure_uri = infrastructure_uri.replace("localhost", host) elif "127.0.0.1" in infrastructure_uri: - infrastructure_uri = infrastructure_uri.replace("127.0.0.1", GALAXY_TEST_KUBERNETES_INFRASTRUCTURE_HOST) + infrastructure_uri = infrastructure_uri.replace("127.0.0.1", host) return infrastructure_uri