ITISFoundation / osparc-simcore

🐼 osparc-simcore simulation framework
https://osparc.io
MIT License
43 stars 27 forks source link

E2E: complete implementation of test to check if all dy-sidecar created services were properly removed after testing #3588

Closed sanderegg closed 1 month ago

sanderegg commented 1 year ago

The webserver knows when the CI is the one calling into the system. It should make sure that any created docker component also receives the label

Therefore one could:

_Issue created from a Mattermost message by @sanderegg._

Added @mrnicegyu11 sprint planning 02Mar2023: Also expose the product (such as tip, s4l) to the user services' container labels, please.

sanderegg commented 1 year ago
pip install httpie

# this will get all the containers with label set as user_id
http GET https://monitoring.osparc-master.speag.com/portainer/api/endpoints/2/docker/containers/json Authorization:"Bearer BEARER_CODE" limit==1 filters=='{"label":["user_id=${PUPPET_USER_ID}"]}'
sanderegg commented 1 year ago
# same for services
http GET https://monitoring.osparc-master.speag.com/portainer/api/endpoints/2/docker/services Authorization:"Bearer BEARER_CODE" limit==1 filters=='{"label":["user_id=5"]}'
sanderegg commented 1 year ago

this is now done for dynamic sidecars and we could finish this test

pcrespov commented 1 year ago

@sanderegg this is related, right?

Dear all , I have finally taken the time to complete the e2e test named check_all_puppeteer_services_gone by making the script fail when it finds containers owned by the puppeteer that should not be around. It works by leveraging the portainer API and asking for any container where the simcore_user_agent=puppeteer. This will still need some fine tuning, because it is now not able to differentiate between the different branches. I will check tomorrow with @maiz to see how this might go

sanderegg commented 1 month ago

this was discontinued. abandoning the case.