Skip to content

Create ImageResource conforming to ManagedResource#1619

Merged
jglogan merged 2 commits into
apple:mainfrom
katiewasnothere:image_managedresource_conformance
Jun 2, 2026
Merged

Create ImageResource conforming to ManagedResource#1619
jglogan merged 2 commits into
apple:mainfrom
katiewasnothere:image_managedresource_conformance

Conversation

@katiewasnothere
Copy link
Copy Markdown
Contributor

@katiewasnothere katiewasnothere commented May 29, 2026

Type of Change

  • New feature

Motivation and Context

Testing

  • Tested locally

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
@github-actions github-actions Bot added the cli label May 29, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 29, 2026

Code Coverage

Tier Line Coverage
Unit 34.45%
Integration 19.82%
Combined 53.69%

Comment thread Sources/ContainerCommands/Image/ImageList.swift Outdated
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>

try Output.emit(Output.renderJSON(printable))
let options = JSONOptions(
outputFormatting: [.prettyPrinted, .sortedKeys],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
outputFormatting: [.prettyPrinted, .sortedKeys],
outputFormatting: [.sortedKeys],

We weren't pretty printing anywhere else except VolumeInspect.

Let's choose to do either this, or I can change the network/volume PR currently open to pretty print on inspect.

Copy link
Copy Markdown
Contributor

@jglogan jglogan Jun 1, 2026

Choose a reason for hiding this comment

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

Let's merge this, and then we'll do the following in #1624:

  • sortedKeys and ISO timestamps everywhere
  • pretty printed for resource inspect

let fullSize: String
let descriptor: Descriptor
private static func emitJSON(resources: [ImageResource]) throws {
let options = JSONOptions(dateEncodingStrategy: .iso8601)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sort keys?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will take care of this in #1624.

@jglogan jglogan merged commit 55f1e4f into apple:main Jun 2, 2026
3 checks passed
@katiewasnothere katiewasnothere deleted the image_managedresource_conformance branch June 2, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request]: Conform images to ManagedResource for CLI JSON output.

2 participants