Skip to content

fix: show digest on push and drop empty annotations#148

Open
Bisman-Singh wants to merge 1 commit into
containers:mainfrom
Bisman-Singh:fix/cli-push-digest-and-empty-annotations
Open

fix: show digest on push and drop empty annotations#148
Bisman-Singh wants to merge 1 commit into
containers:mainfrom
Bisman-Singh:fix/cli-push-digest-and-empty-annotations

Conversation

@Bisman-Singh

Copy link
Copy Markdown

What this does:

  1. CLI push now prints Pushed target@sha256:... instead of the raw Response object
  2. to_annotations_dict() skips empty customProperties instead of adding a useless customProperties+json: {} annotation

Changes:

  • cli.py: extract Docker-Content-Digest header from push response
  • model_metadata.py: skip empty dicts in annotation generation
  • Added 5 tests covering both fixes

Fixes #18
Fixes #19

When pushing via CLI, print the actual digest (sha256:...) instead
of dumping the raw Response object. Also skip adding customProperties
annotation when it's empty.

Fixes containers#18, Fixes containers#19

Signed-off-by: Bisman-Singh <bismanmadaan1@gmail.com>
@Bisman-Singh

Copy link
Copy Markdown
Author

@tarilabs would you mind taking a look when you get a chance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

on cli push, log digests superfluous empty annotation

1 participant