Skip to content

CLI: return object on sync #7836

Closed
Closed

Description

@helderco

This supersedes:

IDs are hidden from the CLI for a reason (see #6710). However you can get the ID by calling sync. A better alternative is to follow the SDKs on how they handle sync by returning the Container corresponding to the resulting ContainerID using loadContainerFromID().

After #6515 it doesn’t seem necessary since a chain ending in a Container calls stdout and thus forces evaluation. The problem is that it also forces execution, and that may be undesirable:

This could be a solution to that by making sure we don’t pre-select any fields in Container that trigger execution, but reverting to implicitly calling sync again, before selecting the fields for the image data.

In any case, making sync chainable like in SDKs is more useful than returning an ID that you can’t use. Users could then add sync to the middle of a command chain, and everything before it would be evaluated before even parsing the rest of the command.

Activity

  1. added
    area/cli
    on Jul 6, 2024
  2. self-assigned this
    on Aug 1, 2024
  3. locked and limited conversation to collaborators on Mar 24, 2026
  4. converted this issue into a discussion #12310 on Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/cli

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions