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

patch: add --verbose flag to patch pipeline #1761

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

hectorj2f
Copy link
Member

Melange Pull Request Template

Functional Changes

  • This PR adds the flag --verbose to the patch command. Nowadays it is a bit hard to debug any issues whenever a patch pipeline fails, e.g. Hunk #1 FAILED at 14. Those errors are cryptic and sometimes even misleading to what is the root cause. As a consequence I decided to propose to use the --verbose flag by default so anyone could get additional information whenever a patch fails on our packages.

Notes:

This is the output of a --verbose flag set for and a successful execution:

2025/01/27 15:47:21 INFO | uses=patch
2025/01/27 15:47:21 INFO |diff --git a/frontend/server/package.json b/frontend/server/package.json uses=patch
2025/01/27 15:47:21 INFO |index 8395b2c49..8b21a4eb1 100644 uses=patch
2025/01/27 15:47:21 INFO |--- a/frontend/server/package.json uses=patch
2025/01/27 15:47:21 INFO |+++ b/frontend/server/package.json uses=patch
2025/01/27 15:47:21 INFO -------------------------- uses=patch
2025/01/27 15:47:21 INFO patching file frontend/server/package.json uses=patch

and a successful output without --verbose flag:

2025/01/24 14:08:28 INFO running step "patch"
2025/01/24 14:08:28 INFO patching file frontend/server/package.json

@hectorj2f hectorj2f self-assigned this Jan 27, 2025
@hectorj2f hectorj2f requested a review from imjasonh January 28, 2025 22:41
@hectorj2f hectorj2f merged commit 6c1d51c into chainguard-dev:main Jan 31, 2025
37 checks passed
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