Skip to content

Fix issue of replacing the exiting env#31

Merged
openminddev merged 3 commits intomainfrom
fix-issue-of-replacing-the-exiting-env
Feb 20, 2026
Merged

Fix issue of replacing the exiting env#31
openminddev merged 3 commits intomainfrom
fix-issue-of-replacing-the-exiting-env

Conversation

@YuchengZhou821
Copy link
Contributor

This pull request updates the logic for retrieving environment variables for containers in OTA/agent/main.py. The method now combines environment variables from both Docker inspect and the .env file, providing a more comprehensive and robust approach.

Improvements to environment variable retrieval:

  • The _get_container_env_vars method now fetches environment variables using docker inspect in addition to reading from the .env file, then combines both sources. This ensures that all relevant environment variables are captured, even if they are set at runtime or differ from the .env file. [1] [2]
  • Improved error handling for the Docker inspect process, logging warnings if the command fails or times out.
  • Updated the method docstring and return value description to reflect the new combined approach. [1] [2]

@openminddev openminddev merged commit db287d1 into main Feb 20, 2026
5 checks passed
@openminddev openminddev deleted the fix-issue-of-replacing-the-exiting-env branch February 20, 2026 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants