-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add BuildOrigin field to podman info #24781
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ashley-cui The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
No new tests, as this is a build-time variable:
When the VM is running:
When the VM is stopped, this is also shown in podman info:
We also need to add this to winmake and the windows installer, but that requires re-structuring of winmake, so a followup PR makes more sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know naming is hard and bikeshedding over the name is not so useful but if find BuiltFor
a bit confusing. Maybe BuiltName
sounds better?
Also we should likely set the same for the windows installer and rpm spec then.
I think both end up equally vague? Other options I considered:
I'll do that in a followup PR, that requires some changes in winmake. Though if anyone is more familiar with the RPM spec change, I'll likely need help there. |
I had thought of |
Changing to origin, since origin seems more specific than name or for |
BuiltOrigin is a field that can be set at build time by packagers. This helps us trace how and where the binary was built and installed from, allowing us to see if the issue is due to a specfic installation or a general podman bug. This field shows up in podman version and in podman info when populated. Automatically set the BuildOrigin field when building the macOS pkginstaller to pkginstaller. Usage: make podman-remote BUILD_ORIGIN="mypackaging" Signed-off-by: Ashley Cui <acui@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
podman info
actually shows the remote BUILD_ORIGIN not the local one so it seem pretty much useless for what we need as all the mac reports would show the remote server origin not the brew client...
The local one is only shown when the info remote connection fails.
For podman-remote version
the BUILD_ORIGIN output is never shown (only the local podman version shows it). In the remote case it should be able to show the origin for both the server and client.
OSArch string `json:"OS"` | ||
Provider string `json:"provider"` | ||
Version string `json:"version"` | ||
BuildOrigin string `json:"buildOrigin,omitempty" yaml:",omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has this a yaml tag as only field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We yaml marshall these on output, and buildOrigin is the only omitempty field we need. For consistency's sake, I can add it to all the fields.
I'd argue that this is the correct behavior. All the podman info output is service side info, and outputting client info in podman info without adding a specific client field would be misleading. We could add a section for the client, I'd say that would be a breaking change, as we have to update the json to "hostInfo" and "clientInfo". This is why I chose to do it in
For me the build origin output is shown? It should show for both the server and the client, but the server isn't building with the tag yet so we might not see it for in the server version, but this is what the output looks like for me:
|
@@ -108,6 +109,7 @@ API Version:\t{{.APIVersion}} | |||
Go Version:\t{{.GoVersion}} | |||
{{if .GitCommit -}}Git Commit:\t{{.GitCommit}}\n{{end -}} | |||
Built:\t{{.BuiltTime}} | |||
{{if .BuildOrigin -}}Built Origin:\t{{.BuildOrigin}}\n{{end -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Built intentional, or should it be Build?
Feels like this should be in the packaging doc, I imagine it's relevant to distro packagers |
I get what you mean but then this whole PR is mostly pointless considering the reason why @baude brought this up. Our issue template asks for podman info and if macos installer just says "fedora rpm" or nothing then we are no step closer to knowing if users installed via brew or our own installer or something else...
It doesn't show the BUILD_ORIGIN for the server as we do not have a proper version libpod API endpoint. This is all send via the docker API AFAIK. This is with podman (same binary running the service) complied with test2 and podman-remote compiled with test1.
|
BuiltOrigin is a field that can be set at build time by packagers. This helps us trace how and where the binary was built and installed from, allowing us to see if the issue is due to a specfic installation or a general podman bug. This field shows up in podman version and in podman info when populated.
Automatically set the BuildOrigin field when building the macOS pkginstaller to pkginstaller.
Usage: make podman-remote BUILD_ORIGIN="mypackaging"
Does this PR introduce a user-facing change?