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

Allow layer author, comment, and created-by metadata to be set #148

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

FenTiger
Copy link
Contributor

This adds an optional metadata argument to buildLayer which allows the corresponding information strings to be set in the image history.

Copy link
Owner

@nlewo nlewo left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

Could you also a example in ./examples and ideally a e2e test in ./tests?

@FenTiger FenTiger force-pushed the metadata branch 2 times, most recently from 7c2e1e6 to 7240037 Compare August 28, 2024 12:43
@FenTiger
Copy link
Contributor Author

I think I've addressed all your points, but I had some trouble getting the tests to run, so I'm not certain that the new test actually passes.

Hopefully I'll get time this weekend to install podman and have a closer look locally.

@nlewo
Copy link
Owner

nlewo commented Aug 29, 2024

I think you can add a test such as the one added by this pr.

Also, you don't really need to install podman since you would get it transparently via nix run .#tests.your-test

@FenTiger
Copy link
Contributor Author

Also, you don't really need to install podman since you would get it transparently via nix run .#tests.your-test

The failure I see is

$ nix run .#tests.metadata
warning: Ignoring setting 'auto-allocate-uids' because experimental feature 'auto-allocate-uids' is not enabled
warning: Ignoring setting 'impure-env' because experimental feature 'configurable-impure-env' is not enabled
Copy to podman image metadata:pc579z7vyng8yf04h9qwsfvw40xgcmb2
ERRO[0000] finding newgidmap: exec: "newgidmap": executable file not found in $PATH 
ERRO[0000] (Unable to determine exit status)            
Error during setresgid(0): Invalid argument
Error: command required for rootless mode with multiple IDs: exec: "newuidmap": executable file not found in $PATH
image list
Error: command required for rootless mode with multiple IDs: exec: "newuidmap": executable file not found in $PATH

Actual output:
Error: command required for rootless mode with multiple IDs: exec: "newuidmap": executable file not found in $PATH

Expected pattern:
test author

Error: test failed

Maybe it's not podman that's missing, but I need to install something to make it work.

@FenTiger
Copy link
Contributor Author

Fixed. The test is working now.

@FenTiger FenTiger requested a review from nlewo August 30, 2024 08:36
@FenTiger
Copy link
Contributor Author

FenTiger commented Nov 1, 2024

Is there anything else I need to do to this PR?

@nlewo
Copy link
Owner

nlewo commented Nov 1, 2024

Nothing more is actually required.
Tests passed locally.
Thank you.

@nlewo nlewo merged commit 5fb215a into nlewo:master Nov 1, 2024
@FenTiger FenTiger deleted the metadata branch November 30, 2024 10:02
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