Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

chore(config): clarify env var already registered panic#63784

Merged
jhchabran merged 1 commit into
mainfrom
jh/fix-envflag-panic-desc
Jul 11, 2024
Merged

chore(config): clarify env var already registered panic#63784
jhchabran merged 1 commit into
mainfrom
jh/fix-envflag-panic-desc

Conversation

@jhchabran

@jhchabran jhchabran commented Jul 11, 2024

Copy link
Copy Markdown
Contributor

When internal/env/env.Get detects a difference in between already registered descriptions, it panics (good). But the error message doesn't tell you what's the difference and you're left out to put a few prints for yourself in the code to try to understand what's wrong.

See also: https://github.com/sourcegraph/sourcegraph/pull/63786

Before:

image

After:

CleanShot 2024-07-11 at 15 26 13@2x

Test plan

CI + local run

Changelog

  • When conflicting env var are detected, print the two to ease debugging.

@cla-bot cla-bot Bot added the cla-signed label Jul 11, 2024
@jhchabran jhchabran force-pushed the jh/fix-envflag-panic-desc branch from dfc0843 to 5ab4ce3 Compare July 11, 2024 13:47
@jhchabran jhchabran marked this pull request as ready for review July 11, 2024 13:50
@jhchabran jhchabran requested review from a team and eseliger July 11, 2024 13:50
@jhchabran jhchabran enabled auto-merge (squash) July 11, 2024 13:56
@jhchabran jhchabran merged commit ec34a90 into main Jul 11, 2024
@jhchabran jhchabran deleted the jh/fix-envflag-panic-desc branch July 11, 2024 13:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants