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

[BUG]大场景导出 metersphere 格式,再导入报错,场景中接口的入参比较大,大于5M,都是 json #24810

Closed
shenkaibo opened this issue Jun 6, 2023 · 7 comments
Assignees
Labels
类型:缺陷 使用过程中出现不符合预期情况

Comments

@shenkaibo
Copy link
Contributor

联系方式

shenkaibo

MeterSphere 版本

v2.10-lts

使用外置数据库

问题描述

2023-06-04 11:48:02,622 [qtp1949430968-47608] ERROR i.m.s.scenario.ApiScenarioService 177 - Method[scenarioImport][java.lang.RuntimeException: com.fasterxml.jackson.core.exc.StreamConstraintsException: String length (5005744) exceeds the maximum length (5000000)]
java.lang.RuntimeException: java.lang.RuntimeException: com.fasterxml.jackson.core.exc.StreamConstraintsException: String length (5005744) exceeds the maximum length (5000000)

重现步骤

社区用户报错

期待的正确结果

No response

相关日志输出

No response

附加信息

No response

@github-actions github-actions bot added the 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 label Jun 6, 2023
@shenkaibo shenkaibo changed the title [BUG]场景导入报错 [BUG]大场景导出 metersphere 格式,再导入报错,场景中接口的入参比较大,都是 json Jun 6, 2023
@youliyuan-fit2cloud
Copy link

你好,请补充几个信息,这个大场景是多大?包括多少个请求?json文件有多大等等信息?

@github-actions github-actions bot added 状态:待用户反馈 and removed 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 labels Jun 6, 2023
@shenkaibo
Copy link
Contributor Author

场景私发你

@github-actions github-actions bot added 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 and removed 状态:待用户反馈 labels Jun 6, 2023
@youliyuan-fit2cloud youliyuan-fit2cloud added 类型:缺陷 使用过程中出现不符合预期情况 and removed 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 labels Jun 6, 2023
@youliyuan-fit2cloud youliyuan-fit2cloud added this to the v2.10.2-lts milestone Jun 6, 2023
@github-actions github-actions bot added the 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 label Jun 6, 2023
@github-actions github-actions bot removed the 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 label Jun 6, 2023
@shenkaibo
Copy link
Contributor Author

shenkaibo commented Jun 6, 2023

jackson-core-2.15.0 不支持修改 maximum length
FasterXML/jackson-core#1019
看起来 jackson-core-2.15.2 支持了 覆盖默认的 StreamReadConstraints 配置

@github-actions github-actions bot added the 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 label Jun 6, 2023
@shenkaibo shenkaibo reopened this Jun 6, 2023
@shenkaibo shenkaibo changed the title [BUG]大场景导出 metersphere 格式,再导入报错,场景中接口的入参比较大,都是 json [BUG]大场景导出 metersphere 格式,再导入报错,场景中接口的入参比较大,大于5M,都是 json Jun 6, 2023
@youliyuan-fit2cloud youliyuan-fit2cloud removed the 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 label Jun 7, 2023
@shenkaibo
Copy link
Contributor Author

shenkaibo commented Jun 7, 2023

单独替换 api-test 容器 /app/lib 下的 jackson-core-2.15.0.jar 为 jackson-core-2.15.2.jar, 可以临时解决这个问题

@github-actions github-actions bot added the 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 label Jun 7, 2023
@youliyuan-fit2cloud youliyuan-fit2cloud removed the 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 label Jun 7, 2023
@shenkaibo
Copy link
Contributor Author

shenkaibo commented Jun 19, 2023

@youliyuan-fit2cloud 这个改完 能支持可配置么,目前 jackson-core-2.15.2 的话 最大默认是 20M,我们这里 有大于 20M 的 json 需求, jackson-core-2.15.2 支持可配置 大小,建议我们也做成可配置的。
b121d2b5e7efa09a32a2dc2cf17b207

@github-actions github-actions bot added the 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 label Jun 19, 2023
@youliyuan-fit2cloud
Copy link

经过内部讨论,目前不支持可配置。即,不会单独去升级某个包,会随着框架一起升级。当前临时解决方案即可。感谢理解和支持~

@youliyuan-fit2cloud youliyuan-fit2cloud removed this from the v2.10.2-lts milestone Jun 20, 2023
@github-actions github-actions bot added 状态:待用户反馈 and removed 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 labels Jun 20, 2023
@shenkaibo
Copy link
Contributor Author

shenkaibo commented Jun 20, 2023

经过内部讨论,目前不支持可配置。即,不会单独去升级某个包,会随着框架一起升级。当前临时解决方案即可。感谢理解和支持~

现在我们替换包 jackson-core-2.15.2 最大只支持到 20M ,目前这里有大于 20 M 解析的需求,这个目前暂时还解决不了。

@github-actions github-actions bot added 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 and removed 状态:待用户反馈 labels Jun 20, 2023
@youliyuan-fit2cloud youliyuan-fit2cloud removed the 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 label Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
类型:缺陷 使用过程中出现不符合预期情况
Projects
None yet
Development

No branches or pull requests

2 participants