Skip to content

feat: add UI warning for EnvironmentSet values#415

Merged
anirudhwarrier merged 2 commits into
mainfrom
DEVSVCS-4904/improve-env-messaging
May 7, 2026
Merged

feat: add UI warning for EnvironmentSet values#415
anirudhwarrier merged 2 commits into
mainfrom
DEVSVCS-4904/improve-env-messaging

Conversation

@anirudhwarrier
Copy link
Copy Markdown
Collaborator

DEVSVCS-4904

This pull request enhances environment configuration handling in internal/environments/environments.go by improving how environment variables are loaded and introducing clearer feedback for users when environment settings are overridden or missing. It also ensures warnings are only shown once per process.

Key improvements:

Environment variable handling and user feedback:

  • Refactored the way environment variables are loaded into the EnvironmentSet, reducing code duplication and making the logic clearer. Now, each variable is explicitly loaded and checked before assignment.
  • Added a mechanism to warn users (via ui.Warning) when specific environment variables are set, or when an unknown environment is requested. This helps users understand which configuration is active and if any overrides are in effect. Warnings are shown only once per process using sync.Once.

@anirudhwarrier anirudhwarrier marked this pull request as ready for review May 6, 2026 19:27
@anirudhwarrier anirudhwarrier requested a review from a team as a code owner May 6, 2026 19:27
Comment thread internal/environments/environments.go
Comment thread internal/environments/environments.go Outdated
@anirudhwarrier anirudhwarrier self-assigned this May 7, 2026
@anirudhwarrier anirudhwarrier added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit ac07afe May 7, 2026
22 checks passed
@anirudhwarrier anirudhwarrier deleted the DEVSVCS-4904/improve-env-messaging branch May 7, 2026 12:49
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.

3 participants