Skip to content

Comments

fix: fix supervisor env variables not being set#183

Merged
lfnovo merged 1 commit intomainfrom
supervisor_env
Oct 20, 2025
Merged

fix: fix supervisor env variables not being set#183
lfnovo merged 1 commit intomainfrom
supervisor_env

Conversation

@lfnovo
Copy link
Owner

@lfnovo lfnovo commented Oct 20, 2025

refers to #179

@claude
Copy link

claude bot commented Oct 20, 2025

Claude finished @lfnovo's task —— View job


Code Review

  • Read repository setup instructions (CLAUDE.md) - No CLAUDE.md found, proceeded with standard review
  • Analyze changed files and understand the fix
  • Review code quality and best practices
  • Check for potential bugs or issues
  • Evaluate performance considerations
  • Assess security concerns
  • Review test coverage
  • Provide comprehensive feedback

Summary

This PR fixes an issue with supervisor environment variables not being set, specifically for the frontend service. The changes are minimal and focused.

Code Quality & Best Practices ✅

Good practices observed:

  • Clean, focused commit addressing a single issue
  • Consistent configuration across both supervisor config files
  • Proper version bump in pyproject.toml (1.0.9 → 1.0.10)
  • Changes follow the existing configuration patterns

Changes Analysis

Core Fix (supervisord.conf:32 & supervisord.single.conf:44):

+passenv=API_URL,NEXT_PUBLIC_API_URL

Analysis:

  • Correct implementation: passenv is the proper supervisord directive to pass environment variables from the parent process to child processes
  • Appropriate variables: API_URL and NEXT_PUBLIC_API_URL are standard frontend environment variables
  • Consistency: Both config files updated identically

Potential Issues & Considerations

Minor concerns:

  1. Environment variable validation: No validation that these environment variables are actually set in the parent environment. Consider adding documentation about required environment variables.

  2. Configuration duplication: Having two nearly identical supervisor configs (supervisord.conf and supervisord.single.conf) increases maintenance overhead. Consider if these could be consolidated or if the differences are documented.

Security Assessment ✅

  • Low risk: Environment variable names are standard and non-sensitive
  • Good practice: Using passenv with explicit variable names rather than passenv=* (which would pass all variables)
  • No secrets exposed: Configuration doesn't contain hardcoded credentials

Performance Considerations ✅

  • Minimal impact: Adding passenv has negligible performance overhead
  • No additional processes: Change doesn't modify the service architecture

Test Coverage ⚠️

Missing elements:

  • No tests verify that environment variables are properly passed to the frontend service
  • No integration tests to ensure the API_URL configuration works end-to-end

Recommendations:

  • Consider adding a simple health check or integration test that verifies environment variables are accessible in the frontend service
  • Document the expected behavior when these variables are missing

Dependencies

uv.lock changes: Multiple package updates occurred (notably cyclopts, fastapi, langchain, etc.). These appear to be automatic dependency updates rather than intentional changes for this fix.

Recommendation: Consider separating dependency updates from bug fixes in future PRs for clearer change tracking.

Overall Assessment

Approved - This is a straightforward, well-implemented fix that addresses the environment variable issue correctly. The changes are minimal, focused, and follow supervisor best practices.

Minor suggestions for future improvements:

  1. Add documentation about required environment variables
  2. Consider adding integration tests for environment variable handling
  3. Separate dependency updates from bug fixes in future PRs

@lfnovo lfnovo merged commit 305c26f into main Oct 20, 2025
2 of 4 checks passed
@lfnovo lfnovo deleted the supervisor_env branch October 20, 2025 20:25
luisboullosa pushed a commit to luisboullosa/open-notebook that referenced this pull request Dec 14, 2025
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.

1 participant