cryostat-legacy
cryostat-legacy copied to clipboard
test(recordings): Upload recording to Grafana itest
Related #474
Addresses the TODO
in UploadRecordingIT
:
TODO, this test needs to be updated to actually trigger a file to be uploaded to
jfr-datasource/grafana-dashboard now that the integration tests have these additional
containers configured
Am I missing any additional cleanup or validations after the recording gets uploaded to Grafana?
There is no additional cleanup to do. You could add some tests querying the datasource directly: https://github.com/cryostatio/jfr-datasource/#readme
ex. a GET /list
to verify that the uploaded file is available for selection, and a POST /query
to get some converted JSON data.
@hareetd , do you remember what the status of this PR was? I think the issue was that the local integration tests ran too fast to pick up any data points, while the Github CI occasionally found data points when uploading the recording. After that, I'm not sure if you discovered anything else
I think the issue was that the local integration tests ran too fast to pick up any data points, while the Github CI occasionally found data points when uploading the recording.
Yes, that's it.
After that, I'm not sure if you discovered anything else
I can't remember what exactly, but I tried a few different things to ensure the data points were retrieved, but no luck. I was stuck for a few days but ended up working on something else and forgot about this PR.
Accidentally commit an old sub-module :D Removed it now and rebased on main.
See #1139 for why mergify just leaves that comment and review there. Maintainers can force-merge it anyway or just dismiss mergify's review so it isn't a big deal, just an annoyance.
@Mergifyio refresh
refresh
✅ Pull request refreshed
@Mergifyio refresh
refresh
✅ Pull request refreshed
I am not sure we can have a fixed expected datapoints
as each new recording is different. To tackle this, I switched test to check:
-
datapoints
array must be non-null. - If
datapoints
is not empty, check if each child array has 2 non-null elements. And 2nd element (timestamp) must be >= 0.
~Not yet ready for PR tho :(( waiting on this old tricky problem https://github.com/cryostatio/cryostat/pull/624#discussion_r1001548978.~
Ready for review :D The old issue where datapoints
are not picked up was due to timezone mismatch, so adjusting back time frame using UTC-0 worked as expected.