You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "ethan256 (via GitHub)" <gi...@apache.org> on 2023/02/17 03:37:10 UTC

[GitHub] [skywalking] ethan256 opened a new issue, #10402: [INFRA] verify support float compare

ethan256 opened a new issue, #10402:
URL: https://github.com/apache/skywalking/issues/10402

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Description
   
   When a float type is present in the verifier module, an error will be reported.
   
   
   
   ### Use case
   
   actual.yaml
   ```yaml
   code: 200
   message: success
   data:
     - instanceName: provider1
       status: 2
       rate: 1.0
   ```
   
   expected.yaml
   ```yaml
   code: 200
   message: success
   data:
   {{- contains .data }}
     - instanceName: provider1
       status: 2
       rate: 1.0
   {{- end }}
   ```
   
   result:
   
   ```shell
   ERROR failed to verify the output: /Users/ethan/github.com/skywalking/skywalking-infra-e2e/test/verify/0.actual.yaml, error:
   mismatch (-want +got):
     map[interface{}]interface{}{
     	string("code"): int(200),
     	string("data"): []interface{}{
     		map[interface{}]interface{}{
     			string("instanceName"): string("provider1"),
   - 			string("rate"):         int(1),
   + 			string("rate"):         float64(1),
     			string("status"):       int(2),
     		},
     	},
     	string("message"): string("success"),
     } 
   ```
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org

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


[GitHub] [skywalking] wu-sheng commented on issue #10402: [INFRA] verify support float compare

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on issue #10402:
URL: https://github.com/apache/skywalking/issues/10402#issuecomment-1434053832

   Float is not accurate in many cases. It is better not doing this to avoid false alarm.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] ethan256 commented on issue #10402: [INFRA] verify support float compare

Posted by "ethan256 (via GitHub)" <gi...@apache.org>.
ethan256 commented on issue #10402:
URL: https://github.com/apache/skywalking/issues/10402#issuecomment-1434053134

   Reason: when the go template run the `Execute` method, it formats 1.0 to 1, causing subsequent use of the `cmp.Equal` method to report an error


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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


[GitHub] [skywalking] wu-sheng closed issue #10402: [INFRA] verify support float compare

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng closed issue #10402: [INFRA] verify support float compare
URL: https://github.com/apache/skywalking/issues/10402


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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