DataDog / datadog-ci

Use Datadog from your CI.
https://datadoghq.com
Apache License 2.0
127 stars 55 forks source link

No error shown when timestamp doesn't match (junit test upload) #996

Closed slevenstein closed 1 year ago

slevenstein commented 1 year ago

Bug description

When uploading a junit test result file to Datadog with test cases containing timestamps with a difference from the current time greater than a few hours, no error is shown in the command line, but no results show in Datadog.

I recall reading that the timestamp shouldn't be too much later than the current time in one other Issue, but I wish that was made a bit more clear to have saved me some time.

This is all that is shown in the command line:

✅ Uploaded 1 files in 0.518 seconds.
=================================================================================================
* View detailed reports on Datadog (they can take a few minutes to become available)
=================================================================================================

Describe what you expected

Either an error is thrown in the shell output saying that there is an error with the the timestamp differential or... Results are shown in Datadog despite the timestamp differential (possibly if a certain argument/flag is given)*

*would be helpful for testing

Steps to reproduce the issue

Additional context

datadog-ci version: v2.17.2

Command

junit

slevenstein commented 1 year ago

Related to this and saw you added a waning in the documentation, so up to you all if you want to close this

https://github.com/DataDog/datadog-ci/issues/923

juan-fernandez commented 1 year ago

hey @slevenstein ! Thanks for the report. This is indeed annoying, but we want to keep the processing at the library as light as possible, to make it faster and not to duplicate logic, since the processing of the file is done at the backend. I'll have a look anyway, maybe there's an fast way to check timestamps

juan-fernandez commented 1 year ago

so we already do some basic validation to the xml, so we do partially parse it. To check the timestamps, we would have to go through a potentially huge report though, which we want to avoid doing. I'll close this. Thanks for the report anyway!