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

[compression] fix compression management #12

Merged
merged 1 commit into from
Aug 12, 2021
Merged

Conversation

ome9ax
Copy link
Owner

@ome9ax ome9ax commented Aug 12, 2021

Describe the bug

I can't safely uncompress the output file.

To Reproduce

Steps to reproduce the behavior:

  1. Choose gzip or lzma as a compression algorythm.
  2. Run the command some-singer-tap | target-s3-jsonl --config [config.json]
  3. Try to unzip the output

Expected behavior

I expect to be able to uncompress the target output

Screenshots

If applicable, add screenshots to help explain your problem.

Your environment

  • Version of target: 0.0.5
  • Version of python 3.8

Additional context

Basically the issue is due to the if instead of elif introduced with lzma in the save_file function. It allow the uncompressed data to be appended to the file, hence the file inconsistency.

@ome9ax ome9ax added the bug Something isn't working label Aug 12, 2021
@ome9ax ome9ax requested a review from Tomme August 12, 2021 15:10
@ome9ax ome9ax self-assigned this Aug 12, 2021
@ome9ax ome9ax added this to In progress in Singer Target s3 jsonl via automation Aug 12, 2021
@ome9ax ome9ax merged commit 3e76843 into main Aug 12, 2021
Singer Target s3 jsonl automation moved this from In progress to Done Aug 12, 2021
@ome9ax ome9ax deleted the hotfix/compression branch August 12, 2021 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

None yet

2 participants