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

Allow 1 as true value in environment variables #2710

Merged
merged 3 commits into from
Mar 24, 2023
Merged

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Mar 21, 2023

We currently only support the string true as a truthy boolean configuration value (case insensitive).

Our standard for APM Tracing configuration is actually to allow either true or 1.

This PR changes the logic to accept 1 as a valid true value for environment variable configuration.

There are no other functional changes to configuration parsing.

@marcotc marcotc requested a review from a team March 21, 2023 22:48
@marcotc marcotc self-assigned this Mar 21, 2023
@github-actions github-actions bot added the core Involves Datadog core libraries label Mar 21, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #2710 (84b3af3) into master (c8f02ef) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2710      +/-   ##
==========================================
- Coverage   98.06%   98.06%   -0.01%     
==========================================
  Files        1206     1206              
  Lines       66207    66212       +5     
  Branches     2958     2959       +1     
==========================================
+ Hits        64925    64928       +3     
- Misses       1282     1284       +2     
Impacted Files Coverage Δ
lib/datadog/core/environment/variable_helpers.rb 100.00% <100.00%> (ø)
.../datadog/core/environment/variable_helpers_spec.rb 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@marcotc marcotc merged commit 9880f39 into master Mar 24, 2023
@marcotc marcotc deleted the bool-flexible branch March 24, 2023 19:52
@github-actions github-actions bot added this to the 1.11.0 milestone Mar 24, 2023
@lloeki lloeki modified the milestones: 1.11.0, 1.11.0.beta1 Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants