Skip to content

commander: serialize environment variables as a dict - #4072

Merged
joaoantoniocardoso merged 1 commit into
bluerobotics:masterfrom
nicoschmdt:fix-commander
Jul 31, 2026
Merged

commander: serialize environment variables as a dict#4072
joaoantoniocardoso merged 1 commit into
bluerobotics:masterfrom
nicoschmdt:fix-commander

Conversation

@nicoschmdt

Copy link
Copy Markdown
Collaborator

Without this commander throws a serialization error in the terminal

@github-actions

Copy link
Copy Markdown

Automated PR Review

0. Summary

  • Verdict: MINOR SUGGESTIONS ✏️

Fixes the /environment_variables endpoint in core/services/commander/main.py by wrapping os.environ (an os._Environ mapping, not a plain dict) in dict(...) so FastAPI can serialize it, and tightens the return annotation from Any to Dict[str, Any].

6. Code Quality & Style

  • 6.1 [nit] core/services/commander/main.py:266os.environ values are always str, so Dict[str, str] is strictly more accurate than Dict[str, Any] and would give call sites better type information without changing runtime behavior.

Generated by PR Review Bot. This is advisory, a human reviewer must still approve.

@joaoantoniocardoso joaoantoniocardoso left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good catch. It was showing Could not get environment variables: [object Object]. on the frontend as well.

@joaoantoniocardoso
joaoantoniocardoso merged commit f6334ce into bluerobotics:master Jul 31, 2026
8 checks passed
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