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

vdk-ingest-http: configurable allow JSON float NaN capability #725

Merged
merged 3 commits into from
Feb 22, 2022

Conversation

ivakoleva
Copy link
Contributor

Based on requests encoder/decoder default configuration, simplejson/json
is used to handle a specification compliant JSON by default. We need a
configurable allow NaN capability, so that when enabled, ingestion
payload NaN values are parsed correctly - instead raising ValueError
interrupting the ingestion.

Introduced INGEST_OVER_HTTP_ALLOW_NAN plugin configuration, that is
set to False by default.

Testing Done: did add
test_ingest_over_http_json_dumps_parameters_propagation that verifies
INGEST_OVER_HTTP_ALLOW_NAN configuration propagation to json.dumps

Signed-off-by: ikoleva [email protected]

Based on requests encoder/decoder default configuration, simplejson/json
is used to handle a specification compliant JSON by default. We need a
configurable allow NaN capability, so that when enabled, ingestion
payload NaN values are parsed correctly - instead raising ValueError
interrupting the ingestion.

Introduced `INGEST_OVER_HTTP_ALLOW_NAN` plugin configuration, that is
set to False by default.

Testing Done: did add
`test_ingest_over_http_json_dumps_parameters_propagation` that verifies
`INGEST_OVER_HTTP_ALLOW_NAN` configuration propagation to `json.dumps`

Signed-off-by: ikoleva <[email protected]>
@ivakoleva ivakoleva requested a review from doks5 February 21, 2022 19:41
Copy link
Contributor

@doks5 doks5 left a comment

Choose a reason for hiding this comment

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

Not all comments seem to have been addressed yet.

Based on requests encoder/decoder default configuration, simplejson/json
is used to handle a specification compliant JSON by default. We need a
configurable allow NaN capability, so that when enabled, ingestion
payload NaN values are parsed correctly - instead raising ValueError
interrupting the ingestion.

Introduced `INGEST_OVER_HTTP_ALLOW_NAN` plugin configuration, that is
set to False by default.

Testing Done: did add
`test_ingest_over_http_json_dumps_parameters_propagation` that verifies
`INGEST_OVER_HTTP_ALLOW_NAN` configuration propagation to `json.dumps`

Signed-off-by: ikoleva <[email protected]>
@ivakoleva ivakoleva requested a review from doks5 February 21, 2022 20:56
@ivakoleva ivakoleva merged commit a451c57 into main Feb 22, 2022
@ivakoleva ivakoleva deleted the person/ikoleva/vdk-ingest-http-allow-nan branch February 22, 2022 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants