Skip to content

Services, a.k.a. container-to-container networking - #4505

Merged
vito merged 74 commits into
dagger:mainfrom
vito:services
Feb 23, 2023
Merged

vito merged 74 commits into
dagger:mainfrom
vito:services

Conversation

@vito

@vito vito commented Feb 1, 2023 •

Copy link
Copy Markdown
Contributor

part of #4163

API summary below, docs omitted for brevity.

Containers can now act as services:

extend type Container {
  withExposedPort(port: Int!, description: String): Container!

  hostname: String!

  endpoint(port: Int, scheme: String): String!

  withServiceBinding(alias: String!, service: ContainerID!): Container!
}

HTTP and Git are now able to fetch from a service:

extend type Query {
  http(
    url: String!,
    "A service which must be started before the URL is fetched."
    experimentalServiceHost: ContainerID,
  ): File!

  git(
    url: String!,
    keepGitDir: Boolean,
    "A service which must be started before the repo is fetched."
    experimentalServiceHost: ContainerID,
  ): GitRepository!
}

@sipsma

sipsma commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

First off, awesome to see this start becoming real!

One thing that's not a blocker but is just worth everyone being in the loop on is that if we rely on network namespaces for service support then we are throwing a big wrench into support for running the engine rootlessly on e.g. k8s. I think it's still possible but it's just gonna involve a lot more shenanigans and work, FYI @jpadams @kpenfound.

I don't know of any easy solution here, it seems like there's a hard req that containers don't share the same localhost, right @vito? If so I think we'll just have to accept the wrench and figure it out from there, service+networking support is too important to get blocked on this.

@kpenfound

Copy link
Copy Markdown
Contributor
  • implement some wireguard magic to solve namespacing 😄

@sipsma

sipsma commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

implement some wireguard magic to solve namespacing

Honestly yeah that's one viable option! The solutions I'm aware of involve running a userspace networking stack, slirp4netns is the default choice but wireguard-go is an intriguing possibility too...

@vito

vito commented Feb 2, 2023

Copy link
Copy Markdown
Contributor Author

@sipsma Yeah that'll definitely be something to watch for down the road. I know e.g. rootlesskit uses slirp for rootless network namespacing but I have no idea how it works or its limitations.

There's also a possible out in that we control how the addresses are constructed: the client calls Endpoint and Hostname which returns a black-box string to pass to the client. I could see us returning some magical address going through a proxy or something. But that's only one piece of the puzzle.

@vito

vito commented Feb 2, 2023

Copy link
Copy Markdown
Contributor Author

The tests that start a local registry are failing because now every container runs in a bridge network rather than the Buildkit host network, so we can't just use 127.0.0.1:5000 anymore.

Ideally I would replace the test registry setup with proper services, and that almost works, except Buildkit now requires TLS for talking to the registry because it's not a localhost or 127.0.0.1 address.

I went through this same challenge for Bass and it led to me implementing support for TLS. I can do the same here. We talked about it previously in #4163 but I didn't appreciate that the existing tests will require this work sooner rather than later.

Another idea is to support exposing a container port onto the host so that it's 127.0.0.1 again, but that's not quite what users would expect: they would probably want a port on the client-side host mapped to the container, not the engine-side. So that doesn't actually seem like an option. (I'm also, uh, not sure how to do it anyway.)

@vito

vito commented Feb 2, 2023

Copy link
Copy Markdown
Contributor Author

Another option, for completeness, is to change the tests to talk to a real registry (private, or public with auth). Not my favorite, but keeps the scope in check.

@jlongtine

jlongtine commented Feb 2, 2023 •

Copy link
Copy Markdown
Contributor
  • implement some wireguard magic to solve namespacing 😄

There are a ton of examples in here... might be of use.

https://www.procustodibus.com/blog/2022/10/wireguard-in-podman/

@sipsma

sipsma commented Feb 2, 2023

Copy link
Copy Markdown
Contributor

Another option, for completeness, is to change the tests to talk to a real registry (private, or public with auth). Not my favorite, but keeps the scope in check.

