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

Make sure we log errors. #570

Merged
merged 1 commit into from
Jul 24, 2023
Merged

Conversation

mattmoor
Copy link
Member

This reverts fdf0cbf which avoided double-printing (some?) errors, but the net effect of this is that some errors are never printed.

Performing world builds, I see half a dozen failures(?) where the logs end without actually printing anything actionable:

...
ℹ️  x86_64    | populating cache from
ℹ️  x86_64    | populating workspace /home/user/tmp/melange-workspace-2016802746 from ./jaeger-agent/
ℹ️  x86_64    | --cache-dir ./melange-cache/ not a dir; skipping
ℹ️  x86_64    | ImgRef = gcr.io/mattmoor-chainguard/wolfi-os-builds@sha256:98b659b74c47411018b386fdb4fbb8aa0140eb5b11c19b1473c99c96da2524ef
ℹ️  x86_64    | creating mount 'mount-0' from /home/user/tmp/melange-workspace-2016802746 at /home/build
ℹ️  x86_64    |   workspace dir: /home/user/tmp/melange-workspace-2016802746
ℹ️  x86_64    |   guest dir: /home/user/tmp/melange-guest-1521123713

IMO printing some things twice is strictly worse than not printing some errors at all, and this is the surest way to ensure all errors are printed.

cc @luhring who made the original change

This reverts fdf0cbf which avoided double-printing (some?) errors, but the net effect of this is that some errors are never printed.

Performing world builds, I see half a dozen failures(?) where the logs end without actually printing anything actionable:
```
...
ℹ️  x86_64    | populating cache from
ℹ️  x86_64    | populating workspace /home/user/tmp/melange-workspace-2016802746 from ./jaeger-agent/
ℹ️  x86_64    | --cache-dir ./melange-cache/ not a dir; skipping
ℹ️  x86_64    | ImgRef = gcr.io/mattmoor-chainguard/wolfi-os-builds@sha256:98b659b74c47411018b386fdb4fbb8aa0140eb5b11c19b1473c99c96da2524ef
ℹ️  x86_64    | creating mount 'mount-0' from /home/user/tmp/melange-workspace-2016802746 at /home/build
ℹ️  x86_64    |   workspace dir: /home/user/tmp/melange-workspace-2016802746
ℹ️  x86_64    |   guest dir: /home/user/tmp/melange-guest-1521123713
```

IMO printing some things twice is strictly worse than not printing some errors at all, and this is the surest way to ensure all errors are printed.

Signed-off-by: Matt Moore <mattmoor@chainguard.dev>
@mattmoor mattmoor requested a review from a team as a code owner July 24, 2023 22:10
@mattmoor mattmoor enabled auto-merge July 24, 2023 22:31
@mattmoor mattmoor merged commit 90d9484 into chainguard-dev:main Jul 24, 2023
@mattmoor mattmoor deleted the unsilence-errors branch July 24, 2023 23:29
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