Skip to content

Publish the Go SDK at v0.1.4 #39

Closed

Description

@Nabhag8848

The Go modules are already published at v0.1.3. Publish v0.1.4 for internal/contracts, internal/sdk, the sandbox module, the Daytona provider, and the Modal provider after #37 lands on main. That PR adds the shared filesystem on the sandbox handle for Daytona and Modal. The TypeScript release is #38.

Applications install the sandbox module and one provider. Tag the two internal modules as well. A downstream build ignores replace lines that come from a dependency, so each tagged module must require the real tag of the module under it. Generated contracts gain filesystem messages, so contracts moves. internal/sdk has no filesystem runtime change in this branch; bump it to v0.1.4 only so its require of contracts stays aligned with the release set. A v0.1.3 provider does not build against sandbox v0.1.4.

Modules

Module Publish Why
github.com/sandbox-kit/kit/sdks/go/internal/contracts v0.1.4 Generated types add FileInfo, FileType, and the filesystem option messages. No sibling requirement.
github.com/sandbox-kit/kit/sdks/go/internal/sdk v0.1.4 No filesystem code change; bump so the module requires contracts v0.1.4 with the rest of the release set.
github.com/sandbox-kit/kit/sdks/go/sandbox v0.1.4 Public Sandbox.Filesystem with the eight shared calls, path validation, and FileField* constants. Requires contracts and internal/sdk at v0.1.4.
github.com/sandbox-kit/kit/sdks/go/providers/daytona v0.1.4 Filesystem adapter; local path classification; CopyToLocal creates missing local parents; toolbox-backed list/stat metadata. Requires sandbox and internal/sdk at v0.1.4.
github.com/sandbox-kit/kit/sdks/go/providers/modal v0.1.4 Filesystem adapter; local path classification before native copy; Parents default true. Requires sandbox and internal/sdk at v0.1.4.

Leave these unpublished:

  • tooling/
  • examples/go/ (update their require versions; do not tag them)
  • website/

Leave every replace line in the repo so a checkout still builds. Daytona stays on github.com/daytona/clients/sdk-go v0.225.0. Modal stays on github.com/modal-labs/modal-client/go v0.11.1. The Go minimum stays 1.26.0.

flowchart LR
  contracts["internal/contracts v0.1.4"] --> sdk["internal/sdk v0.1.4"]
  contracts --> sandbox["sandbox v0.1.4"]
  sdk --> sandbox
  sandbox --> daytona["providers/daytona v0.1.4"]
  sandbox --> modal["providers/modal v0.1.4"]
  sdk --> daytona
  sdk --> modal
Loading

What v0.1.4 changes

Daytona and Modal share one filesystem on the sandbox handle. The eight calls are ReadFile, WriteFile, CopyFromLocal, CopyToLocal, MakeDirectory, ListDirectory, Stat, and Remove. Lifecycle stays on the handle. Closing the client or handle does not delete files or the sandbox.

A sandbox path must be absolute. A relative, blank, or NUL path fails in Kit before the provider is called; the field is path. WriteFile normalizes only a nil buffer to an empty slice before the provider call. Copy uses a path on the caller's disk; a missing local source is not found and a local directory is an invalid argument, both with field local_path, before the provider call. CopyToLocal creates missing local parent directories (Daytona creates them in Kit because native DownloadFile uses os.WriteFile only). An existing local directory destination is rejected with the same field.

Parents defaults to true on MakeDirectory. Daytona rejects Parents false. Modal requires the parent when Parents is false. Every Go file call uses the context as the deadline, so 1500 * time.Millisecond ends the call at 1.5 seconds. Go Daytona list and stat keep path, permissions, owner, group, and a fractional modifiedAt when Daytona sends them.

Guides under docs/filesystem.md and the provider READMEs describe the same surface. Runnable examples live under examples/go/<provider>/filesystem/.

Steps

Do this on current main after #37 merges. Tag the version-bump commit. Leave every replace line. Do not move the v0.1.3 tags.

  1. In sdks/go/internal/sdk/go.mod, set github.com/sandbox-kit/kit/sdks/go/internal/contracts from v0.1.3 to v0.1.4. Leave replace => ../contracts.
  2. In sdks/go/sandbox/go.mod, set internal/contracts and internal/sdk from v0.1.3 to v0.1.4. Leave both replace lines.
  3. In sdks/go/providers/daytona/go.mod and sdks/go/providers/modal/go.mod, set sdks/go/sandbox and internal/sdk from v0.1.3 to v0.1.4. Leave the replace lines.
  4. In each module under examples/go/daytona, set sdks/go/sandbox and sdks/go/providers/daytona to v0.1.4.
  5. In each module under examples/go/modal, set sdks/go/sandbox and sdks/go/providers/modal to v0.1.4.
  6. From sdks/go/internal/contracts, sdks/go/internal/sdk, sdks/go/sandbox, sdks/go/providers/daytona, and sdks/go/providers/modal, run GOWORK=off go mod tidy. From the repo root, run GOWORK=off go run ./tooling/cmd/sandbox-kit test go.
  7. Commit the version bump.
  8. Tag that commit and push the tags. Push in dependency order. The contracts tag must exist before internal/sdk or sandbox is fetched, and the sandbox and internal/sdk tags must exist before either provider is fetched:
git tag sdks/go/internal/contracts/v0.1.4
git push origin sdks/go/internal/contracts/v0.1.4

git tag sdks/go/internal/sdk/v0.1.4
git push origin sdks/go/internal/sdk/v0.1.4

git tag sdks/go/sandbox/v0.1.4
git push origin sdks/go/sandbox/v0.1.4

git tag sdks/go/providers/daytona/v0.1.4
git push origin sdks/go/providers/daytona/v0.1.4

git tag sdks/go/providers/modal/v0.1.4
git push origin sdks/go/providers/modal/v0.1.4
  1. In a clean directory outside this repo, confirm a consumer can fetch the new modules:
go mod init example.com/sandbox-kit-check
go get github.com/sandbox-kit/kit/sdks/go/internal/contracts@v0.1.4
go get github.com/sandbox-kit/kit/sdks/go/internal/sdk@v0.1.4
go get github.com/sandbox-kit/kit/sdks/go/sandbox@v0.1.4
go get github.com/sandbox-kit/kit/sdks/go/providers/daytona@v0.1.4
go get github.com/sandbox-kit/kit/sdks/go/providers/modal@v0.1.4

Apps install the core module and one provider:

go get github.com/sandbox-kit/kit/sdks/go/sandbox@v0.1.4
go get github.com/sandbox-kit/kit/sdks/go/providers/daytona@v0.1.4
# or .../providers/modal@v0.1.4

Checklist

  • Add a shared filesystem for Daytona and Modal #37 is on main
  • Filesystem guides and public comments are on main
  • Companion TypeScript release issue is linked (Publish the TypeScript packages at 0.1.6 #38)
  • Bump require versions to v0.1.4 in internal/sdk, sandbox, both providers, and the Go examples
  • Leave every replace line
  • sandbox-kit test go passes
  • Tag and push sdks/go/internal/contracts/v0.1.4
  • Tag and push sdks/go/internal/sdk/v0.1.4
  • Tag and push sdks/go/sandbox/v0.1.4
  • Tag and push sdks/go/providers/daytona/v0.1.4
  • Tag and push sdks/go/providers/modal/v0.1.4
  • go get of sandbox and one provider succeeds outside this repo

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions