Skip to content
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

Surround decompression with try..catch + strip ".gz" from filename #3756

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

shurivich
Copy link
Contributor

@shurivich shurivich commented Dec 31, 2024

Motivation

Surround decompression with try..catch + strip ".gz" from filename

Reviewer checklist

  • If PR title starts with [<language>], double-check that only <language> is impacted by the change
  • No system-tests internal is modified. Otherwise, I have the approval from R&P team
  • CI is green, or failing jobs are not related to this change (and you are 100% sure about this statement)
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added (or removed)?

@shurivich shurivich self-assigned this Dec 31, 2024
@shurivich shurivich marked this pull request as ready for review January 1, 2025 12:59
@shurivich shurivich requested a review from a team as a code owner January 1, 2025 12:59
@cbeauchesne
Copy link
Collaborator

cbeauchesne commented Jan 2, 2025

Hi @shurivich ,

Could you give more context a bout the motivation of this PR ? The fact that data are deserialized is a basic must-have in system-tests :

  • test code do not have to handle this
  • schema validation can be implemented
  • users can read user-friendly data in logs folder

@shurivich
Copy link
Contributor Author

@cbeauchesne

Archiving is one of the product features I want to test and verify.
If the system test infrastructure handles it automatically, I can't be sure it actually happened in the tracer.

See this PR:
https://github.com/DataDog/system-tests/pull/3761/files#diff-98d8cdf36966154410c17259fd3b03ef736915fcc68fd9b21c55b4d2c52f0096

Permalink to the relevant line code:

assert False, f"File {file_path} is not a valid gzip archive"

@shurivich shurivich force-pushed the shurivich/decompression branch from 8f12ca6 to 9238279 Compare January 9, 2025 13:27
@shurivich shurivich changed the title Remove request decompression Surround decompression with try..catch + strip ".gz" from decompressed filename Jan 9, 2025
@shurivich shurivich changed the title Surround decompression with try..catch + strip ".gz" from decompressed filename Surround decompression with try..catch + strip ".gz" from filename Jan 9, 2025
@shurivich
Copy link
Contributor Author

@cbeauchesne
As discussed, instead of removing decompression, I'm stripping off the extension of the gzipped file.
Also surrounded the decompression with try..catch

@shurivich shurivich merged commit a7eed9c into main Jan 12, 2025
432 of 433 checks passed
@shurivich shurivich deleted the shurivich/decompression branch January 12, 2025 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants