Skip to content
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

♻️ update settings api server #2563

Merged
merged 17 commits into from
Sep 30, 2021

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Sep 29, 2021

What do these changes do?

  • ♻️ refactors api-server to use settings-library (based on pattern presented in http://github.com/pcrespov/sample-app-settings)
  • ♻️ formatted meta constants to uppercase in both api-server and director-v2
  • ✨adds CLI command to resolve and print envfiles
  • 🐛added a retry policy to retrieve index from static web server since i noticed that unhandled exception shut down the web-server in one of the tests:
   aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host static-webserver:8000 ssl:default [Name or service not known]

Related issue/s

How to test

  • all tests in api-server
  • check CLI to produce e.g. envfiles
$ cd services/api-server
$ make install-dev
$ simcore-service-api-server --help   
...
$ simcore-service-api-server settings --help
...
$ export $(grep -v '^#' .env-devel | xargs),  simcore-service-api-server settings --compact

Checklist

check and update settings in

  • core/settings.py
  • .env-dev
  • docker-compose

@pcrespov pcrespov self-assigned this Sep 29, 2021
@codecov
Copy link

codecov bot commented Sep 29, 2021

Codecov Report

Merging #2563 (4a91877) into master (b445b74) will decrease coverage by 0.0%.
The diff coverage is 75.7%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #2563     +/-   ##
========================================
- Coverage    76.9%   76.8%   -0.1%     
========================================
  Files         622     623      +1     
  Lines       24028   24048     +20     
  Branches     2355    2356      +1     
========================================
- Hits        18483   18479      -4     
- Misses       4918    4939     +21     
- Partials      627     630      +3     
Flag Coverage Δ
integrationtests 65.4% <70.0%> (-0.1%) ⬇️
unittests 71.3% <75.7%> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...s/api-server/src/simcore_service_api_server/cli.py 0.0% <0.0%> (ø)
.../simcore_service_api_server/modules/director_v2.py 46.3% <ø> (ø)
...ces/web/server/src/simcore_service_webserver/db.py 60.8% <0.0%> (-0.9%) ⬇️
...c/simcore_service_webserver/scicrunch/_resolver.py 92.3% <ø> (-3.9%) ⬇️
...e_service_api_server/api/dependencies/webserver.py 53.5% <16.6%> (-4.2%) ⬇️
...eb/server/src/simcore_service_webserver/statics.py 41.7% <46.1%> (+2.0%) ⬆️
...rver/src/simcore_service_api_server/core/events.py 83.3% <50.0%> (ø)
...simcore_service_api_server/modules/remote_debug.py 50.0% <50.0%> (ø)
...src/simcore_service_api_server/core/application.py 90.9% <73.3%> (+0.1%) ⬆️
...irector-v2/src/simcore_service_director_v2/meta.py 76.4% <75.0%> (+1.4%) ⬆️
... and 21 more

@pcrespov pcrespov added this to the Capra delle nevi milestone Sep 29, 2021
@pcrespov pcrespov added a:apiserver api-server service a:director-v2 issue related with the director-v2 service labels Sep 29, 2021
@pcrespov pcrespov requested review from sanderegg, GitHK, colinRawlings and mguidon and removed request for sanderegg September 29, 2021 19:42
@pcrespov pcrespov marked this pull request as ready for review September 29, 2021 20:01
Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great. thanks for the changes!

services/api-server/.env-devel Show resolved Hide resolved
services/api-server/setup.py Show resolved Hide resolved
@pcrespov pcrespov force-pushed the refactor/settings-api-server branch from 4015fc7 to 7001eb7 Compare September 30, 2021 08:25
@pcrespov pcrespov force-pushed the refactor/settings-api-server branch from 7001eb7 to 20e1073 Compare September 30, 2021 08:25
@pcrespov pcrespov merged commit 3fc5855 into ITISFoundation:master Sep 30, 2021
@pcrespov pcrespov deleted the refactor/settings-api-server branch September 30, 2021 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:apiserver api-server service a:director-v2 issue related with the director-v2 service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants