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

refactor compiler configs so strict deserialization can be turned on #869

Open
wilbaker opened this issue Mar 6, 2024 · 2 comments
Open
Labels
bug Something isn't working regression Regression bug.

Comments

@wilbaker
Copy link
Member

wilbaker commented Mar 6, 2024

Description

After picking up the latest RESTler, compilation is failing with the message:

ERROR: Deserialization exception: "An exception occurred during deserialization: Newtonsoft.Json.JsonSerializationException: Required property 'IncludeOptionalParameters' not found in JSON. Path '', line 8, position 1.

Previously IncludeOptionalParameters was considered optional, and https://github.com/microsoft/restler-fuzzer/blob/main/docs/user-guide/CompilerConfig.md mentions this config has a default value:

IncludeOptionalParameters True by default. When false, RESTler will only pass required parameters when trying to successfully exercise each request.

My best guess is this was introduced by #852, as this was not an error I was seeing before.

Steps to reproduce

Attempt to compile with a config that does not include IncludeOptionalParameters

Expected results

Compilation succeeds (or documentation indicates that this field is required).

Actual results

Compilation fails with the message:

ERROR: Invalid format for compiler config file config.json. Please refer to the documentation for the compiler config file format.

ERROR: Deserialization exception: "An exception occurred during deserialization: Newtonsoft.Json.JsonSerializationException: Required property 'IncludeOptionalParameters' not found in JSON. Path '', line 8, position 1.

Environment details

RESTler version 9.2.4

@marina-p marina-p self-assigned this Mar 6, 2024
@marina-p marina-p added bug Something isn't working regression Regression bug. labels Mar 6, 2024
@marina-p
Copy link
Contributor

marina-p commented Mar 6, 2024

Reverted the deserialization commit and updated the tags so this is no longer in the official 9.2.4 version.

@marina-p
Copy link
Contributor

marina-p commented Mar 6, 2024

Leaving the issue open to track that the deserialization change should be merged after refactoring the compiler config to match the documented optional parameters and adding regression tests to cover the config deserialization.

@marina-p marina-p removed their assignment Mar 6, 2024
@marina-p marina-p changed the title Compiler configs that don't include optional IncludeOptionalParameters key are causing failures in RESTler 9.2.4 refactor compiler configs so strict deserialization can be turned on Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression Regression bug.
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants