#Changes in zenith between 0.9.5 ~ 0.9.7

1 messages · Page 1 of 1 (latest)

left stag
#

I'm cleaning up my system caches completely and re-try it again but it seems we have couple of breaking changes between versions.

upbeat comet
#

ahh there's definitely been a few changes 😢
cc @winged steppe @restive steeple

#

do you have an example of how this is caused?

#

And then there's also a lot of changes to bring in our own graphql server, which could potentially be related?

left stag
#

sadly no, I'm just running a basic workflow on top level module. I need to investigate further to make it sense.

left stag
#
// Binds the artifact service as a service to the given container and configures ACTIONS_RUNTIME_URL and
// ACTIONS_RUNTIME_TOKEN to allow the artifact service to communicate with the github actions runner.
func (m *ActionsArtifactcacheService) BindAsService(
    // context to use for binding the artifact service.
    ctx context.Context,
    // container to bind the artifact service to.
    ctr *Container,
) (*Container, error) {
    service, err := m.Service(ctx)
    if err != nil {
        return nil, err
    }

    endpoint, err := service.Endpoint(ctx, ServiceEndpointOpts{Port: 8081, Scheme: "http"})
    if err != nil {
        return nil, err
    }

    // normalise the endpoint to remove the trailing slash -- dagger returns the endpoint without the trailing slash
    // but the github actions expects the endpoint with the trailing slash
    endpoint = endpoint + "/"

    // bind the service to the container
    ctr = ctr.WithServiceBinding("artifact-cache-service", service)

    // set the runtime url and token
    ctr = ctr.WithEnvVariable("ACTIONS_CACHE_URL", endpoint).WithEnvVariable("ACTIONS_RUNTIME_TOKEN", "token")

    return ctr, nil
}

this is how I bind services to runner container. I wonder is there any change here effect networking of container?

winged steppe
#

I don't see any Sync() calls here but it's just as likely that there's some other common element (i.e. Sync not being the root cause)

left stag
#

it seems similar error. I removed the sync because when I return a container it was executing pipeline twice.

#

however, error seems same

upbeat comet
#

not entirely sure the mechanics of ParentClientIDs, don't really get that connection

junior hill
upbeat comet
junior hill
#

My working repro uses typescript lol, hold please gotta whip up a new one

#

based on what works/doesn't work in my repro it does seem like a lifecycle issue, though

junior hill
#

using the main_test.go from examples/sdks/go/db-service,

func (r *Repro) Test(ctx context.Context, src *Directory) (*Container, error) {
    // Database service used for application tests
    database := db().AsService()
    // Run application tests
    test := dag.Golang().Ctr().
        WithServiceBinding("db", database).     // bind database with the name db
        WithEnvVariable("DB_HOST", "db").       // db refers to the service binding
        WithEnvVariable("DB_PASSWORD", "test"). // password set in db container
        WithEnvVariable("DB_USER", "postgres"). // default user in postgres image
        WithEnvVariable("DB_NAME", "postgres"). // default db name in postgres image
        WithDirectory("/src", src).
        WithWorkdir("/src").
        WithExec([]string{"go", "test"}) // execute go test

    _, err := test.Sync(ctx)
    if err != nil {
        return nil, err
    }

    return test, nil
}

func db() *Container {
    return dag.Container().From("postgres:16").
        WithEnvVariable("POSTGRES_PASSWORD", "test").
        WithExec([]string{"postgres"}).
        WithExposedPort(5432)
}
upbeat comet
#

aha, nice ❤️

#

i'll bisect it, thanks @junior hill ❤️ ❤️

winged steppe
#

i guess here comes the power of ✨ binary search ✨

upbeat comet
#

i assume this is a module?

junior hill
#

yeah I can send the whole directory if you want

upbeat comet
#

oh no, that should be fine

#

i was just like what

upbeat comet
#

Eyy ok:

9bf9f7f303b6768efbba540376a0bd6eae6979a3 is the first bad commit
commit 9bf9f7f303b6768efbba540376a0bd6eae6979a3
Author: Erik Sipsma <erik@dagger.io>
Date:   Mon Jan 15 16:14:37 2024 -0800

    services: key services by server id; auto start cli service flags (#6425)
upbeat comet
restive steeple
upbeat comet
#

out of curiosity, can anyone who's having the issue reproduce it on main?

#

it looks like we might have accidentally "fixed" it