Skip to content

Rename cloak to dagger - #3261

Merged
aluzzardi merged 5 commits into
dagger:cloakfrom
gerhard:rename-cloak-to-dagger
Oct 6, 2022
Merged

aluzzardi merged 5 commits into
dagger:cloakfrom
gerhard:rename-cloak-to-dagger

Conversation

@gerhard

@gerhard gerhard commented Oct 5, 2022 •

Copy link
Copy Markdown
Contributor

⚠️ This is a significant & disruptive change, please read this message with the care & attention so that the surprises are kept to a minimum ⚠️

"Project Cloak" was the codename for what will become Dagger v0.3.x. As we start preparing to ship Dagger v0.3.x pre-releases, we need to use the same "dagger" name everywhere so that:

  1. Users keep the same entrypoint: the dagger binary

  2. The tooling that installs dagger (e.g. HomeBrew, install.sh, install.ps) largely continues working as is. The only difference is that now the tooling will gain the functionality to install pre-releases of dagger.

There is more context here (including what happens after this gets merged): #3176 (comment)

@gerhard
gerhard changed the base branch from main to cloak October 5, 2022 15:30
@gerhard
gerhard marked this pull request as draft October 5, 2022 15:31
@gerhard

gerhard commented Oct 5, 2022

Copy link
Copy Markdown
Contributor Author

@aluzzardi has all the context since we discussed this sync & ended up with this list of action items: #3176 (comment)

I am converting this to a draft PR until I have confirmed that all checks are passing. This is a significant change, I want to make sure that everything lines up properly before it hits the review cycle. For now, sharing this for everyone's visibility was most important to me.

@gerhard

gerhard commented Oct 5, 2022

Copy link
Copy Markdown
Contributor Author

There is an ongoing incident with GitHub Actions which explains why the checks are not running currently: https://www.githubstatus.com/incidents/smn1qtqvbsb6

@shykes

shykes commented Oct 5, 2022

Copy link
Copy Markdown
Contributor

Thanks Gerhard.

  1. Can we have the checklist in its own issue?
  2. At what point to we finalize the syntax for the new dagger? The current syntax is ad hoc and we never discussed its design end to end. I would like an opportunity for that.

@netlify

netlify Bot commented Oct 5, 2022 •

Copy link
Copy Markdown

✅ Deploy Preview for cloak-docs ready!

Name Link
🔨 Latest commit 553108a
🔍 Latest deploy log https://app.netlify.com/sites/cloak-docs/deploys/633f098154af90000a5b4df8
😎 Deploy Preview https://deploy-preview-3261--cloak-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@aluzzardi

Copy link
Copy Markdown
Contributor

@gerhard Do you want to go ahead and merge this? Must be painful to maintain ... /cc @sipsma

@sipsma

sipsma commented Oct 5, 2022

Copy link
Copy Markdown
Contributor

I only have one concern, which is that the nodejs and python engine sdks relied on finding the cloak binary in their path, now they rely on dagger. This means that users have to be sure that they have the most recent dagger built from the cloak branch. That's fine, I just fear that it's more likely users have some existing europa dagger binary laying around and now the engine sdk will find that and not work.

There's not all that much we can do here in the immediate term besides document that users need to build dagger from cloak branch and put that in their PATH. Longer term this will be improved by including the binary w/ the npm/python packages.

Above isn't a blocker though, I agree that it will be highly painful to maintain this branch so we should be biased towards merging asap.

@gerhard

gerhard commented Oct 5, 2022 •

Copy link
Copy Markdown
Contributor Author

@shykes 1. Can we have the checklist in its own issue?

Done: #3176 (comment)

@shykes 2. At what point to we finalize the syntax for the new dagger? The current syntax is ad hoc and we never discussed its design end to end. I would like an opportunity for that.

I expect this to happen over the next week. From a pre-release process perspective, this can happen in parallel - I don't see any coupling. My aim is to get alpha pre-releases published. We don't have to announce them, they just need to be available. People can try them out, but there is no guarantee on anything (the syntax can change as it needs to).

As we make progress over the coming weeks, we can decide to move onto Betas or RCs.

Beta to me signals one step closer to the GA and less change, but still no guarantees. At that point, we should start involving users and aim to finalise the big items like the syntax.

