You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/06/29 12:31:42 UTC

[GitHub] [incubator-dolphinscheduler] muzhongjiang opened a new pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

muzhongjiang opened a new pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078


   
   ## fixed bug "jackson enum conversion : InvalidFormatException"
   
   **[ERROR]** 2020-06-29 20:02:08.580 org.apache.dolphinscheduler.common.utils.JSONUtils:[109] - parse object exception!
   com.fasterxml.jackson.databind.exc.**InvalidFormatException: Cannot deserialize value of type `org.apache.dolphinscheduler.common.enums.TaskTimeoutStrategy` from String "": value not one of declared Enum instance names: [WARNFAILED, FAILED, WARN]**
    at [Source: (String)"**{"strategy":"","interval":null,"enable":false}**"; line: 1, column: 13] (through reference chain: org.apache.dolphinscheduler.common.task.TaskTimeoutParameter["strategy"])
   	at com.fasterxml.jackson.databind.exc.InvalidFormatException.from(InvalidFormatException.java:67)
   	at com.fasterxml.jackson.databind.DeserializationContext.weirdStringException(DeserializationContext.java:1549)
   	at com.fasterxml.jackson.databind.DeserializationContext.handleWeirdStringValue(DeserializationContext.java:911)
   	at com.fasterxml.jackson.databind.deser.std.EnumDeserializer._deserializeAltString(EnumDeserializer.java:255)
   	at com.fasterxml.jackson.databind.deser.std.EnumDeserializer.deserialize(EnumDeserializer.java:179)
   	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:127)
   	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
   	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
   	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4013)
   	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3004)
   	at org.apache.dolphinscheduler.common.utils.JSONUtils.parseObject(JSONUtils.java:107)
   
   ## Verify this pull request
   ![image](https://user-images.githubusercontent.com/7700151/86005608-6f3e0000-ba47-11ea-854d-e3c465b4e469.png)
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] dailidong commented on pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
dailidong commented on pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078#issuecomment-652913710


   I think this fix PR will make the program more robust, and it's not big problem


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078#issuecomment-652856096


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100.png' alt='100.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3078&metric=new_coverage&view=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3078&metric=new_coverage&view=list)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3078&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3078&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] dailidong commented on pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
dailidong commented on pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078#issuecomment-652915598


   fastjson will be removed from DolphinScheduler


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] muzhongjiang commented on pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
muzhongjiang commented on pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078#issuecomment-651134859


   > Hi,
   > You can check this same error issue [1], and which branch of you error.
   > In my opinion, if this error is actually happened in program, we should fix it in front-end but not back-end Jackson serde function, because it should throw exception when deserialize from an empty string enum json string.
   > 
   > 你可以看下 [1] 中的issue,也是同样的问题。你的分支是哪个分支呢?
   > 个人理解,如果这个错误确实存在,我理解我们最好应该在前端向后端传参时就避免这个问题,如果后端在序列化上去处理这个问题的话,可能会导致吞掉一些其他枚举类型在序列化时本应该抛出来的错误。
   > 
   > [1] #3028
   
   
   
   After testing 1.3.0 Release version does not have this problem, dev has this problem.
   This is because the fastjson used in 1.3.0 Release is adapted to the deserialization of enum.
   Now replacing it with jackson should ensure that the function is consistent with the Release version, so the configuration item READ_UNKNOWN_ENUM_VALUES_AS_NULL is opened
   
   经过测试 1.3.0 Release 版本没有这个问题,dev 有这个问题。
   是因为 1.3.0 Release 用的 fastjson,fastjson对 enum 反序列化做了适配。
   现在替换为 jackson 应该保证功能和Release版本一致,所以打开了这个配置项READ_UNKNOWN_ENUM_VALUES_AS_NULL
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] dailidong commented on pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
dailidong commented on pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078#issuecomment-652911753


   as a global project, English is our official language


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] yangyichao-mango edited a comment on pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
yangyichao-mango edited a comment on pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078#issuecomment-651539819


   > > Hi,
   > > You can check this same error issue [1], and which branch of you error.
   > > In my opinion, if this error is actually happened in program, we should fix it in front-end but not back-end Jackson serde function, because it should throw exception when deserialize from an empty string enum json string.
   > > 你可以看下 [1] 中的issue,也是同样的问题。你的分支是哪个分支呢?
   > > 个人理解,如果这个错误确实存在,我理解我们最好应该在前端向后端传参时就避免这个问题,如果后端在序列化上去处理这个问题的话,可能会导致吞掉一些其他枚举类型在序列化时本应该抛出来的错误。
   > > [1] #3028
   > 
   > After testing 1.3.0 Release version does not have this problem, dev has this problem.
   > This is because the fastjson used in 1.3.0 Release is adapted to the deserialization of enum.
   > Now replacing it with jackson should ensure that the function is consistent with the Release version, so the configuration item READ_UNKNOWN_ENUM_VALUES_AS_NULL is opened
   > 
   > 经过测试 1.3.0 Release 版本没有这个问题,dev 有这个问题。
   > 是因为 1.3.0 Release 用的 fastjson,fastjson对 enum 反序列化做了适配。
   > 现在替换为 jackson 应该保证功能和Release版本一致,所以打开了这个配置项READ_UNKNOWN_ENUM_VALUES_AS_NULL
   
   Hi, thx a lot for your work.
   I've checked this error, it is fastjson adapted to the deserialization of enum.
   In my opinion,
   1. I think it's not appropriate to adapted when the read the unknown enum value and return null because it will swallow all the enum deserialization error by using `JSONUtils` and cause some unforeseen errors;
   2. And in general, this kind of data error due to the front-end transmission should be fail fast, and not suitable for subsequent adaptation;
   Can you help to fix this in the transmission part of the front-end ?
   
   我也检查了一遍,确实是fastjson在反序列化时做了适配。
   个人理解,
   1. 这样的适配的应该是没有必要的,因为这样的适配会导致所有用到`JSONUtils`的枚举值序列化错误都会被吞掉,可能会导致一些不可预见的错误;
   2. 一般情况下这类由于前端传输的数据错误应该都是fail-fast的,而不适合后续去做适配;
   你可以从前端传输数据的角度去修复这个问题,把这种情况避免吗?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] removed a comment on pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078#issuecomment-651094720


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100.png' alt='100.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3078&metric=new_coverage&view=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3078&metric=new_coverage&view=list)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3078&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3078&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] dailidong edited a comment on pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
dailidong edited a comment on pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078#issuecomment-652915598


   By the way , fastjson will be removed from DolphinScheduler


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] yangyichao-mango commented on pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
yangyichao-mango commented on pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078#issuecomment-651539819


   > > Hi,
   > > You can check this same error issue [1], and which branch of you error.
   > > In my opinion, if this error is actually happened in program, we should fix it in front-end but not back-end Jackson serde function, because it should throw exception when deserialize from an empty string enum json string.
   > > 你可以看下 [1] 中的issue,也是同样的问题。你的分支是哪个分支呢?
   > > 个人理解,如果这个错误确实存在,我理解我们最好应该在前端向后端传参时就避免这个问题,如果后端在序列化上去处理这个问题的话,可能会导致吞掉一些其他枚举类型在序列化时本应该抛出来的错误。
   > > [1] #3028
   > 
   > After testing 1.3.0 Release version does not have this problem, dev has this problem.
   > This is because the fastjson used in 1.3.0 Release is adapted to the deserialization of enum.
   > Now replacing it with jackson should ensure that the function is consistent with the Release version, so the configuration item READ_UNKNOWN_ENUM_VALUES_AS_NULL is opened
   > 
   > 经过测试 1.3.0 Release 版本没有这个问题,dev 有这个问题。
   > 是因为 1.3.0 Release 用的 fastjson,fastjson对 enum 反序列化做了适配。
   > 现在替换为 jackson 应该保证功能和Release版本一致,所以打开了这个配置项READ_UNKNOWN_ENUM_VALUES_AS_NULL
   
   Hi, thx a lot for your work.
   I've checked this error, it is fastjson adapted to the deserialization of enum.
   In my opinion,
   1. I think it's not appropriate to adapted when the read the unknown enum value and return null because it will swallow all the enum deserialization error by using `JSONUtils` and cause some unforeseen errors;
   2.And in general, this kind of data error due to the front-end transmission should be fail fast, and not suitable for subsequent adaptation;
   Can you help to fix this in the transmission part of the front-end ?
   
   我也检查了一遍,确实是fastjson在反序列化时做了适配。
   个人理解,
   1. 这样的适配的应该是没有必要的,因为这样的适配会导致所有用到`JSONUtils`的枚举值序列化错误都会被吞掉,可能会导致一些不可预见的错误;
   2. 一般情况下这类由于前端传输的数据错误应该都是fail-fast的,而不适合后续去做适配;
   你可以从前端传输数据的角度去修复这个问题,把这种情况避免吗?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] sonarcloud[bot] commented on pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078#issuecomment-651094720


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=3078&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100.png' alt='100.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3078&metric=new_coverage&view=list) [100.0% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3078&metric=new_coverage&view=list)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3078&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=3078&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] yangyichao-mango commented on pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
yangyichao-mango commented on pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078#issuecomment-651103351


   Hi,
   You can check this same error issue [1], and which branch of you error.
   In my opinion, if this error is actually happened in program, we should fix it in front-end but not back-end Jackson serde function, because it should throw exception when deserialize from an empty string enum json string.
   
   你可以看下 [1] 中的issue,也是同样的问题。你的分支是哪个分支呢?
   个人理解,如果这个错误确实存在,我理解我们最好应该在前端向后端传参时就避免这个问题,如果后端在序列化上去处理这个问题的话,可能会导致吞掉一些其他枚举类型在序列化时本应该抛出来的错误。
   
   [1] https://github.com/apache/incubator-dolphinscheduler/issues/3028


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] muzhongjiang removed a comment on pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
muzhongjiang removed a comment on pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078#issuecomment-651584535


   > > > Hi,
   > > > You can check this same error issue [1], and which branch of you error.
   > > > In my opinion, if this error is actually happened in program, we should fix it in front-end but not back-end Jackson serde function, because it should throw exception when deserialize from an empty string enum json string.
   > > > 你可以看下 [1] 中的issue,也是同样的问题。你的分支是哪个分支呢?
   > > > 个人理解,如果这个错误确实存在,我理解我们最好应该在前端向后端传参时就避免这个问题,如果后端在序列化上去处理这个问题的话,可能会导致吞掉一些其他枚举类型在序列化时本应该抛出来的错误。
   > > > [1] #3028
   > > 
   > > 
   > > After testing 1.3.0 Release version does not have this problem, dev has this problem.
   > > This is because the fastjson used in 1.3.0 Release is adapted to the deserialization of enum.
   > > Now replacing it with jackson should ensure that the function is consistent with the Release version, so the configuration item READ_UNKNOWN_ENUM_VALUES_AS_NULL is opened
   > > 经过测试 1.3.0 Release 版本没有这个问题,dev 有这个问题。
   > > 是因为 1.3.0 Release 用的 fastjson,fastjson对 enum 反序列化做了适配。
   > > 现在替换为 jackson 应该保证功能和Release版本一致,所以打开了这个配置项READ_UNKNOWN_ENUM_VALUES_AS_NULL
   > 
   > Hi, thx a lot for your work.
   > I've checked this error, it is fastjson adapted to the deserialization of enum.
   > In my opinion,
   > 
   > 1. I think it's not appropriate to adapted when the read the unknown enum value and return null because it will swallow all the enum deserialization error by using `JSONUtils` and cause some unforeseen errors;
   > 2. And in general, this kind of data error due to the front-end transmission should be fail fast, and not suitable for subsequent adaptation;
   >    Can you help to fix this in the transmission part of the front-end ?
   > 
   > 我也检查了一遍,确实是fastjson在反序列化时做了适配。
   > 个人理解,
   > 
   > 1. 这样的适配的应该是没有必要的,因为这样的适配会导致所有用到`JSONUtils`的枚举值序列化错误都会被吞掉,可能会导致一些不可预见的错误;
   > 2. 一般情况下这类由于前端传输的数据错误应该都是fail-fast的,而不适合后续去做适配;
   >    你可以从前端传输数据的角度去修复这个问题,把这种情况避免吗?
   
   
   
   > > > Hi,
   > > > You can check this same error issue [1], and which branch of you error.
   > > > In my opinion, if this error is actually happened in program, we should fix it in front-end but not back-end Jackson serde function, because it should throw exception when deserialize from an empty string enum json string.
   > > > 你可以看下 [1] 中的issue,也是同样的问题。你的分支是哪个分支呢?
   > > > 个人理解,如果这个错误确实存在,我理解我们最好应该在前端向后端传参时就避免这个问题,如果后端在序列化上去处理这个问题的话,可能会导致吞掉一些其他枚举类型在序列化时本应该抛出来的错误。
   > > > [1] #3028
   > > 
   > > 
   > > After testing 1.3.0 Release version does not have this problem, dev has this problem.
   > > This is because the fastjson used in 1.3.0 Release is adapted to the deserialization of enum.
   > > Now replacing it with jackson should ensure that the function is consistent with the Release version, so the configuration item READ_UNKNOWN_ENUM_VALUES_AS_NULL is opened
   > > 经过测试 1.3.0 Release 版本没有这个问题,dev 有这个问题。
   > > 是因为 1.3.0 Release 用的 fastjson,fastjson对 enum 反序列化做了适配。
   > > 现在替换为 jackson 应该保证功能和Release版本一致,所以打开了这个配置项READ_UNKNOWN_ENUM_VALUES_AS_NULL
   > 
   > Hi, thx a lot for your work.
   > I've checked this error, it is fastjson adapted to the deserialization of enum.
   > In my opinion,
   > 
   > 1. I think it's not appropriate to adapted when the read the unknown enum value and return null because it will swallow all the enum deserialization error by using `JSONUtils` and cause some unforeseen errors;
   > 2. And in general, this kind of data error due to the front-end transmission should be fail fast, and not suitable for subsequent adaptation;
   >    Can you help to fix this in the transmission part of the front-end ?
   > 
   > 我也检查了一遍,确实是fastjson在反序列化时做了适配。
   > 个人理解,
   > 
   > 1. 这样的适配的应该是没有必要的,因为这样的适配会导致所有用到`JSONUtils`的枚举值序列化错误都会被吞掉,可能会导致一些不可预见的错误;
   > 2. 一般情况下这类由于前端传输的数据错误应该都是fail-fast的,而不适合后续去做适配;
   >    你可以从前端传输数据的角度去修复这个问题,把这种情况避免吗?
   
   
   
   这是两个不冲突的步骤。恕我直言,不认可你的 “个人理解”
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] dailidong merged pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
dailidong merged pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-dolphinscheduler] muzhongjiang commented on pull request #3078: [bugfix] fixed "jackson enum conversion : InvalidFormatException"

