Skip to content

Commit

Permalink
Fixes flaky inputs changes detection in dy-static-file-server servi…
Browse files Browse the repository at this point in the history
…ces (#157)

Co-authored-by: Andrei Neagu <[email protected]>
  • Loading branch information
GitHK and Andrei Neagu authored Nov 15, 2024
1 parent 506a1cd commit 8389369
Show file tree
Hide file tree
Showing 18 changed files with 275 additions and 329 deletions.
19 changes: 9 additions & 10 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion services/dy-static-file-server/.cookiecutterrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ default_context:
project_slug: 'dy-static-file-server'
project_type: 'computational'
release_date: '2021'
version: '2.0.4'
version: '2.0.5'
5 changes: 3 additions & 2 deletions services/dy-static-file-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ _yq = docker run --rm -i -v ${PWD}:/workdir mikefarah/yq:3.3.4 yq
$@/bin/pip3 install \
pip-tools

.PHONY: requirements
requirements: .venv
# freezes requirements
$</bin/pip-compile --upgrade --build-isolation --output-file requirements/test.txt requirements/test.in
$</bin/pip-compile --upgrade --build-isolation --output-file requirements/base.txt requirements/base.in
$</bin/pip-compile --upgrade --build-isolation --output-file requirements/test.txt requirements/test.in

devenv: .venv requirements ## create a python virtual environment with tools to dev, run and tests cookie-cutter
# installing extra tools from: $(word 3,$^), $(word 2,$^)
Expand All @@ -73,7 +74,7 @@ export DOCKER_BUILD_TARGET=$(if $(findstring -devel,$@),development,$(if $(finds
$(if $(findstring -x,$@),\
docker buildx > /dev/null; export DOCKER_CLI_EXPERIMENTAL=enabled; docker buildx bake --file docker-compose-build.yml --file docker-compose-meta.yml $(if $(findstring -nc,$@),--no-cache,);,\
$(if $(findstring -kit,$@),export DOCKER_BUILDKIT=1;export COMPOSE_DOCKER_CLI_BUILD=1;,) \
docker-compose --file docker-compose-build.yml --file docker-compose-meta.yml build $(if $(findstring -nc,$@),--no-cache,) --parallel;\
docker compose --file docker-compose-build.yml --file docker-compose-meta.yml build $(if $(findstring -nc,$@),--no-cache,) --parallel;\
)
endef

Expand Down
2 changes: 1 addition & 1 deletion services/dy-static-file-server/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.4
2.0.5
6 changes: 3 additions & 3 deletions services/dy-static-file-server/docker-compose-meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
io.simcore.name: '{"name": "dy-static-file-server"}'
io.simcore.outputs: '{"outputs": {}}'
io.simcore.type: '{"type": "dynamic"}'
io.simcore.version: '{"version": "2.0.4"}'
io.simcore.version: '{"version": "2.0.5"}'
org.label-schema.build-date: ${BUILD_DATE}
org.label-schema.schema-version: '1.0'
org.label-schema.vcs-ref: ${VCS_REF}
Expand All @@ -29,7 +29,7 @@ services:
io.simcore.name: '{"name": "dy-static-file-server-dynamic-sidecar"}'
io.simcore.outputs: '{"outputs": {"string_output": {"displayOrder": 1, "label": "String output", "description": "String value from input", "type": "string"}, "integer_output": {"displayOrder": 2, "label": "Integer output", "description": "Integer value from input", "type": "integer"}, "boolean_output": {"displayOrder": 3, "label": "Boolean output", "description": "Boolean value from input", "type": "boolean"}, "number_output": {"displayOrder": 4, "label": "Number output", "description": "Number value from input", "type": "number"}, "file_output": {"displayOrder": 5, "label": "File output", "description": "File from input", "type": "data:*/*", "fileToKeyMap": {"test_file": "file_output"}}}}'
io.simcore.type: '{"type": "dynamic"}'
io.simcore.version: '{"version": "2.0.4"}'
io.simcore.version: '{"version": "2.0.5"}'
org.label-schema.build-date: ${BUILD_DATE}
org.label-schema.schema-version: '1.0'
org.label-schema.vcs-ref: ${VCS_REF}
Expand All @@ -48,7 +48,7 @@ services:
io.simcore.name: '{"name": "dy-static-file-server-dynamic-sidecar-compose-spec"}'
io.simcore.outputs: '{"outputs": {"string_output": {"displayOrder": 1, "label": "String output", "description": "String value from input", "type": "string"}, "integer_output": {"displayOrder": 2, "label": "Integer output", "description": "Integer value from input", "type": "integer"}, "boolean_output": {"displayOrder": 3, "label": "Boolean output", "description": "Boolean value from input", "type": "boolean"}, "number_output": {"displayOrder": 4, "label": "Number output", "description": "Number value from input", "type": "number"}, "file_output": {"displayOrder": 5, "label": "File output", "description": "File from input", "type": "data:*/*", "fileToKeyMap": {"test_file": "file_output"}}}}'
io.simcore.type: '{"type": "dynamic"}'
io.simcore.version: '{"version": "2.0.4"}'
io.simcore.version: '{"version": "2.0.5"}'
org.label-schema.build-date: ${BUILD_DATE}
org.label-schema.schema-version: '1.0'
org.label-schema.vcs-ref: ${VCS_REF}
Expand Down
2 changes: 1 addition & 1 deletion services/dy-static-file-server/docker/custom/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM joseluisq/static-web-server:2.0.2-alpine as production
# docker run dy-static-file-server:prod
#

ARG PYTHON_VERSION="3.8.10-r0"
ARG PYTHON_VERSION="3.8.15-r0"
ARG WORKDIR="/workdir"

ENV SC_BUILD_TARGET=production
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: dy-static-file-server-dynamic-sidecar-compose-spec
key: simcore/services/dynamic/dy-static-file-server-dynamic-sidecar-compose-spec
type: dynamic
integration-version: 1.0.0
version: 2.0.4
version: 2.0.5
description: Modern test dynamic service providing a docker-compose specification file (with dynamic sidecar and compose-spec). Changes to the inputs will be forwarded to the outputs. The /workdir/generated-data directory is populated if no content is present.
contact: [email protected]
authors:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: dy-static-file-server-dynamic-sidecar
key: simcore/services/dynamic/dy-static-file-server-dynamic-sidecar
type: dynamic
integration-version: 1.0.0
version: 2.0.4
version: 2.0.5
description: Modern test dynamic service (with dynamic sidecar). Changes to the inputs will be forwarded to the outputs. The /workdir/generated-data directory is populated if no content is present.
contact: [email protected]
authors:
Expand Down
2 changes: 1 addition & 1 deletion services/dy-static-file-server/metadata/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: dy-static-file-server
key: simcore/services/dynamic/dy-static-file-server
type: dynamic
integration-version: 1.0.0
version: 2.0.4
version: 2.0.5
description: Legacy test dynamic service (starts using original director-v0). The /workdir/generated-data directory is populated if no content is present.
contact: [email protected]
authors:
Expand Down
1 change: 0 additions & 1 deletion services/dy-static-file-server/requirements/base.in
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
watchdog
8 changes: 3 additions & 5 deletions services/dy-static-file-server/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --output-file=requirements_app.txt requirements_app.in
# pip-compile --output-file=requirements/base.txt requirements/base.in
#
watchdog==2.1.5
# via -r requirements_app.in
4 changes: 3 additions & 1 deletion services/dy-static-file-server/requirements/test.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ coverage
docker
jsonschema
pytest
pytest-asyncio
pytest-cookies
pytest-cov
pytest-instafail
pytest-mock
pytest-sugar
pyyaml
pyyaml
tenacity
145 changes: 79 additions & 66 deletions services/dy-static-file-server/requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,106 +1,119 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --output-file=requirements.txt requirements.in
# pip-compile --output-file=requirements/test.txt requirements/test.in
#
arrow==1.1.1
# via jinja2-time
attrs==21.2.0
arrow==1.3.0
# via cookiecutter
attrs==24.2.0
# via
# jsonschema
# pytest
# referencing
binaryornot==0.4.4
# via cookiecutter
certifi==2021.5.30
certifi==2024.8.30
# via requests
chardet==4.0.0
chardet==5.2.0
# via binaryornot
charset-normalizer==2.0.4
charset-normalizer==3.4.0
# via requests
click==8.0.1
click==8.1.7
# via cookiecutter
cookiecutter==1.7.3
cookiecutter==2.6.0
# via pytest-cookies
coverage==5.5
coverage[toml]==7.6.5
# via
# -r requirements.in
# -r requirements/test.in
# pytest-cov
docker==5.0.2
# via -r requirements.in
idna==3.2
docker==7.1.0
# via -r requirements/test.in
exceptiongroup==1.2.2
# via pytest
idna==3.10
# via requests
iniconfig==1.1.1
iniconfig==2.0.0
# via pytest
jinja2==3.0.1
# via
# cookiecutter
# jinja2-time
jinja2-time==0.2.0
jinja2==3.1.4
# via cookiecutter
jsonschema==3.2.0
# via -r requirements.in
markupsafe==2.0.1
jsonschema==4.23.0
# via -r requirements/test.in
jsonschema-specifications==2024.10.1
# via jsonschema
markdown-it-py==3.0.0
# via rich
markupsafe==3.0.2
# via jinja2
packaging==21.0
mdurl==0.1.2
# via markdown-it-py
packaging==24.2
# via
# pytest
# pytest-sugar
pluggy==1.0.0
pluggy==1.5.0
# via pytest
poyo==0.5.0
# via cookiecutter
py==1.10.0
# via pytest
pyparsing==2.4.7
# via packaging
pyrsistent==0.18.0
# via jsonschema
pytest==6.2.5
pygments==2.18.0
# via rich
pytest==8.3.3
# via
# -r requirements.in
# -r requirements/test.in
# pytest-asyncio
# pytest-cookies
# pytest-cov
# pytest-instafail
# pytest-mock
# pytest-sugar
pytest-cookies==0.6.1
# via -r requirements.in
pytest-cov==2.12.1
# via -r requirements.in
pytest-instafail==0.4.2
# via -r requirements.in
pytest-mock==3.6.1
# via -r requirements.in
pytest-sugar==0.9.4
# via -r requirements.in
python-dateutil==2.8.2
pytest-asyncio==0.24.0
# via -r requirements/test.in
pytest-cookies==0.7.0
# via -r requirements/test.in
pytest-cov==6.0.0
# via -r requirements/test.in
pytest-instafail==0.5.0
# via -r requirements/test.in
pytest-mock==3.14.0
# via -r requirements/test.in
pytest-sugar==1.0.0
# via -r requirements/test.in
python-dateutil==2.9.0.post0
# via arrow
python-slugify==5.0.2
python-slugify==8.0.4
# via cookiecutter
pyyaml==5.4.1
# via -r requirements.in
requests==2.26.0
pyyaml==6.0.2
# via
# -r requirements/test.in
# cookiecutter
# docker
six==1.16.0
referencing==0.35.1
# via
# jsonschema
# jsonschema-specifications
requests==2.32.3
# via
# cookiecutter
# docker
rich==13.9.4
# via cookiecutter
rpds-py==0.21.0
# via
# jsonschema
# python-dateutil
termcolor==1.1.0
# referencing
six==1.16.0
# via python-dateutil
tenacity==9.0.0
# via -r requirements/test.in
termcolor==2.5.0
# via pytest-sugar
text-unidecode==1.3
# via python-slugify
toml==0.10.2
tomli==2.1.0
# via
# coverage
# pytest
# pytest-cov
urllib3==1.26.6
# via requests
websocket-client==1.2.1
# via docker

# The following packages are considered to be unsafe in a requirements file:
# setuptools
types-python-dateutil==2.9.0.20241003
# via arrow
typing-extensions==4.12.2
# via rich
urllib3==2.2.3
# via
# docker
# requests
Loading

0 comments on commit 8389369

Please sign in to comment.