@vito A gross but maybe okay temp solution if we don't have TLS would be to start the registry by shelling out to docker and use --net container:dagger-engine.dev so it's in the same net namespace as the engine being tested? I'm not 100% sure that would actually work, but if it does it's a relatively cheap stopgap.

vito added 2 commits February 3, 2023 15:06
* install and configure CNI plugins in Engine image
* configure DNS for container-to-container addressing
* extend Container API for retrieving hostname/addresses

TODO:

* complete container API for exposing ports
* health checking (port probe, maybe wait for stdout)
* start dependent services just-in-time, detach when done
* extend just-in-time service lifecycle to container.File,
  container.Directory, etc

Signed-off-by: Alex Suraci <[email protected]>
adds a hokey internal CLI to shim so we can run healthchecks from within
Buildkit

TODO: just-in-time starting for dependent Files/Directories/etc

Signed-off-by: Alex Suraci <[email protected]>
@vito

vito commented Feb 4, 2023

Copy link
Copy Markdown
Contributor Author

@sipsma Nice idea, that worked!

Now two tests are failing:

The first failure is the Git SSH auth socket test, which was doing basically the same thing as the registry tests (binding on localhost). This one is easy to translate to a service since it doesn't require TLS, but this time it's the Git("ssh://...") API that needs to reach the service.

I considered making Git able to depend on a service, but instead opted to support explicitly calling Start on a container to run the service with its lifecycle scoped to the entire session. You can also Detach, i.e. canceling the query context, which will stop it if you're the only one running it. I haven't tested this yet or thought deeply about the API. Just winging it.

In testing I noticed something kind of spooky: ContainerID isn't deterministic! Using WithExec seems to introduce some randomness to the *pb.Definition. This screenshot summarizes the issue:

image

I'm guessing marshalling a LLB definition goes through some nondeterministic ordering when there are multiple "root" vertices. I don't think this has mattered before, but with this change the ContainerID is used to generate the container hostname, so when it changes it ends up in the LLB and busts the cache.

Seems like we could either make ContainerID deterministic - maybe by avoiding directly depending on *pb.Definition - or maybe I could come up with some other way to generate the hostname.

The second test seems like some kind of flakiness introduced by the CNI setup, unrelated to the particular test. So that's concerning.

@vito

vito commented Feb 6, 2023

Copy link
Copy Markdown
Contributor Author

Another option is to do away with content-addressed hostnames and service deduping and just generate unique hostnames instead, but the tricky part is that we need the hostname before or at the time we handle WithExec, since we need to build its LLB definition with the llb.Hostname RunOption. So we can't do WithExec(args, opts).Start(), but we could perhaps do Start(args, opts) or WithRandomHostname().WithExec(args, opts).Start() etc.

vito added 8 commits February 6, 2023 19:10
* useful as an alternative to introducing service dependencies
  everywhere (e.g. Git <-> SSH agent service)
* returned session has a unique ID valid within the session, which can
  theoretically be used to detach from it (untested)
* WIP git test, doesn't work yet because hostnames are nondeterministic

Signed-off-by: Alex Suraci <[email protected]>
build LLB without llb.Hostname, use that digest as the hostname, and
then rebuild with llb.Hostname

Signed-off-by: Alex Suraci <[email protected]>
Signed-off-by: Alex Suraci <[email protected]>
hashing a hash feels wrong for some reason, let's hash the full payload
instead

Signed-off-by: Alex Suraci <[email protected]>
unsure if I want to keep this forever, but it's needed now that we do
'if len(ports) > 0' before generating the hostname

should probably have Hostname return an error if there isn't one set

Signed-off-by: Alex Suraci <[email protected]>
@vito

vito commented Feb 7, 2023 •

Copy link
Copy Markdown
Contributor Author

Good news: I found a way around relying on the ContainerID. The tl;dr is we just build the LLB Exec op without the hostname first, marshal it, hash it to create the hostname, and then re-build it with the hostname. This replaced the gross hack from before (hash(parent.ContainerID + fmt.Sprintf("%v", execOpts))) and seems a lot more airtight. We're effectively creating our own digest of the vertex, just base32+xxh3 instead of sha256, so it should have the same stability guarantees that vertex digests need for caching. (Making some assumptions here about how Buildkit works.)

