-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add the parse_raw_upload function #59
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
📢 Thoughts on this report? Let us know! |
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #59 +/- ##
==========================================
+ Coverage 85.34% 89.26% +3.91%
==========================================
Files 5 6 +1
Lines 587 764 +177
==========================================
+ Hits 501 682 +181
+ Misses 86 82 -4 ☔ View full report in Codecov by Sentry. |
6cc5e88
to
90be9f3
Compare
we want to handle when the skip or error is an empty XML element we also want to handle when the error has a message in the same way that a failure has a message
- this covers the case where a user will upload their test results file for pytest without -o junit_family=legacy, but with their network set - this is the network that is usually uploaded from the CLI - the network is optional argument and defaults to None - since it's usually a list of file paths that contain the paths to source files we can use it to deduce the path associated with a pytest test result if the filename has not been provided - this commit also moves the tests from python to rust and removes the python interface for the compute_name function since it's no longer needed - there's possibly future work that can be done to optimize this process of matching the test result classname to files in the network, but this is a minimal working solution, it's also possible that with the updated instructions in the docs
we will need to handle msgpacking, base64 decoding and zlib decompressing
we want to document the new function that we're going to implement
we want to support parsing raw upload files instead of individual JUnit XML files the input of this new function is the raw upload in byte form the output is a messagepacked binary payload containing the results of the parsing and the raw upload in readable format in byte form
90be9f3
to
1117e75
Compare
this commit adds the parse_raw_upload function which
takes the entire raw test results upload in bytes and returns
the output as a messagepacked payload
this is to reduce the overhead of calling into the rust library then
returning the result back to python
so we will use serde to deserialize the raw upload first, then iterate
through each file in the upload and base64 decode its data and
decompress it. from that point onwards it's basically the same as
before: we have a JUnit XML in the form of a vector of bytes
instead of returning a list of ParsingInfo objects we are now
serializing the resulting list of ParsingInfo into the messagepack
format since we will be storing that in redis intermediately anyways