Skip to content

Is1865/catalog solvers api #2112

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

Merged
merged 60 commits into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
cc5f3f8
Drafs list_solvers handler
pcrespov Jan 27, 2021
685080d
adds check for responsiveness in base class of client
pcrespov Jan 27, 2021
c7f13db
Fixes exampleS entry and adds tests for solvers sorting
pcrespov Jan 27, 2021
625d45f
Fixes catalog OAS
pcrespov Feb 1, 2021
312b22a
api-server: removes is_responsive override in storage module
pcrespov Feb 2, 2021
4a08779
api-server: drafts solver listing
pcrespov Feb 2, 2021
470dee2
Minor
pcrespov Feb 2, 2021
25c77d9
api-server: drafts get_solver by id
pcrespov Feb 2, 2021
dd289a8
Fixes
pcrespov Feb 2, 2021
9a6030c
Setup new test-public-api
pcrespov Feb 2, 2021
e71b128
Creates requirements for tests/public-api
pcrespov Feb 3, 2021
ca99171
General cleanup of pytest_simcore
pcrespov Feb 4, 2021
8a797ec
Adds wait, sleeper in registry and split tests
pcrespov Feb 4, 2021
49710ef
Adds tests in github actions
pcrespov Feb 4, 2021
9860b59
Missing
pcrespov Feb 4, 2021
a2bafe7
Fixes name of system-test-public-api
pcrespov Feb 4, 2021
fc7337a
Missing dependency
pcrespov Feb 4, 2021
edd456c
pylint fix
pcrespov Feb 4, 2021
b32f528
Cleanup
pcrespov Feb 4, 2021
9c6e190
Solver schema: Fixes id generation and tests cleanup
pcrespov Feb 4, 2021
c49dd00
Fixes composition in jobs ide as well
pcrespov Feb 4, 2021
d86bb9f
Added missing plugin module
pcrespov Feb 4, 2021
987be40
Adds FAKE_API_SERVER_ENABLED in main .env
pcrespov Feb 4, 2021
ede1de3
Fixes transformation from catalog response body to Solver model
pcrespov Feb 4, 2021
70d343e
Fixes during manual exploratory testing
pcrespov Feb 4, 2021
ca8b0cf
Adds more coverage on API models
pcrespov Feb 4, 2021
a912ac9
Updates OAS with exampls and missing auth
pcrespov Feb 4, 2021
2be122d
Forgot thisone
pcrespov Feb 4, 2021
8125dfc
All actions tst on ubuntu 20
pcrespov Feb 4, 2021
619e081
Minor rename
pcrespov Feb 4, 2021
16343cb
Some cleanup of environs
pcrespov Feb 4, 2021
9dca1a0
Enable dev features for testing
pcrespov Feb 4, 2021
bda152f
Adds new tests suites to cover all apis
pcrespov Feb 4, 2021
5e551c2
Miior on testing
pcrespov Feb 4, 2021
ce0ad05
@sanderegg review: added long readable CL arguments in scripts : http…
pcrespov Feb 4, 2021
25df4a1
Some more doc on design decissions after @sanderegg review
pcrespov Feb 4, 2021
b18ca13
Fixes linter error
pcrespov Feb 4, 2021
1754007
Fixes test_api_files
pcrespov Feb 5, 2021
16a695f
Fixes tests
pcrespov Feb 5, 2021
b8d7cff
Fixes returned response
pcrespov Feb 5, 2021
6e46394
Download file response
pcrespov Feb 5, 2021
92e8dec
updates test
pcrespov Feb 5, 2021
775dd4e
Pinned postgres images to the same version
pcrespov Feb 5, 2021
460d659
Pins ubuntu
pcrespov Feb 5, 2021
7bc8cf9
pins all
pcrespov Feb 5, 2021
d7ef6b9
Minor
pcrespov Feb 5, 2021
65b6d5f
reverted failing experiment
pcrespov Feb 5, 2021
d66ae23
Added more tests
pcrespov Feb 5, 2021
3e89f80
Improved tests
pcrespov Feb 5, 2021
45dc6ce
Fixes tests for solvers
pcrespov Feb 5, 2021
9c06342
Added some error handling
pcrespov Feb 5, 2021
e3fe2cf
fix tests
pcrespov Feb 6, 2021
04291a8
Fixed paths
pcrespov Feb 6, 2021
4841704
points to master
pcrespov Feb 6, 2021
242c67a
Patches upload/download
pcrespov Feb 8, 2021
b8151b6
Simplifies downloads
pcrespov Feb 8, 2021
e8eba96
Fix
pcrespov Feb 8, 2021
f5da1bf
cleanup
pcrespov Feb 8, 2021
b3a287c
Linter
pcrespov Feb 8, 2021
44572f9
Froze master commit in osparc
pcrespov Feb 8, 2021
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 .env-devel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# - Keep it alfphabetical order and grouped by prefix
# - To expose: export $(grep -v '^#' .env | xargs -0)
#
API_SERVER_DEV_FEATURES_ENABLED=0

