Skip to content

ci(flake): socket default not found #8385

Closed

Description

@grouville

There seems to be a flake / race on the socket resolving, when running the test suite in parallel: socket default not found.

A bit confused by this error: https://dagger.cloud/dagger/traces/6d3e1fd82f7bb9ee5ff855155a6f9e97?span=c24cdc1442769090#c24cdc1442769090:L5

From current understanding, I think this flake is the result of a deeper issue on the socket / git resolving, not at the test suite level, but at the engine itself

It seems to originate from https://github.com/dagger/dagger/blob/main/core/schema/modulesource.go#L164-L167, which is a bit surprising. Basically, once we have the proper ref, we try to resolve the commit with https://github.com/dagger/dagger/blob/main/core/git.go#L69-L87. What it says here is that: I received an SSH key, but failed to find / retrieve the socket:

func (ref *GitRef) Commit(ctx context.Context) (string, error) {
	bk, err := ref.Query.Buildkit(ctx)
	if err != nil {
		return "", fmt.Errorf("failed to get buildkit client: %w", err)
	}
	st, err := ref.getState(ctx)
	if err != nil {
		return "", err
	}
	p, err := resolveProvenance(ctx, bk, st)
	if err != nil {
		return "", err
	}
	if len(p.Sources.Git) == 0 {
		return "", errors.Errorf("no git commit was resolved")
	}
	return p.Sources.Git[0].Commit, nil
}

Error is triggered probably by either getState() or gitdns.Git(). Have to dig a bit deeper, but tricky as hard to replicate

Activity

  1. self-assigned this
    on Sep 9, 2024
  2. jedevc commented on Sep 26, 2024

    @jedevc
    Contributor

    As suggested by @sipsma in #8574 (comment), I think this is potentially caused by the caching socket issue, very similar to what I described around secrets in #8358 (comment) (though the solution we used there doesn't really apply).

    Marking Git.tree and Git.tags as impure feels like it would work - but at least for Git.tags, that means that the result would never cache (tree does because it goes through buildkit), which feels bad.

    Potentially we could just remove this flake with just Git.tree impurity, and we should add it to Git.tags but it feels so over the top. I wonder if there's a "lighter" form of dagql cache invalidation we could use here.

  3. added
    kind/bug
    on Sep 27, 2024
  4. added
    kind/flake
    on Oct 10, 2024
  5. sipsma commented on Oct 10, 2024

    @sipsma
    Contributor

    I don't think I've seen this one since #8574 was merged, so may be fixed, but will give it another week or two before closing out

  6. sipsma commented on Oct 10, 2024

    @sipsma
    Contributor

    Ah well, speak of the devil: https://dagger.cloud/dagger/traces/49a0fd005179147817c927d79ba7179c

    Didn't look in detail yet but wondering if other tests just need the same fix as #8574 (cc @grouville)

  7. jedevc commented on May 2, 2025

    @jedevc
    Contributor

    We haven't seen this in a while, closing 🎉

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

Metadata

Metadata

Assignees

Labels

area/cikind/bugkind/flake

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions