diff --git a/.ci/minikube-test-setup/deployment.yaml b/.ci/minikube-test-setup/deployment.yaml new file mode 100644 index 00000000000..d7afe110c83 --- /dev/null +++ b/.ci/minikube-test-setup/deployment.yaml @@ -0,0 +1,32 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/name: testing + name: testing +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: test + template: + metadata: + labels: + app.kubernetes.io/name: test + spec: + containers: + - image: postgres:12 + name: postgres + ports: + - containerPort: 5432 + env: + - name: POSTGRES_DB + value: postgres + - name: POSTGRES_USER + value: postgres + - name: POSTGRES_PASSWORD + value: postgres + - image: rabbitmq + name: rabbitmq + ports: + - containerPort: 5672 diff --git a/.ci/minikube-test-setup/start_services.sh b/.ci/minikube-test-setup/start_services.sh new file mode 100644 index 00000000000..1e860dadcb7 --- /dev/null +++ b/.ci/minikube-test-setup/start_services.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -ex + +SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}") +kubectl apply -f "$SCRIPTDIR/deployment.yaml" +kubectl expose deployment testing --type=LoadBalancer --name=testing-service + +CLUSTER_IP=$(kubectl get service testing-service -o jsonpath='{.spec.clusterIP}') +GALAXY_TEST_DBURI="postgresql://postgres:postgres@${CLUSTER_IP}:5432/galaxy?client_encoding=utf-8" +GALAXY_TEST_AMQP_URL="amqp://${CLUSTER_IP}:5672)//" +export GALAXY_TEST_DBURI +export GALAXY_TEST_AMQP_URL diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 3bd0aaf4d69..5cba3dba72b 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -6,14 +6,15 @@ env: jobs: test: name: Test - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - python-version: [3.7] + python-version: ['3.7'] subset: ['upload_datatype', 'extended_metadata', 'kubernetes', 'not (upload_datatype or extended_metadata or kubernetes)'] services: postgres: - image: postgres:11 + image: postgres:13 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres @@ -25,36 +26,48 @@ jobs: ports: - 5672:5672 steps: - - name: Prune unused docker image, volumes and containers - run: docker system prune -a -f - - name: Clean dotnet folder for space - if: matrix.subset == 'kubernetes' - run: rm -Rf /usr/share/dotnet - - name: Setup Minikube - if: matrix.subset == 'kubernetes' - id: minikube - uses: CodingNagger/minikube-setup-action@v1.0.3 - with: - minikube-version: "1.9.0-0_amd64" - - name: Launch Minikube - if: matrix.subset == 'kubernetes' - run: eval ${{ steps.minikube.outputs.launcher }} - - name: Check pods - if: matrix.subset == 'kubernetes' - run: | - kubectl get pods - - uses: actions/checkout@v2 - with: - path: 'galaxy root' - - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Cache pip dir - uses: actions/cache@v1 - id: pip-cache - with: - path: ~/.cache/pip - key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} - - name: Run tests - run: './run_tests.sh -integration test/integration -- -k "${{ matrix.subset }}"' - working-directory: 'galaxy root' + - name: Prune unused docker image, volumes and containers + run: docker system prune -a -f + - name: Clean dotnet folder for space + if: matrix.subset == 'kubernetes' + run: rm -Rf /usr/share/dotnet + - name: Setup Minikube + if: matrix.subset == 'kubernetes' + id: minikube + uses: CodingNagger/minikube-setup-action@v1.0.3 + with: + minikube-version: "1.9.0-0_amd64" + - name: Launch Minikube + if: matrix.subset == 'kubernetes' + run: eval ${{ steps.minikube.outputs.launcher }} + - name: Check pods + if: matrix.subset == 'kubernetes' + run: | + kubectl get pods + - uses: actions/checkout@v2 + with: + path: 'galaxy root' + - uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Cache pip dir + uses: actions/cache@v1 + id: pip-cache + with: + path: ~/.cache/pip + key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }} + - name: Run tests + if: matrix.subset != 'kubernetes' + run: './run_tests.sh -integration test/integration -- -k "${{ matrix.subset }}"' + working-directory: 'galaxy root' + - name: Run tests + if: matrix.subset == 'kubernetes' + run: | + . .ci/minikube-test-setup/start_services.sh + ./run_tests.sh -integration test/integration -- -k "${{ matrix.subset }}" + working-directory: 'galaxy root' + - uses: actions/upload-artifact@v2 + if: failure() + with: + name: Integration test results (${{ matrix.python-version }}, ${{ matrix.subset }}) + path: 'galaxy root/run_integration_tests.html' diff --git a/lib/galaxy/dependencies/pipfiles/default/Pipfile b/lib/galaxy/dependencies/pipfiles/default/Pipfile index 762cfc3a441..27fcd08ea2c 100644 --- a/lib/galaxy/dependencies/pipfiles/default/Pipfile +++ b/lib/galaxy/dependencies/pipfiles/default/Pipfile @@ -82,7 +82,7 @@ pyparsing = "*" "Fabric3" = "*" paramiko = "*" cloudbridge = "*" -social_auth_core = {version = "==3.3.0", extras = ['openidconnect']} +social-auth-core = {version = "==3.3.0", extras = ['openidconnect']} cloudauthz = "==0.6.0" gxformat2 = "*" refgenconf = ">=0.7.0" diff --git a/lib/galaxy/tools/parameters/wrapped_json.py b/lib/galaxy/tools/parameters/wrapped_json.py index b65063c7262..9a3393ffc21 100644 --- a/lib/galaxy/tools/parameters/wrapped_json.py +++ b/lib/galaxy/tools/parameters/wrapped_json.py @@ -94,10 +94,13 @@ def _json_wrap_input(input, value_wrapper, profile, handle_files="skip"): elif input_type == "boolean": json_value = _cast_if_not_none(value_wrapper, bool) elif input_type == "select": - if input.multiple and packaging.version.parse(str(profile)) >= packaging.version.parse('20.05'): - json_value = [_ for _ in _cast_if_not_none(value_wrapper.value, list)] - else: + if packaging.version.parse(str(profile)) < packaging.version.parse('20.05'): json_value = _cast_if_not_none(value_wrapper, str) + else: + if input.multiple: + json_value = [str(_) for _ in _cast_if_not_none(value_wrapper.value, list)] + else: + json_value = _cast_if_not_none(value_wrapper.value, str) elif input_type == "data_column": # value is a SelectToolParameterWrapper() if input.multiple: diff --git a/packages/data/requirements.txt b/packages/data/requirements.txt index 98424dcbef5..8753dc5cddd 100644 --- a/packages/data/requirements.txt +++ b/packages/data/requirements.txt @@ -9,7 +9,7 @@ parsley numpy<=1.16 pycryptodome pysam -social_auth_core +social-auth-core[openidconnect]==3.3.0 SQLAlchemy sqlalchemy-migrate sqlalchemy-utils diff --git a/test/functional/tools/inputs_as_json.xml b/test/functional/tools/inputs_as_json.xml index 465aba5eda2..1aff602e796 100644 --- a/test/functional/tools/inputs_as_json.xml +++ b/test/functional/tools/inputs_as_json.xml @@ -27,8 +27,8 @@ if test_case == "1": assert_equals(as_dict["inttest"], 12456) assert_equals(as_dict["floattest"], 6.789) assert_equals(as_dict["radio_select"], "a_radio") - assert_equals(as_dict["optional_select"], None) - assert_equals(as_dict["optional_multiple_select"], []) + assert_equals(as_dict["optional_select"], "None") + assert_equals(as_dict["optional_multiple_select"], "None") assert_equals(as_dict["repeat"][0]["r"], "000000") assert_equals(as_dict["repeat"][1]["r"], "FFFFFF") assert_equals(as_dict["cond"]["more_text"], "fdefault") @@ -43,7 +43,7 @@ elif test_case == "2": assert_equals(as_dict["floattest"], 1.0) assert_equals(as_dict["radio_select"], "a_radio") assert_equals(as_dict["optional_select"], "a") - assert_equals(as_dict["optional_multiple_select"], ['a', 'b']) + assert_equals(as_dict["optional_multiple_select"], 'a,b') assert_equals(as_dict["repeat"][0]["r"], "000000") assert_equals(as_dict["cond"]["cond_test"], "second") assert_equals(as_dict["cond"]["more_text"], "sdefault") diff --git a/test/functional/tools/inputs_as_json_profile.xml b/test/functional/tools/inputs_as_json_profile.xml index 9fc04164878..162a6fa7345 100644 --- a/test/functional/tools/inputs_as_json_profile.xml +++ b/test/functional/tools/inputs_as_json_profile.xml @@ -1,7 +1,7 @@ - +