Skip to content

Support for Services #3037

Closed
Closed

Description

@sipsma

Services:

  • Run asynchronously (can be started and stopped)
  • Aren't cached in their execution
  • Can expose sockets (and similar concepts like TTYs).

One classic use case is an e2e test that needs to run against a live database. Also may include use cases like hot-reloading web dev servers, interactive containers hooked up to a user's terminal, etc.

This is a pretty broad issue, should be broken down into subtasks.

Activity

  1. sipsma commented on Sep 2, 2022

    @sipsma
    ContributorAuthor

    One idea for exposing sockets: you can query the socket in the graphql api, but the value returned is just an endpoint in the cloak server (separate from the /query graphql endpoin) that can be connected to over websocket.

    Websockets are nice in that they can transport a wide variety of protocols (can forward tty, tcp streams, udp datagrams, etc.) while also being compatible with both client libraries running in a binary/script on the host (e.g. cloak cli, any of our sdks, etc.) and web browsers.

  2. added this to the Cloak GA milestone on Sep 16, 2022
  3. transferred this issue fromdagger/cloakon Sep 16, 2022
  4. Gambler13 commented on Sep 17, 2022

    @Gambler13

    Would love to see this feature in near future. In Gitlab you can easily use the services keyword to start a new container asynchronous on the same network. I tried a workaround with the docker.#Run action, but unfortunately the service container is running forever.

  5. added
    area/engine
    and removed on Dec 5, 2022
  6. shykes commented on Jan 5, 2023

    @shykes
    Contributor

    Related: #4080 which I believe is a requirement for this issue (no point in running services if you can't connect to them).

  7. shykes commented on Jan 5, 2023

    @shykes
    Contributor

    Perhaps the parts of #4080 that depend on services (c2c and h2c) should be spun out and moved here? That way, #4080 would be limited in scope to c2h networking, and could be closed potentially very soon.

    WDYT @sipsma @vito ?

  8. removed this from the 0.3.0 milestone on Jan 5, 2023
  9. sheldonhull commented on Jan 26, 2023

    @sheldonhull

    I know one part of using dagger for me is the ability to spin up services that keep running and allow more integration type tests to run. While I would try to use a dockertest package or such in Go, there's some stuff that just makes sense to be stateful to test and iterate on, such as ng serve for Angular, or maybe even hugo serve type commands where I want to run and leave it running with refresh.

    I'm following this issue and if there's a better one for services let me know. Excited to see where this goes :-)

  10. mircubed commented on Feb 24, 2023

    @mircubed
    Contributor

    Closing this since #4505 was merged. Please create a new task for any additional work that needs to be done.

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

Metadata

Metadata

Assignees

Labels

area/enginekind/user-request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions