Skip to content

Fix system ini handling of invalid values in zai config - #1982

Merged
bwoebi merged 1 commit into
masterfrom
bob/fix-invalid-system-ini-parsing
Mar 21, 2023
Merged

Fix system ini handling of invalid values in zai config#1982
bwoebi merged 1 commit into
masterfrom
bob/fix-invalid-system-ini-parsing

Conversation

@bwoebi

@bwoebi bwoebi commented Mar 21, 2023

Copy link
Copy Markdown
Collaborator

Description

Also handle the special case of the empty string in the profiling log level parser because of an unquoted "off" in ini becoming an empty string.

Readiness checklist

  • (only for Members) Changelog has been added to the release document.
  • Tests added for this feature/bug.

Reviewer checklist

  • Appropriate labels assigned.
  • Milestone is set.
  • Changelog has been added to the release document. For community contributors the reviewer is in charge of this task.

@bwoebi bwoebi added this to the 0.86.0 milestone Mar 21, 2023
@bwoebi
bwoebi requested review from a team as code owners March 21, 2023 00:44
Also handle the special case of the empty string in the profiling log level parser because of an unquoted "off" in ini becoming an empty string.

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
@bwoebi
bwoebi force-pushed the bob/fix-invalid-system-ini-parsing branch from 3db1efa to 4b457d8 Compare March 21, 2023 00:50
@morrisonlevi

Copy link
Copy Markdown
Collaborator

For historical reference, this came up specifically when testing:

; 98-ddtrace.ini
datadog.profiling.log_level=true

; 99-whatever.ini
datadog.profiling.log_level=off

And I got a warning in the profiler:

[2023-03-20T22:54:55.430860Z WARN  datadog_php_profiling::config] zval of type 15 encountered when calling config::profiling_log_level(), expected type int (4)

Thanks, @bwoebi, for fixing this so quickly.

@bwoebi
bwoebi merged commit 1175943 into master Mar 21, 2023
@bwoebi
bwoebi deleted the bob/fix-invalid-system-ini-parsing branch March 21, 2023 11:29
@Anilm3 Anilm3 mentioned this pull request Mar 22, 2023
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.

2 participants