BF_API_KEY=none
BF_API_SECRET=none
Expand Down
49 changes: 48 additions & 1 deletion .github/workflows/ci-testing-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1176,14 +1176,60 @@ jobs:
name: integration_simcoresdk_coverage
path: codeclimate.integration_simcoresdk_coverage.json

system-test-public-api:
name: "[sys] public api"
needs: [build-test-images]
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [3.6]
os: [ubuntu-20.04]
fail-fast: false
steps:
- name: set PR default variables
# only pushes have access to the docker credentials, use a default
if: github.event_name == 'pull_request'
run: |
export TMP_DOCKER_REGISTRY=${GITHUB_REPOSITORY%/*}
echo "DOCKER_REGISTRY=${TMP_DOCKER_REGISTRY,,}" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: setup docker
run: |
sudo ./ci/github/helpers/setup_docker_compose.bash
./ci/github/helpers/setup_docker_experimental.bash
./ci/github/helpers/setup_docker_buildx.bash
echo "DOCKER_BUILDX=1" >> $GITHUB_ENV
- name: setup python environment
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: show system version
run: ./ci/helpers/show_system_versions.bash
- uses: actions/cache@v2
name: getting cached data
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-public-api-${{ hashFiles('tests/public-api/requirements/ci.txt') }}
restore-keys: |
${{ runner.os }}-pip-public-api-
${{ runner.os }}-pip-
${{ runner.os }}-
- name: install
run: ./ci/github/system-testing/public-api.bash install
- name: test
run: ./ci/github/system-testing/public-api.bash test
- name: cleanup
if: always()
run: ./ci/github/system-testing/public-api.bash clean_up

system-test-swarm-deploy:
name: "[sys] deploy simcore"
needs: [build-test-images]
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [3.6]
os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04]
os: [ubuntu-20.04]
fail-fast: false
steps:
- name: set PR default variables
Expand Down Expand Up @@ -1477,6 +1523,7 @@ jobs:
integration-test-director-v2,
integration-test-sidecar,
integration-test-simcore-sdk,
system-test-public-api,
system-test-swarm-deploy,
]
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

SHELL := /bin/bash


MAKE_C := $(MAKE) --no-print-directory --directory

# Operating system
Expand Down Expand Up @@ -71,8 +70,10 @@ export ETC_HOSTNAME
host := $(shell echo $$(hostname) > $(ETC_HOSTNAME))
endif

get_my_ip := $(shell hostname --all-ip-addresses | cut --delimiter=" " --fields=1)

# NOTE: this is only for WSL2 as the WSL2 subsystem IP is changing on each reboot
S3_ENDPOINT = $(shell hostname --all-ip-addresses | cut --delimiter=" " --fields=1):9001
S3_ENDPOINT := $(get_my_ip):9001
export S3_ENDPOINT


Expand Down Expand Up @@ -433,7 +434,6 @@ postgres-upgrade: ## initalize or upgrade postgres db to latest state


local_registry=registry
get_my_ip := $(shell hostname --all-ip-addresses | cut --delimiter=" " --fields=1)
.PHONY: local-registry rm-registry

rm-registry: ## remove the registry and changes to host/file
Expand Down
4 changes: 3 additions & 1 deletion ci/github/integration-testing/director-v2.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

# in case it's a Pull request, the env are never available, default to itisfoundation to get a maybe not too old version for caching
Expand Down
4 changes: 3 additions & 1 deletion ci/github/integration-testing/sidecar.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

# in case it's a Pull request, the env are never available, default to itisfoundation to get a maybe not too old version for caching
Expand Down
4 changes: 3 additions & 1 deletion ci/github/integration-testing/simcore-sdk.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

# in case it's a Pull request, the env are never available, default to itisfoundation to get a maybe not too old version for caching
Expand Down
4 changes: 3 additions & 1 deletion ci/github/integration-testing/webserver.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

# in case it's a Pull request, the env are never available, default to itisfoundation to get a maybe not too old version for caching
Expand Down
4 changes: 3 additions & 1 deletion ci/github/system-testing/e2e.bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-on-travis-ci
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

# in case it's a Pull request, the env are never available, default to itisfoundation to get a maybe not too old version for caching
Expand Down
4 changes: 3 additions & 1 deletion ci/github/system-testing/environment-setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#

# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
47 changes: 47 additions & 0 deletions ci/github/system-testing/public-api.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash
#
# This task in the system-testing aims to test some guarantees expected from
# the deployment of osparc-simcore in a cluster (swarm).
# It follows some of the points enumerated in the https://12factor.net/ methodology.
#

# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

# in case it's a Pull request, the env are never available, default to itisfoundation to get a maybe not too old version for caching
DOCKER_IMAGE_TAG=$(exec ci/helpers/build_docker_image_tag.bash)
export DOCKER_IMAGE_TAG

install() {
bash ci/helpers/ensure_python_pip.bash
pushd tests/public-api
pip3 install -r requirements/ci.txt
popd
make pull-version || ( (make pull-cache || true) && make build-x tag-version)
make .env
pip list -v
make info-images
}

test() {
pytest --color=yes --cov-report=term-missing -v tests/public-api --log-level=DEBUG
}

clean_up() {
docker images
make down
make leave
}

# Check if the function exists (bash specific)
if declare -f "$1" >/dev/null; then
# call arguments verbatim
"$@"
else
# Show a helpful error
echo "'$1' is not a known function name" >&2
exit 1
fi
4 changes: 3 additions & 1 deletion ci/github/system-testing/swarm-deploy.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#

# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

# in case it's a Pull request, the env are never available, default to itisfoundation to get a maybe not too old version for caching
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/api-server.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/api.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/catalog.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/director.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/director_v2.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
6 changes: 4 additions & 2 deletions ci/github/unit-testing/frontend.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down Expand Up @@ -39,7 +41,7 @@ test() {
popd

#TODO: no idea what is this doing... disabled at the moment since travis is supposed to do it as well

# # prepare documentation site ...
# git clone --depth 1 https://github.com/ITISFoundation/itisfoundation.github.io.git
# rm -rf itisfoundation.github.io/.git
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/models-library.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/postgres-database.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/python-linting.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/service-integration.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/service-library.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/sidecar.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/simcore-sdk.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

# in case it's a Pull request, the env are never available, default to itisfoundation to get a maybe not too old version for caching
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/storage.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
4 changes: 3 additions & 1 deletion ci/github/unit-testing/webserver.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

install() {
Expand Down
4 changes: 3 additions & 1 deletion ci/helpers/build_docker_image_tag.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
# always adds -testbuild-latest to the image tag to differentiate from the real master/staging builds

# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
IFS=$'\n\t'

default_image_tag="github"
Expand Down
Loading