Repository navigation
Conversation
Closed
3 tasks done
Owner
|
@maplezzk thanks for this. It works: image labels, the label filter and inherited container labels all checked out on macOS, Linux and WSL 2. Before it can be merged, the commit needs to be signed. Right now GitHub shows it as unsigned. Please sign it (GPG or SSH, with the key added to your GitHub account as a signing key), then force-push. GitHub's guide: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits While you're at it, please rebase onto main. #400 also edits |
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Kiri currently omits image
Labelsacross Docker-compatible inspect/list endpoints and container creation:GET /images/{id}/json(docker image inspect) omitsConfig.Labels, breaking tools/scripts that read OCI labels such asorg.opencontainers.image.*or custom release metadata.GET /images/json(docker images) hardcodes"Labels": nulland passes&Value::NulltoFilters::labels, sodocker images --filter label=...never matches.GET /system/dfhardcodes"Labels": nullon image rows.POST /containers/createstores onlybody["Labels"]without inheritingconfig.Labelsfrom the base image (Docker Engine merges image labels underneath container labels).POST /commitdid not persistspec.labelsinto the committed image config.Changes
config["config"]["Labels"]from the stored image config blob incrates/kiri/src/daemon/api.rs(image_config_json,image_labels_from,image_labels), preserving backward compatibility with existing on-diskimages.json.Config.Labelsinimage_inspect(and reuse the single config read forHealthcheck).Labelsand supportlabel/label!filters inGET /images/json.config.Labelsunderneath requestLabelsinPOST /containers/create(merge_labels).LabelsinGET /system/dfand write backspec.labelsinPOST /commit(crates/kiri/src/daemon/ops.rs).image_and_container_labels_follow_dockercoveringimage_inspect,imageslabel/label!filters, andcreate+container_inspectlabel inheritance/override.Testing
cargo test -p kiri --bin kiri daemon::api(20 passed, 0 failed)cargo xtask host(release build + virtualization entitlement codesign succeeded)