Skip to content

CLI: enable shell and up functionality as chainable APIs  #6361

Closed

Description

@sipsma

As described in this comment, we want to centralize call+shell+up to all be part of a common CLI command via exposing shell and up functionality as chainable APIs from Container/Service.

The original idea described there was to update the core API with "side-effect-only" APIs that result in the relevant behavior being triggered (similar to how export APIs work), e.g. as strawman starter ideas

  1. A shell field on Container that uses the session attachable functionality to connect back to the caller's TTY and hook it up to an exec in the container
  2. An up field on Service that uses the session attachable functionality to proxy the service to the caller's network

That's still totally viable and fine, but based on the relaxations described in "Loosening restrictions on return type being a scalar" here I think we have more options available to us now

For example, we could just rename the existing shellEndpoint field on Container to shell (or similar) and have it return a custom scalar type that is handled by the CLI.

  • This would create the same end effect but just be much simpler to implement since it can just re-use the plumbing we already have around all this rather than switch the shell functionality to use session attachables

The up functionality probably has some similar options too now, TBD as part of implementing.

Activity

  1. added
    area/cli
    on Jan 3, 2024
  2. self-assigned this
    on Jan 12, 2024
  3. removed
    area/cli
    on May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions