-
Notifications
You must be signed in to change notification settings - Fork 32
🐛 fixes issue with agent not executing in correct container #8256
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
🐛 fixes issue with agent not executing in correct container #8256
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue where the agent was not executing commands in the correct container due to hostname changes that no longer match container IDs. The fix replaces the hostname-based container identification with a Docker API-based approach that dynamically determines the container ID by matching the container's IP address.
Key changes:
- Replace hostname-based container identification with Docker socket API lookup
- Add IP-based container resolution using Docker's
/containers/jsonendpoint - Update tests to mock the new container identification logic
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
services/agent/src/simcore_service_agent/services/backup.py |
Implements new container ID resolution using Docker API and IP matching instead of hostname |
services/agent/tests/unit/test_services_backup.py |
Updates test fixtures and adds mocking for the new container IP resolution logic |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8256 +/- ##
===========================================
- Coverage 88.02% 66.79% -21.24%
===========================================
Files 1919 765 -1154
Lines 74311 34976 -39335
Branches 1305 175 -1130
===========================================
- Hits 65415 23363 -42052
- Misses 8503 11556 +3053
+ Partials 393 57 -336
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
Thanks for a fix 🙏 Could you also explain, why so many logs were generated? (200_000 in 5 min) Out of curiosity |
@YuryHrytsuk Because it's trying to remove 4 x number of volumes. So I think it can't remove volumes since quite a while that's why there are so many logs |
🧪 CI InsightsHere's what we observed from your CI run for 9b41a31. ✅ Passed Jobs With Interesting Signals
|
Thanks for explanation! Is there a way to avoid this behaviour? So that we do not generate hundeds of thousands of logs in couple of minutes if this goes wrong? |



What do these changes do?
Since the hostname is no longer the same as the ID of the container the command was not executed in the correct runtime.
Related issue/s
How to test
Dev-ops