As soon as we hit the RCs stage, I would expect us to freeze new features and only publish fixes. By then, I would expect the new dagger syntax to be locked in. We can start any of these stages whenever we feel we are ready. We can also skip them. My preference would be not to, but I am easy.

As long as we are exercising the release process regularly, I am easy on the steps towards GA. This PR is the first step towards building a release process for v0.3.x.

@gerhard

gerhard commented Oct 5, 2022

Copy link
Copy Markdown
Contributor Author

Do you want to go ahead and merge this? Must be painful to maintain ...

@aluzzardi as soon as we have confidence that the tests pass and everything looks good, yes.

I have a few more questions to answer and figure out why the tests GitHub Action has not run. I am keen on converting this into Ready for review in the next hour or so. Will update if I don't get there within this time-box.

@gerhard

gerhard commented Oct 5, 2022

Copy link
Copy Markdown
Contributor Author

@sipsma I only have one concern, which is that the nodejs and python engine sdks relied on finding the cloak binary in their path, now they rely on dagger. This means that users have to be sure that they have the most recent dagger built from the cloak branch. That's fine, I just fear that it's more likely users have some existing europa dagger binary laying around and now the engine sdk will find that and not work.

WDYT about the SDKs failing if the dagger binary version does not start with 0.3. ?

@sipsma I agree that it will be highly painful to maintain this branch so we should be biased towards merging asap.

I am giving myself a 1h time-box for this.

@sipsma

sipsma commented Oct 5, 2022

Copy link
Copy Markdown
Contributor

WDYT about the SDKs failing if the dagger binary version does not start with 0.3. ?

That's a good idea, we can at least have a clear error message then

@gerhard

gerhard commented Oct 5, 2022

Copy link
Copy Markdown
Contributor Author

I am stopping now. I am trying to understand why the buildkitd version is empty:

go test -v -run TestContainerWithMountedDirectory ./core/integration/container_test.go

=== RUN   TestContainerWithMountedDirectory
=== PAUSE TestContainerWithMountedDirectory
=== RUN   TestContainerWithMountedDirectorySourcePath
=== PAUSE TestContainerWithMountedDirectorySourcePath
=== RUN   TestContainerWithMountedDirectoryPropagation
=== PAUSE TestContainerWithMountedDirectoryPropagation
=== CONT  TestContainerWithMountedDirectory
    container_test.go:440:
                Error Trace:    /workdir/core/integration/container_test.go:440
                Error:          Received unexpected error:
                                buildkitd version is empty
                Test:           TestContainerWithMountedDirectory
=== CONT  TestContainerWithMountedDirectoryPropagation
--- FAIL: TestContainerWithMountedDirectory (0.00s)
=== CONT  TestContainerWithMountedDirectorySourcePath
=== CONT  TestContainerWithMountedDirectoryPropagation
    container_test.go:581:
                Error Trace:    /workdir/core/integration/container_test.go:581
                Error:          Received unexpected error:
                                buildkitd version is empty
                Test:           TestContainerWithMountedDirectoryPropagation
=== CONT  TestContainerWithMountedDirectorySourcePath
    container_test.go:517:
                Error Trace:    /workdir/core/integration/container_test.go:517
                Error:          Received unexpected error:
                                buildkitd version is empty
                Test:           TestContainerWithMountedDirectorySourcePath
--- FAIL: TestContainerWithMountedDirectoryPropagation (0.00s)
--- FAIL: TestContainerWithMountedDirectorySourcePath (0.00s)
FAIL
FAIL    command-line-arguments  0.011s
FAIL

I found this

// Workaround the fact that debug.ReadBuildInfo doesn't work in tests:
// https://github.com/golang/go/issues/33976
func StartGoModBuildkitd(ctx context.Context) (string, error) {
out, err := exec.Command("go", "list", "-m", "github.com/moby/buildkit").CombinedOutput()
if err != nil {
return "", err
}
trimmed := strings.TrimSpace(string(out))
_, version, ok := strings.Cut(trimmed, " ")
if !ok {
return "", fmt.Errorf("unexpected go list output: %s", trimmed)
}
return startBuildkitdVersion(ctx, version)
}
, but this workaround is not being used in the cloak branch when invoked as above (the same failure happens). Am I missing something @sipsma?

