Skip to content

copier: Fix some log messages#6808

Merged
TomSweeneyRedHat merged 1 commit into
containers:mainfrom
BenjaminSchubert:bschubert/log-fixes
Apr 23, 2026
Merged

copier: Fix some log messages#6808
TomSweeneyRedHat merged 1 commit into
containers:mainfrom
BenjaminSchubert:bschubert/log-fixes

Conversation

@BenjaminSchubert
Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

  • The error when checking if directory is an absolute path doesn't log the right directory
  • The incorrect size read inverted the read vs expected bytes
  • The fileUID and fileGID logs logged the pointer to the values instead of the values themselves

How to verify it

N/A

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 22, 2026
@BenjaminSchubert
Copy link
Copy Markdown
Contributor Author

@containers/buildah-maintainers, I don't think I can easily write tests for those/that its worth having tests

@giuseppe giuseppe added the No New Tests Allow PR to proceed without adding regression tests label Apr 22, 2026
Comment thread copier/copier.go Outdated
hostFilePair, err := idMappings.ToHost(containerFilePair)
if err != nil {
return errorResponse("copier: put: error mapping container filesystem owner %d:%d to host filesystem owners: %v", fileUID, fileGID, err)
return errorResponse("copier: put: error mapping container filesystem owner %d:%d to host filesystem owners: %v", &fileUID, &fileGID, err)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this needs to be *fileUID and *fileGID

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

woops, good catch.. Fixed

- The error when checking if directory is an absolute path doesn't log
  the right directory
- The incorrect size read inverted the read vs expected bytes
- The fileUID and fileGID logs logged the pointer to the values instead
  of the values themselves

Signed-off-by: Benjamin Schubert <bschubert15@bloomberg.net>
Copy link
Copy Markdown
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@nalind
Copy link
Copy Markdown
Member

nalind commented Apr 22, 2026

LGTM, thanks!

@TomSweeneyRedHat
Copy link
Copy Markdown
Member

LGTM
Thanks for the fixes @BenjaminSchubert !

@TomSweeneyRedHat
Copy link
Copy Markdown
Member

/lgtm

@TomSweeneyRedHat TomSweeneyRedHat merged commit 84d7385 into containers:main Apr 23, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No New Tests Allow PR to proceed without adding regression tests size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants