Skip to content

refactor: Enhance EnvManager to preserve unmanaged .env variables during save#1069

Merged
ricofurtado merged 5 commits into
mainfrom
1014-cannot-register-api-key-without-certain-envs
Mar 10, 2026
Merged

refactor: Enhance EnvManager to preserve unmanaged .env variables during save#1069
ricofurtado merged 5 commits into
mainfrom
1014-cannot-register-api-key-without-certain-envs

Conversation

@ricofurtado

Copy link
Copy Markdown
Collaborator

Improve the EnvManager functionality to ensure that unmanaged .env variables are retained when saving configurations.

@github-actions github-actions Bot added backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) tests labels Mar 5, 2026
@ricofurtado ricofurtado self-assigned this Mar 5, 2026
@ricofurtado ricofurtado requested a review from Copilot March 5, 2026 18:59
@ricofurtado ricofurtado changed the title Enhance EnvManager to preserve unmanaged .env variables during save fix: Enhance EnvManager to preserve unmanaged .env variables during save Mar 5, 2026
@github-actions github-actions Bot added the bug 🔴 Something isn't working. label Mar 5, 2026
@ricofurtado ricofurtado changed the title fix: Enhance EnvManager to preserve unmanaged .env variables during save refactor: Enhance EnvManager to preserve unmanaged .env variables during save Mar 5, 2026
@github-actions github-actions Bot added refactor and removed bug 🔴 Something isn't working. labels Mar 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tui/managers/env_manager.py
Comment thread tests/unit/test_env_manager.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tui/managers/env_manager.py
Comment thread tests/unit/test_env_manager.py

@mpawlow mpawlow left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@ricofurtado

Code Review 1

  • ✅ Approved / LGTM
  • See: PR comment (1a)
    • Minor severity

Comment thread src/tui/managers/env_manager.py Outdated
@github-actions github-actions Bot added the lgtm label Mar 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/unit/test_env_manager.py Outdated
Comment thread src/tui/managers/env_manager.py
Comment on lines +135 to +137
# Managed password should be updated, not duplicated.
assert 'OPENSEARCH_PASSWORD="NewSecurePass!456"' in content
assert 'OPENSEARCH_PASSWORD="old-password"' not in content

Copilot AI Mar 9, 2026

Copy link

Choose a reason for hiding this comment

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

These tests expect OPENSEARCH_PASSWORD to be written with double quotes, but EnvManager._quote_env_value() always single-quotes values. As written, the assertion for the new password will fail (the file will contain OPENSEARCH_PASSWORD='NewSecurePass!456'). Update the test expectations to match the single-quote format, or change the production quoting behavior consistently across all variables.

Copilot uses AI. Check for mistakes.
Comment thread tests/unit/test_env_manager.py
@github-actions github-actions Bot added refactor and removed refactor labels Mar 9, 2026
@ricofurtado ricofurtado merged commit b5cf547 into main Mar 10, 2026
11 checks passed
@github-actions github-actions Bot deleted the 1014-cannot-register-api-key-without-certain-envs branch March 10, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) lgtm refactor tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants