fix: unexport AddInitrdRecord and clean up error formatting#555
fix: unexport AddInitrdRecord and clean up error formatting#555hemang1404 wants to merge 2 commits intourunc-dev:mainfrom
Conversation
Fixes: urunc-dev#502 Signed-off-by: hemang1404 <hemangsharrma@gmail.com>
✅ Deploy Preview for urunc canceled.
|
|
Thank you @hemang1404 for this PR. Is there any particular reason for not running the tests, or at least the linter? |
|
Hi @cmainas, I ran the unit tests locally and all the checks passed but I noticed that make lint was failing on my branch due to a pre-existing indentation issue in a different file (pkg/unikontainers/hypervisors/qemu.go. After fixing the indentation issue there, make lint passes successfully. |
Signed-off-by: hemang1404 <hemangsharrma@gmail.com>
5f1ccf8 to
bbd8ca2
Compare
|
I see, we need to check why it fails locally and not in our CI. The linter warning is valid though. |
I looked into the issue, and it seems CI doesn’t report it because the urunc/.github/workflows/lint.yml Line 47 in 6df97b4 As I understand it, this flag filters issues based on the diff. Since there are no new changes touching the problematic code, the issue isn’t reported in CI. Locally, however, the make lint target doesn’t use this filter, which is why the issue shows up. Yet, using |


Related issues
Description
Unexported the internal helper function AddInitrdRecord by renaming it to addInitrdRecord. Cleaned up the error strings in the file by lowercasing them and using %w standard error wrapping formats.
How was this tested?
Verified that the package successfully compiles locally by compiling against the target Linux architecture (
$env:GOOS="linux"; go build ./pkg/unikontainers/initrd/...).LLM usage
Used chatgpt to verify changes
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).