Skip to content

[maintenance] improve stability of deploy tests #1563

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

Conversation

sanderegg
Copy link
Member

ensure the database is filled up

What do these changes do?

  • retry checking of root (http://127.0.0.1:9081) since it can take a small amount of time until traefik redirects and the webserver answers correctly
  • ensure the database is correctly setup on start for the e2e testing preventing webserver to crash unexpectedly

Related issue number

How to test

Checklist

  • Did you change any service's API? Then make sure to bundle document and upgrade version (make openapi-specs, git commit ... and then make version-*)
  • Unit tests for the changes exist
  • Runs in the swarm
  • Documentation reflects the changes
  • New module? Add your github username to .github/CODEOWNERS

@sanderegg sanderegg added this to the Huo Guo milestone Jun 16, 2020
@sanderegg sanderegg requested review from GitHK, pcrespov and odeimaiz June 16, 2020 22:06
@sanderegg sanderegg self-assigned this Jun 16, 2020
@codecov
Copy link

codecov bot commented Jun 16, 2020

Codecov Report

Merging #1563 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1563      +/-   ##
==========================================
- Coverage   71.35%   71.32%   -0.03%     
==========================================
  Files         249      249              
  Lines       10015    10015              
  Branches     1106     1106              
==========================================
- Hits         7146     7143       -3     
- Misses       2552     2554       +2     
- Partials      317      318       +1     
Flag Coverage Δ
#integrationtests 57.71% <ø> (ø)
#unittests 63.28% <ø> (-0.03%) ⬇️
Impacted Files Coverage Δ
.../director/src/simcore_service_director/producer.py 65.07% <0.00%> (-0.76%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03b1525...5be64be. Read the comment docs.

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

👍


# HELPERS --

# TODO: this can be used by ANY of the simcore services!
Copy link
Member

Choose a reason for hiding this comment

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

yes this is reusable :-)

@tenacity.retry(**MinioRetryPolicyUponInitialization().kwargs)
async def wait_till_webserver_responsive(webserver_endpoint: URL):
async with aiohttp.ClientSession() as session:
async with session.get(webserver_endpoint.with_path("/v0/")) as resp:
Copy link
Member

Choose a reason for hiding this comment

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

we are going to have one day troubles with the AIP versions ... I start putting them as separate fixtures as well

@@ -44,8 +45,14 @@ def prepare_all_services(
return services


@pytest.fixture(scope="module")
def create_db_on_start(devel_environ: Dict[str, str]):
devel_environ["WEBSERVER_DB_INITTABLES"] = "1"
Copy link
Member

Choose a reason for hiding this comment

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

I will change this in another pR by migration routings ... but it is ok for now :-)

@pcrespov pcrespov added the t:maintenance Some planned maintenance work label Jun 17, 2020
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

👍

@sanderegg sanderegg merged commit 680eb59 into ITISFoundation:master Jun 17, 2020
@sanderegg sanderegg deleted the bugfix/stabilise_ci_deployment branch June 17, 2020 06:59
@odeimaiz odeimaiz mentioned this pull request Aug 4, 2020
odeimaiz added a commit that referenced this pull request Aug 4, 2020
- UI/UX improvements (#1657)
- Bump yarl from 1.4.2 to 1.5.1 in /packages/postgres-database (#1665)
- Bump ujson from 3.0.0 to 3.1.0 in /packages/service-library (#1664)
- Bump pytest-docker from 0.7.2 to 0.8.0 in /packages/service-library (#1647)
- Improving storage performance (#1659)
- Bump aiozipkin from 0.6.0 to 0.7.0 in /packages/service-library (#1642)
- Theming (#1656)
- Platform stability:  (#1645)
- is1594 fix and re-activate e2e testing (#1620)
- 2 bugs fixed + Some improvements (#1634)
- Fixes default (#1640)
- Bump lodash from 4.17.15 to 4.17.19 (#1639)
- Is1585/cleanup storage (#1586)
- Fixes on publish studies handling (#1632)
- Some enhancements and bug fixes (#1608)
- Improve e2e  (#1631)
- filter studies by name before deleting them (#1629)
- Maintenance/upgrades test tools (#1628)
- Bugfix/concurent opening projects (#1598)
- Bugfix/allow reading groups anonymous user (#1615)
- Bump docker from 4.2.1 to 4.2.2 in /packages/postgres-database (#1605)
- fix testing if node has gpu support (#1604)
- [bugfix] Invalidate cache before starting a study (#1602)
- Feature/fix e2e 2 (#1600)
- fix deploy not needing e2e testing since it is disabled
- reduce cardinality of metrics (#1593)
- Excudes e2e stage from include until fixed (#1595)
- Shared project concurrency (frontend) (#1591)
- Homogenize studies and services (#1569)
- [feature] UI Fine grained access - project locking and notification
- Bugfix/apiserver does not need sslheaders (#1564)
- Cleanup catalog service (#1582)
- Maintenance/cleanup api server (#1578)
- Adds support for GPU scheduling of computational services (#1553)
- Maintenance/upgrades and tooling (#1546)
- Is1570/study fails 500 (#1572)
- Bump faker from 4.1.0 to 4.1.1 in /packages/postgres-database (#1573)
- maintenance fix codecov reports (#1568)
- Manage groups, Share studies (#1512)
- Is/add notebook migration script (#1565)
- Is1269/api-server upgrade (#1475)
- added simcore_webserver_service in pytest simcore package (#1563)
- add traefik endpoint to api-gateway (#1555)
@sanderegg sanderegg mentioned this pull request Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:maintenance Some planned maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants