Skip to content

fix: upx properly handle skips #5720

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

Merged
merged 6 commits into from
Apr 15, 2025
Merged

fix: upx properly handle skips #5720

merged 6 commits into from
Apr 15, 2025

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Apr 14, 2025

closes #5719

  • the actual skips were not being run inside the skip-aware context
  • improved tests so we actually check it ran for all the binaries we want
  • make tests faster by avoiding running upx for real and go build

@caarlos0 caarlos0 added the bug Something isn't working label Apr 14, 2025
@caarlos0 caarlos0 requested a review from Copilot April 14, 2025 12:01
@caarlos0 caarlos0 self-assigned this Apr 14, 2025
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 14, 2025
Copy link

cloudflare-workers-and-pages bot commented Apr 14, 2025

Deploying goreleaser with  Cloudflare Pages  Cloudflare Pages

Latest commit: 263d1f4
Status: ✅  Deploy successful!
Preview URL: https://96fada05.goreleaser.pages.dev
Branch Preview URL: https://upx-fix.goreleaser.pages.dev

View logs

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • internal/pipe/upx/testdata/fakeupx: Language not supported
Comments suppressed due to low confidence (1)

internal/pipe/upx/upx.go:51

  • [nitpick] The removal of launching a separate goroutine for each binary compressOne call now processes them sequentially. Confirm that this change is intentional, as it may impact performance when handling multiple binaries concurrently.
if err := compressOne(ctx, upx, bin); err != nil {

@caarlos0 caarlos0 requested a review from Copilot April 14, 2025 12:08
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • internal/pipe/upx/testdata/fakeupx: Language not supported
  • www/docs/static/schema-pro.json: Language not supported
Comments suppressed due to low confidence (2)

internal/pipe/upx/upx.go:37

  • The change from using semerrgroup.NewSkipAware to semerrgroup.New combined with a separate SkipMemento may affect the concurrency and skip aggregation behavior; please verify that this change fully aligns with the intended skip handling logic or add a clarifying comment.
g := semerrgroup.New(ctx.Parallelism)

internal/pipe/upx/upx.go:38

  • [nitpick] Consider adding an inline comment to explain the purpose of using SkipMemento for accumulating skip events instead of returning immediately; this helps maintain clarity on the skip handling overall.
skips := pipe.SkipMemento{}

Copy link

codecov bot commented Apr 14, 2025

Codecov Report

Attention: Patch coverage is 77.55102% with 11 lines in your changes missing coverage. Please review.

Project coverage is 82.93%. Comparing base (86cf0cb) to head (263d1f4).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/pipe/upx/upx.go 77.55% 9 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5720      +/-   ##
==========================================
- Coverage   82.99%   82.93%   -0.07%     
==========================================
  Files         160      160              
  Lines       15758    15765       +7     
==========================================
- Hits        13079    13075       -4     
- Misses       2115     2124       +9     
- Partials      564      566       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@caarlos0 caarlos0 merged commit 9e45699 into main Apr 15, 2025
15 of 16 checks passed
@caarlos0 caarlos0 deleted the upx-fix branch April 15, 2025 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

upx evaluation bug?
1 participant