Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add development environment variable #214

Closed
wants to merge 2 commits into from

Conversation

httpsmenahassan
Copy link
Contributor

Resolves #210

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c44db75) 96.46% compared to head (f7238ba) 96.46%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #214   +/-   ##
=======================================
  Coverage   96.46%   96.46%           
=======================================
  Files         195      195           
  Lines        1839     1839           
  Branches      322      322           
=======================================
  Hits         1774     1774           
  Misses         60       60           
  Partials        5        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

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

Great, thanks!

Copy link
Contributor

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

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

Just one thing, as commented above.

.env.development Outdated Show resolved Hide resolved
@brian-smith-tcril
Copy link
Contributor

@arbrandes I just tried this locally with EXPERIMENT_08_23_VAN_PAINTED_DOOR=false and I ran into the same TypeError

I also got the TypeError when changing this line

if (process.env.EXPERIMENT_08_23_VAN_PAINTED_DOOR) {

to be

if (false) {

I'm doing a bit more digging now

@brian-smith-tcril
Copy link
Contributor

I think #218 should do the trick

@httpsmenahassan
Copy link
Contributor Author

@brian-smith-tcril thanks for digging into this, Brian! I'll take a look at your PR

@brian-smith-tcril
Copy link
Contributor

To follow up on this, I tried EXPERIMENT_08_23_VAN_PAINTED_DOOR=false again today and no longer could reproduce the error. I set a breakpoint

if (process.env.EXPERIMENT_08_23_VAN_PAINTED_DOOR) {

and saw process.env.EXPERIMENT_08_23_VAN_PAINTED_DOOR evaluating to true

I'm not sure what magic I did on Friday to get strings to parse as bools, but it doesn't seem to be working now (all non-empty strings are being treated as true)

When I set EXPERIMENT_08_23_VAN_PAINTED_DOOR='' instead, process.env.EXPERIMENT_08_23_VAN_PAINTED_DOOR evaluated to false and I got to the same TypeError

@arbrandes arbrandes added the needs maintainer attention Issue or PR specifically needs the attention of the maintainer. label Oct 17, 2023
@justinhynes
Copy link
Contributor

I'll be bringing this PR our next team refinement session for prioritization.

@jsnwesson
Copy link
Contributor

Hey @brian-smith-tcril and @arbrandes, Team Aperture was originally assigned needs maintainer attention for both this PR and #218 , but according to Brian's comment above, #218 would make this PR redundant. If that is the case, should we only review #218 (as in only have that PR reviewed by the team responsible for the experiment)?

@brian-smith-tcril
Copy link
Contributor

@jsnwesson I think reviewing #218 first makes sense. If that solution is seen as problematic for some reason then this PR should be merged as a workaround until a better solution is agreed upon.

@arbrandes
Copy link
Contributor

#218 was merged. Do we still need this?

@brian-smith-tcril
Copy link
Contributor

@arbrandes

Do we still need this?

nope! #218 should do the trick!

@httpsmenahassan
Copy link
Contributor Author

Thanks, everyone! I'll go ahead and close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs maintainer attention Issue or PR specifically needs the attention of the maintainer.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Uncaught TypeError if undocumented environment variable is unset
6 participants