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

No json results from failed deploy #91

Open
morganalori opened this issue Jan 12, 2022 · 1 comment
Open

No json results from failed deploy #91

morganalori opened this issue Jan 12, 2022 · 1 comment

Comments

@morganalori
Copy link

When deploying to our development DNN, PolyDeploy failed to return the expected json results. Instead we got the and error
Received error {"Message":"Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property."}

Triaging the DNN Admin Logs discovered the deploy failure was due to sql timeout. When a DNN deploy fails due to sql timeout the entire sql file is added to the log message. It was a very large sql file. Because DNN includes the sql that failed to run in the error message, it exceeded PolyDeploy's ability to generate the results json. This prevented our pipeline from failing gracefully.

We've resolved this issue before by ensuring the serializer supports potentially large objects for serialization, as .net doesn't look at the server web.config for max size for json serialization
using Newtonsoft.Json; JavaScriptSerializer serializer = new JavaScriptSerializer { MaxJsonLength = int.MaxValue };

I'm requesting the results handling get the serialization intitalized to support large objects so when DNN fails for sql issues, the proper results can be passed back in the json

@bdukes
Copy link
Contributor

bdukes commented Jan 12, 2022

We would certainly accept a pull request that implemented this change. There's also work on a new Deploy Client that uses the new System.Text.Json serializer instead of JavaScriptSerializer, which will also resolve the issue once it's ready.

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

No branches or pull requests

2 participants