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

fix: surface errors when compressing files #13491

Merged
merged 2 commits into from May 8, 2023

Conversation

crenshaw-dev
Copy link
Collaborator

CompressFiles returns filesWritten == 0 for all cases where err != nil, but when err != nil, the fact that no files were written isn't the most interesting bit of information. i.e. we're hiding the actual error in many cases.

This change will pass up the error message if there is one. If there isn't an error, we throw a new error if no files were written.

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@codecov
Copy link

codecov bot commented May 8, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (1a4a878) 49.20% compared to head (455ff21) 49.20%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #13491   +/-   ##
=======================================
  Coverage   49.20%   49.20%           
=======================================
  Files         248      248           
  Lines       42908    42908           
=======================================
  Hits        21112    21112           
  Misses      19682    19682           
  Partials     2114     2114           
Impacted Files Coverage Δ
util/cmp/stream.go 50.94% <0.00%> (ø)
util/manifeststream/stream.go 50.83% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@leoluz leoluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crenshaw-dev
Copy link
Collaborator Author

/cherry-pick release-2.6

@crenshaw-dev
Copy link
Collaborator Author

/cherry-pick release-2.7

@crenshaw-dev crenshaw-dev enabled auto-merge (squash) May 8, 2023 18:40
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@crenshaw-dev crenshaw-dev merged commit 29c7f5a into argoproj:master May 8, 2023
24 checks passed
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request May 8, 2023
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request May 8, 2023
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@crenshaw-dev crenshaw-dev deleted the err-before-fileswritten branch May 9, 2023 02:05
crenshaw-dev added a commit that referenced this pull request May 9, 2023
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
crenshaw-dev added a commit that referenced this pull request May 9, 2023
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
schakrad pushed a commit to schakrad/argo-cd that referenced this pull request Jul 24, 2023
…#13494)

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: schakrad <58915923+schakrad@users.noreply.github.com>
yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
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.

None yet

2 participants