Posted by GitBox <gi...@apache.org>.
muzhongjiang commented on pull request #3078:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/3078#issuecomment-651584535


   > > > Hi,
   > > > You can check this same error issue [1], and which branch of you error.
   > > > In my opinion, if this error is actually happened in program, we should fix it in front-end but not back-end Jackson serde function, because it should throw exception when deserialize from an empty string enum json string.
   > > > 你可以看下 [1] 中的issue,也是同样的问题。你的分支是哪个分支呢?
   > > > 个人理解,如果这个错误确实存在,我理解我们最好应该在前端向后端传参时就避免这个问题,如果后端在序列化上去处理这个问题的话,可能会导致吞掉一些其他枚举类型在序列化时本应该抛出来的错误。
   > > > [1] #3028
   > > 
   > > 
   > > After testing 1.3.0 Release version does not have this problem, dev has this problem.
   > > This is because the fastjson used in 1.3.0 Release is adapted to the deserialization of enum.
   > > Now replacing it with jackson should ensure that the function is consistent with the Release version, so the configuration item READ_UNKNOWN_ENUM_VALUES_AS_NULL is opened
   > > 经过测试 1.3.0 Release 版本没有这个问题,dev 有这个问题。
   > > 是因为 1.3.0 Release 用的 fastjson,fastjson对 enum 反序列化做了适配。
   > > 现在替换为 jackson 应该保证功能和Release版本一致,所以打开了这个配置项READ_UNKNOWN_ENUM_VALUES_AS_NULL
   > 
   > Hi, thx a lot for your work.
   > I've checked this error, it is fastjson adapted to the deserialization of enum.
   > In my opinion,
   > 
   > 1. I think it's not appropriate to adapted when the read the unknown enum value and return null because it will swallow all the enum deserialization error by using `JSONUtils` and cause some unforeseen errors;
   > 2. And in general, this kind of data error due to the front-end transmission should be fail fast, and not suitable for subsequent adaptation;
   >    Can you help to fix this in the transmission part of the front-end ?
   > 
   > 我也检查了一遍,确实是fastjson在反序列化时做了适配。
   > 个人理解,
   > 
   > 1. 这样的适配的应该是没有必要的,因为这样的适配会导致所有用到`JSONUtils`的枚举值序列化错误都会被吞掉,可能会导致一些不可预见的错误;
   > 2. 一般情况下这类由于前端传输的数据错误应该都是fail-fast的,而不适合后续去做适配;
   >    你可以从前端传输数据的角度去修复这个问题,把这种情况避免吗?
   
   
   
   > > > Hi,
   > > > You can check this same error issue [1], and which branch of you error.
   > > > In my opinion, if this error is actually happened in program, we should fix it in front-end but not back-end Jackson serde function, because it should throw exception when deserialize from an empty string enum json string.
   > > > 你可以看下 [1] 中的issue,也是同样的问题。你的分支是哪个分支呢?
   > > > 个人理解,如果这个错误确实存在,我理解我们最好应该在前端向后端传参时就避免这个问题,如果后端在序列化上去处理这个问题的话,可能会导致吞掉一些其他枚举类型在序列化时本应该抛出来的错误。
   > > > [1] #3028
   > > 
   > > 
   > > After testing 1.3.0 Release version does not have this problem, dev has this problem.
   > > This is because the fastjson used in 1.3.0 Release is adapted to the deserialization of enum.
   > > Now replacing it with jackson should ensure that the function is consistent with the Release version, so the configuration item READ_UNKNOWN_ENUM_VALUES_AS_NULL is opened
   > > 经过测试 1.3.0 Release 版本没有这个问题,dev 有这个问题。
   > > 是因为 1.3.0 Release 用的 fastjson,fastjson对 enum 反序列化做了适配。
   > > 现在替换为 jackson 应该保证功能和Release版本一致,所以打开了这个配置项READ_UNKNOWN_ENUM_VALUES_AS_NULL
   > 
   > Hi, thx a lot for your work.
   > I've checked this error, it is fastjson adapted to the deserialization of enum.
   > In my opinion,
   > 
   > 1. I think it's not appropriate to adapted when the read the unknown enum value and return null because it will swallow all the enum deserialization error by using `JSONUtils` and cause some unforeseen errors;
   > 2. And in general, this kind of data error due to the front-end transmission should be fail fast, and not suitable for subsequent adaptation;
   >    Can you help to fix this in the transmission part of the front-end ?
   > 
   > 我也检查了一遍,确实是fastjson在反序列化时做了适配。
   > 个人理解,
   > 
   > 1. 这样的适配的应该是没有必要的,因为这样的适配会导致所有用到`JSONUtils`的枚举值序列化错误都会被吞掉,可能会导致一些不可预见的错误;
   > 2. 一般情况下这类由于前端传输的数据错误应该都是fail-fast的,而不适合后续去做适配;
   >    你可以从前端传输数据的角度去修复这个问题,把这种情况避免吗?
   
   
   
   这是两个不冲突的步骤。恕我直言,不认可你的 “个人理解”
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org