The commit is 0becf38 but it might get lost in rebases in the future, so Ctrl+F "non-hacky way for generating hostnames".

All the tests are passing now (:tada:) but I want to do a lot more testing before shipping it. Still a bit spooked by that flake from before.

Also still need to decide how we want to represent things like the Git example, where we have a non-Container type depend on a service.

Option A (start service in the session) (currently implemented):

	_, err = sshSvc.Start().ID(ctx)
	require.NoError(t, err)

	sshHost, err := sshSvc.Hostname(ctx)
	require.NoError(t, err)

	entries, err := c.Git(fmt.Sprintf("ssh://root@%s:%d/root/repo", sshHost, sshPort)).
		Branch("main").
		Tree(dagger.GitRefTreeOpts{
			SSHKnownHosts: fmt.Sprintf("[%s]:%d %s", sshHost, sshPort, strings.TrimSpace(hostPubKey)),
			SSHAuthSocket: c.Host().UnixSocket(sock),
		}).Entries(ctx)
	require.NoError(t, err)
	require.Equal(t, []string{"README.md"}, entries)

Option B (introduce service dependency for Git):

	sshHost, err := sshSvc.Hostname(ctx)
	require.NoError(t, err)

	entries, err := c.Git(fmt.Sprintf("ssh://root@%s:%d/root/repo", sshHost, sshPort)).
		WithServiceDependency(sshSvc).
		Branch("main").
		Tree(dagger.GitRefTreeOpts{
			SSHKnownHosts: fmt.Sprintf("[%s]:%d %s", sshHost, sshPort, strings.TrimSpace(hostPubKey)),
			SSHAuthSocket: c.Host().UnixSocket(sock),
		}).Entries(ctx)
	require.NoError(t, err)
	require.Equal(t, []string{"README.md"}, entries)

Option A works but feels a little messy. For example, any files or directories returned by Git are detached from their dependent service. What if they're passed to something else that outlasts the service or session? (We don't have to care, but it's nice to avoid these gotchas anyhow.)

Option B is a bit odd, because it's surprising that we need a service dependency for Git, but it does feel more "pure." I think I'm talking myself into supporting it at this point. We'll already need File/Directory to be able to depend on services, anyway, since a Container that depends on services needs to convey it to Files/Directories that the user queries beneath it.

vito added 2 commits February 7, 2023 16:22
also add service dependencies to Git source, which conveys them to
File/Directory. the Git API is more useful for testing File/Directory
service dependencies since it doesn't force a cache to be warmed before
using their APIs.

Signed-off-by: Alex Suraci <[email protected]>
This was added so that the Git API could use services, but it's better
to express an explicit dependency even in that case.

Allowing an explicit Start makes code stateful and order-dependent. If
we decide that's OK after all, we can revert this commit, but for now it
seems better to continue down the path of having explicit dependencies.

Signed-off-by: Alex Suraci <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 10, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5.0, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 10, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5.0, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 10, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5.0, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 16, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5.0, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 16, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5.0, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 16, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5.0, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 16, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5.0, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 16, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 16, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to gerhard/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
thechangelog#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
thechangelog@83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
gerhard added a commit to thechangelog/changelog.com that referenced this pull request Mar 17, 2023
This is a follow-up to
#446

With service containers support - a.k.a. container-to-container
networking - landing in the recently released Dagger Go SDK v0.5, we
can now run a test PostgreSQL db straight in our Dagger pipeline, a `mix
test` requirement. This means that we can finally migrate from Dagger v0.1 💪

FTR: dagger/dagger#4505

With this in place, we can also revert
83e8268

We are also uploading static assets at build time, not at boot time.
This will speed boot times considerably. We are spending more than 1
minute on every app start due to those assets being uploaded (most of
them are getting skipped anyways - an improvement for another day).

Notice the s3_static.ex change. We are using ExAws.request! so that the
task will fail if any of the static asset files cannot be uploaded to
S3. Without this change, ops can fail silently and we will not know
about it.

Signed-off-by: Gerhard Lazu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants