Skip to content

chore: Rename test-dagger-engine to dagger-engine.dev - #4371

Merged
gerhard merged 1 commit into
dagger:mainfrom
gerhard:rename-test-dagger-engine
Jan 12, 2023
Merged

gerhard merged 1 commit into
dagger:mainfrom
gerhard:rename-test-dagger-engine

Conversation

@gerhard

@gerhard gerhard commented Jan 12, 2023 •

Copy link
Copy Markdown
Contributor

Because it is a dev dagger-engine that was built from the current source code.

My first instinct was to rename this to dagger-engine-dev, similar to dagger-engine-<SHA>, but there is garbage collection that uses the dagger-engine- prefix, and I didn't want to refactor that in this context. Yes, I was effectively side-stepping that problem since I didn't want to be pulling too much change at once. That is due a refactoring soon, so no point in digging into it now.

By the way, if you have an existing test-dagger-engine running, you will need to remove it manually. You will also need to prune the volume. I recommend:

docker rm -f test-dagger-engine
docker volume prune

This is related to a discussion we had with @sipsma in the context of #4300

Because it is a dev dagger-engine that was built from the current source code.

My first instinct was to rename this to dagger-engine-dev, similar to
dagger-engine-<SHA>, but there is garbage collection that uses the
dagger-engine- prefix, and I didn't want to refactor that in this
context. Yes, I was effectively side-stepping that problem since I
didn't want to be pulling too much change at once. That is due a
refactoring soon, so no point in digging into it now.

By the way, if you have an existing test-dagger-engine running, you will
need to remove it manually. You will also need to prune the volume. I
recommend:

    docker rm -f test-dagger-engine
    docker volume prune

Signed-off-by: Gerhard Lazu <[email protected]>
@gerhard

gerhard commented Jan 12, 2023

Copy link
Copy Markdown
Contributor Author

Looking into the test / engine failure.

@gerhard

gerhard commented Jan 12, 2023 •

Copy link
Copy Markdown
Contributor Author

There is a flaky engine test:

#19 182.5 #3 ERROR: process "sh -c echo VEhJUyBTSE9VTEQgR08gVE8gU1RET1VU | base64 -d >&1; echo VEhJUyBTSE9VTEQgR08gVE8gU1RERVJS | base64 -d >&2; exit 1" did not complete successfully: exit code: 1
...

#19 182.5 FAIL
#19 182.5 FAIL  github.com/dagger/dagger/core/integration       174.706s
#19 182.5 ?     github.com/dagger/dagger/core/schema    [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/embed-directories [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/embed-directories/example [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/get-started/step2 [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/get-started/step4 [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/get-started/step5a        [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/get-started/step5b        [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/multiplatform-support/build-images-cross-compilation      [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/multiplatform-support/build-images-emulation      [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/multiplatform-support/non-linux-support   [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/multiplatform-support/pull-images [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/multistage-build  [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/private-repositories      [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/replace-dockerfile        [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/work-with-host-filesystem/export-dir      [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/work-with-host-filesystem/list-dir        [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/work-with-host-filesystem/list-dir-exclude        [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/work-with-host-filesystem/list-dir-exclude-include        [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/work-with-host-filesystem/list-dir-include        [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/work-with-host-filesystem/mount-dir       [no test files]
#19 182.5 ?     github.com/dagger/dagger/docs/current/sdk/go/snippets/work-with-host-filesystem/set-workdir     [no test files]
#19 182.5 ?     github.com/dagger/dagger/engine [no test files]
#19 182.5 ?     github.com/dagger/dagger/internal/engine        [no test files]
#19 182.5 ?     github.com/dagger/dagger/internal/testutil      [no test files]
#19 182.5 ?     github.com/dagger/dagger/project        [no test files]

...

#19 182.5 FAIL
Error: input:1: container.from.exec.withEnvVariable.withExec.withWorkdir.withMountedDirectory.withExec.withMountedDirectory.withUnixSocket.withMountedFile.withMountedFile.withEnvVariable.withEnvVariable.withMountedDirectory.withWorkdir.withEnvVariable.withMountedDirectory.withExec.stdout process "go test -p 16 -v -count=1 ./..." did not complete successful
ly: exit code: 1
time="2023-01-12T15:35:50Z" level=error msg="/moby.buildkit.v1.frontend.LLBBridge/ReadFile returned error: rpc error: code = Unknown desc = process \"go test -p 16 -v -count=1 ./...\" did not complete successfully: exit code: 1\n"
time="2023-01-12T15:35:50Z" level=debug msg="session finished: <nil>"
time="2023-01-12T15:35:50Z" level=error msg="/moby.buildkit.v1.Control/Solve returned error: rpc error: code = Canceled desc = context canceled\n"

Running it again made it pass:

In this other, follow-up PR, it passed the first time: https://github.com/dagger/dagger/actions/runs/3903581177/jobs/6668145212

Locally, the first time it failed in ~4m:

image

The second time, it passed in 1m29s (caching helped):

image

test / engine-race-detection is failing the same way. I have noticed that PRs have been merged with this test flake, and we just re-run to get the green check. Do you know why @aluzzardi @sipsma @vito ?

@sipsma sipsma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code change lgtm, taking a look at the flaky test now too

@sipsma

sipsma commented Jan 12, 2023

Copy link
Copy Markdown
Contributor

@gerhard re: the flaky test, the logs are kind of being red herring, the line that says
ERROR: process "sh -c echo VEhJUyBTSE9VTEQgR08gVE8gU1RET1VU | base64 -d >&1; echo VEhJUyBTSE9VTEQgR08gVE8gU1RERVJS | base64 -d >&2; exit 1" did not complete successfully: exit code: 1

is expected. It's from the TestContainerExecError test which purposely fails an exec to check the error message.

Definitely confusing but I'm not sure what we can do about it in the immediate term. The best way to find test failures right now is to search for FAIL rather than ERROR. Once we have better and more organized logging hopefully we can drill down to just actual failed test cases rather than having to search through a huge pile of intertwined logs.


It looks like the actual failure is here:

#19 153.9 === CONT  TestPipeline/directory_pipeline
#19 153.9     pipeline_test.go:79: 
#19 153.9         	Error Trace:	/app/core/integration/pipeline_test.go:79
#19 153.9         	Error:      	"" does not contain "directory pipeline"
#19 153.9         	Test:       	TestPipeline/directory_pipeline
#19 153.9 --- FAIL: TestPipeline (0.00s)
#19 153.9     --- FAIL: TestPipeline/directory_pipeline (2.90s)
#19 153.9     --- PASS: TestPipeline/container_pipeline (3.08s)

@gerhard

gerhard commented Jan 12, 2023

Copy link
Copy Markdown
Contributor Author

Thank you for digging into this @sipsma. I will go ahead and merge this now.

We should keep an eye on this flake, and eventually fix it. For now, raising awareness is sufficient.

@gerhard
gerhard merged commit 6848b27 into dagger:main Jan 12, 2023
@gerhard
gerhard deleted the rename-test-dagger-engine branch January 12, 2023 17:28
@aluzzardi

aluzzardi commented Jan 12, 2023 •

Copy link
Copy Markdown
Contributor

It looks like the actual failure is here:

Yeah :/

I'm reading the logs in the test. Unfortunately, client.Close() doesn't flush the logs, so it's possible the messages didn't make it to the test yet

EDIT: opened #4375 to track this

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.

3 participants