@sipsma

sipsma commented Oct 6, 2022

Copy link
Copy Markdown
Contributor

I am stopping now. I am trying to understand why the buildkitd version is empty:

I am not at all sure, but I also am not seeing that failure in CI. In CI runs I'm seeing us consistently get:

        	Error:      	Received unexpected error:
        	            	input:5: core.filesystem.file failed to read file: ResourceExhausted: grpc: received message larger than max (10315513 vs. 4194304)
        	Test:       	TestGoGenerate
--- FAIL: TestGoGenerate (64.67s)

Which is... extremely odd. I can reproduce it locally though when pulling this branch, so I will debug and push a fix here.

@sipsma

sipsma commented Oct 6, 2022 •

Copy link
Copy Markdown
Contributor

@gerhard noticed that the PR seemed to accidentally have a go binary committed, that was the cause of the grpc: received message larger than max error. Tests pass for me locally after that.

For the original issue you posted about the buildkitd version error, I can reproduce it if I run your exact command, but if I run the slight variant of go test -v -run TestContainerWithMountedDirectory ./core/integration/ then the test passes.

I think this is because our integration tests rely on some special magic done in an init func in suite_test.go in that package, and without that init func running they can't start buildkitd. There's a whole back story here, happy to share more and dig up the original commits if desired, but suffice it to say that you need to specify the full ./core/integration package when running tests.

That's not obvious though of course. I guess we need some developer documentation. I'll add a bare-bones TESTING.md for now.

EDIT: pr for that here #3267

@sipsma sipsma mentioned this pull request Oct 6, 2022
Gerhard Lazu and others added 3 commits October 6, 2022 10:33
This is a significant & disruptive change, please read this message with
the care & attention so that the surprises are kept to a minimum.

"Project Cloak" was the codename for what will become Dagger v0.3.x. As
we start preparing to ship Dagger v0.3.x pre-releases, we need to use
the same "dagger" name everywhere so that:

1. Users keep the same entrypoint: the `dagger` binary

2. The tooling that installs `dagger` (e.g. HomeBrew, install.sh,
   install.ps) largely continues working as is. The only difference is
   that now the tooling will gain the functionality to install
   pre-releases of `dagger`.

There is more context here (including what happens after this gets
merged): #3176 (comment)

Signed-off-by: Gerhard Lazu <[email protected]>
Makes ad-hoc debugging straightforward. FWIW:
#3261 (comment)

Signed-off-by: Gerhard Lazu <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
@gerhard
gerhard marked this pull request as ready for review October 6, 2022 10:01
@gerhard

gerhard commented Oct 6, 2022

Copy link
Copy Markdown
Contributor Author

@aluzzardi please review and merge if it all looks good to you.

I will add the next PR on top of this one.

@aluzzardi

Copy link
Copy Markdown
Contributor

WDYT about the SDKs failing if the dagger binary version does not start with 0.3. ?

Alternatively, to avoid an extra roundtrip (e.g. SDK executing an additional "dagger version" command), we could just catch from the SDK "dev: command not found" and rewrite the error, since that's what's going to happen when using the SDK on 0.2.x.

@gerhard

gerhard commented Oct 6, 2022

Copy link
Copy Markdown
Contributor Author

@aluzzardi Alternatively, to avoid an extra roundtrip (e.g. SDK executing an additional "dagger version" command), we could just catch from the SDK "dev: command not found" and rewrite the error, since that's what's going to happen when using the SDK on 0.2.x.

That is a good idea!

While it was easy to figure out where to put the dagger version check, I have not yet figured out how to test this (even manually). Keeping that discussion for the next PR.

As for this PR, let me rename dagger.yaml back to cloak.yaml before we merge it. FTR #3016

Gerhard Lazu added 2 commits October 6, 2022 17:54
There is another change coming in hot, we don't want to rename this file
twice: #3016

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

@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.

LGTM, thanks for updating back to cloak.yaml last minute

@aluzzardi
aluzzardi merged commit f3a5575 into dagger:cloak Oct 6, 2022
@gerhard
gerhard deleted the rename-cloak-to-dagger branch October 7, 2022 09:45
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.

4 participants