Skip to content

fix go dependencies for buildkit v0.8.1 - #2

Merged
aluzzardi merged 1 commit into
mainfrom
buildkit-fix-gomod
Jan 8, 2021
Merged

aluzzardi merged 1 commit into
mainfrom
buildkit-fix-gomod

Conversation

@aluzzardi

Copy link
Copy Markdown
Contributor

No description provided.

@aluzzardi
aluzzardi merged commit 03a7d0a into main Jan 8, 2021
@aluzzardi
aluzzardi deleted the buildkit-fix-gomod branch January 8, 2021 16:37
@aluzzardi aluzzardi mentioned this pull request Nov 10, 2021
@marcosnils marcosnils mentioned this pull request May 18, 2022
gerhard pushed a commit that referenced this pull request Aug 30, 2023
gerhard pushed a commit that referenced this pull request Sep 18, 2023
* build: clean up build

update pom.xml dependency management
remove unused dependencies
remove unused import

* build: Add maven exec plugin to run the code samples from the CLI
gerhard added a commit that referenced this pull request Sep 18, 2023
* Initial commit

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* Initial version (#1)

Initial version of the SDK
---------

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* Clean up build process & better samples (#2)

* build: clean up build

update pom.xml dependency management
remove unused dependencies
remove unused import

* build: Add maven exec plugin to run the code samples from the CLI

* build: support dependency caching in github action (#3)

* fix: add missing sample in the sample code demo app (#4)

* feat(log): add debug log when response is contains errors. (#5)

Set the log level to debug in integration tests

* fix: support macos arm64 architure by cli downloader (#7)

* fix: client hangs on close (#8)

fix(connection): refactoring of the engine connection package

Move CLIRunner and ConnectParams to a dedicated class file
Replace JSON-B by JSON-P to deserialize the connection parameters
Move the Dagger CLI process execution to the CLI runner (Single-responsibility principle)
Fix process hanging when connection to the engine failed
Improve code style
Add some tests for Connection class

---------

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* build(workflow): enable build on linux and macos (#9)

macos is limited to PR builds
So far windows VM does not support Linux containers

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* build: package jar with dependencies and upload artifacts in github (#11)

package jar with dependencies and upload artifact in github
upload artifact only on push to main
update README.md
---------

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* Move all files into sdk/java subdir

So that this can be imported into dagger/dagger repository

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

* sdk(java): Add experimental warning to README

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

* sdk(java): Rename LICENSE

But keep as is, same as we did for other experimental SDKs.

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

* chore: Add /sdk/java to CODEOWNERS

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

* build: rename package name from 'org.chelonix.dagger.*' to 'io.dagger.*'

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* build(codegen): add introspection query in the codegen plugin resources and use it when schema is not available. Inject the CLI version in the code at build time

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* build: add linter plugin and lint current code

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* build: set development version to 1.0.0-SNAPSHOT. Add "release" profile dedicated to deployment

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* fix: correctly return the dagger CLI path in codegen plugin and fix some log messages

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* build: Add schema for 0.6.4

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* fix: fix coding style for linter

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* build: fix maven versions plugin groupId

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* ci: add java sdk CI
- add initial build worflow in internal/mage/sdk/java.go
- add test & lint actions in github action worflow

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* fix: replace deprecated API calls in tests
- Container.fs -> Container.rootfs
- Container.exec -> Container.withExec

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* fix: Add a static 'from' method to instanciate a Scalar from a String literal

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* fix(doc): fix javadoc for field parameters in generated code

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* fix: Fix NPE when CLI download fails and log error

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* fix(codegen): clarify codegen plugin parameters and Dagger version in generated code

Separate CLI and SDK version
Use either a previously generated schema or a query a locally installed dagger CLI
update the CI to generate the schema matching the used dagger CLI

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* fix(codegen): fix sdk:java:generate goal

Now the generate goal will query the dagger CLI to generate the API JSON schema and write a file
A new dagger-codegen:generateSchema plugin goal has been added to the  dagger-codegen maven plugin (with some code refactoring between both goals) to generate the schema. The generate schema is copied to plugin resources dir /schemas according to the engine version declared in the pom.xml file afterwards.
The schema file naming has been simplifying (removing the 'v' prefix) and the existing files have been renamed accordingly

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* feat(codegen): add schema for dagger engine 0.8.3 and 0.8.4

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* doc(codegen): document how to bump engine dependency

Signed-off-by: Jean-Christophe Sirot <[email protected]>

* Remove redundant return & go fmt

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

* Make Java SDK workflow standalone, same as the Elixir one

Leverage the re-usable _hack_make workflow.

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

* Use same Apache 2.0 license as all other SDKs

Engine & CLI use the same Apache 2.0 license.

Signed-off-by: Jean-Christophe Sirot <[email protected]>

---------

Signed-off-by: Jean-Christophe Sirot <[email protected]>
Signed-off-by: Jean-Christophe Sirot <[email protected]>
Signed-off-by: Gerhard Lazu <[email protected]>
Signed-off-by: Jean-Christophe Sirot <[email protected]>
Co-authored-by: Jean-Christophe Sirot <[email protected]>
Co-authored-by: Jean-Christophe Sirot <[email protected]>
Co-authored-by: Daniel Lavoie <[email protected]>
tiborvass pushed a commit to tiborvass/dagger that referenced this pull request Jun 8, 2026
* go: fix self-call field names

Problem:
When a Go module has SELF_CALLS enabled, the Go SDK writes the module schema
that is then used to generate the module's own Go client.

For exported fields, that schema was using the Go name directly. So a field
called Message was exposed as Message.

The engine exposes that same field as message. Because of that mismatch, the
generated Go client could be wrong. In the case we found, it could generate a
field and a method with the same Go name, which does not compile.

Fix:
Emit exported fields with the same name the engine uses. Message now becomes
message.

Test:
Add a Message field to the existing Go self-call fixture and query message from
the integration test. This proves the generated Go code compiles and the field
is available under the expected name.

Signed-off-by: Guillaume de Rouville <[email protected]>

* tests: cover self-calls from dependencies

Problem:
The review raised a possible failure where a Go module with SELF_CALLS works
when called directly, but breaks when another module depends on it.

If that happened, the caller could still generate Go code for dag.Dep(), but
the running engine would not expose dep at runtime. The user would only see the
failure when calling the function.

We did not reproduce that exact failure, but this is still a useful area to
cover because it is easy to miss. A module dependency is loaded through a
different path than the module being called directly.

Solution:
Add two small Go fixtures:

- self-calls-as-dep: caller -> dep
- self-calls-transitive: caller -> middle -> dep

Only dep has SELF_CALLS enabled. That keeps the tests focused on the dependency
case from the review.

Tests:
viaDep calls a dependency function that calls itself through dag.Dep().

viaDepContainer returns a container created by that self-call and then reads
stdout from the caller. This proves the returned object is still usable.

viaDepWorker calls back into dag.Dep() from a secondary object. This proves the
case is not limited to methods on the root object.

viaTransitiveDep calls through caller -> middle -> dep. This proves the
self-call still works when the module with SELF_CALLS is a dependency of a
dependency.

Signed-off-by: Guillaume de Rouville <[email protected]>

---------

Signed-off-by: Yves Brissaud <[email protected]>
tiborvass pushed a commit to tiborvass/dagger that referenced this pull request Jun 8, 2026
The self-call introspection emitter must reproduce exactly the names the
engine exposes (the TypeDef path passes raw Go names and lets the engine
normalize them). PR dagger#2 fixed exported struct fields. Apply the same to the
remaining names:

- enum values -> ToScreamingSnake (Active -> ACTIVE); previously always
  mismatched, so a self-called enum value sent the wrong wire name.
- function/constructor arguments -> ToLowerCamel (matches the engine; only
  bit non-lowerCamel params such as acronyms).
- object/interface/enum type names and their type references -> ToCamel
  (only bit acronym type names, e.g. HTTPProxy -> HttpProxy).

Add a Color enum to the Go self-calls fixture and a self-call that passes an
enum argument, covering the enum-value casing end to end.

Signed-off-by: Yves Brissaud <[email protected]>
vito added a commit that referenced this pull request Aug 25, 2026
Message provenance (agent-messaging.md §4.1) reached every frontend as a
rendered attribution header and structured LLMMessage.origin, but the TUI
still drew an agent's message exactly like a prompt the user typed, and an
idle/failure event as a full prompt bubble — P3's presentation half.

The recorded origin now rides the message's "LLM prompt" span as
dagger.io/llm.origin.* span attributes (kind, agent id/name, ref, replyTo),
stamped by emitUserMessageSpan only when an origin was recorded, so
pre-provenance spans are byte-identical. dagui ingests them onto
SpanSnapshot.LLMOrigin* with AGENT/EVENT kind predicates, and the pretty
frontend styles origin-carrying messages at the shared styleLLMMessageView
choke point, covering the live transcript and the final report alike:
AGENT-origin messages keep the shaded incoming-prompt block under a
sender-attribution header (bold cyan name plus a faint ref — "scout #3", or
"chief ↩ #2" for a reply), while EVENT-origin messages collapse to a faint
one-liner (first line plus a "(+N lines)" tail, with the payload still in
the span's logs) and skip the shaded cue and card padding. Plain user
prompts render unchanged.
vito added a commit that referenced this pull request Aug 25, 2026
Message provenance (agent-messaging.md §4.1) reached every frontend as a
rendered attribution header and structured LLMMessage.origin, but the TUI
still drew an agent's message exactly like a prompt the user typed, and an
idle/failure event as a full prompt bubble — P3's presentation half.

The recorded origin now rides the message's "LLM prompt" span as
dagger.io/llm.origin.* span attributes (kind, agent id/name, ref, replyTo),
stamped by emitUserMessageSpan only when an origin was recorded, so
pre-provenance spans are byte-identical. dagui ingests them onto
SpanSnapshot.LLMOrigin* with AGENT/EVENT kind predicates, and the pretty
frontend styles origin-carrying messages at the shared styleLLMMessageView
choke point, covering the live transcript and the final report alike:
AGENT-origin messages keep the shaded incoming-prompt block under a
sender-attribution header (bold cyan name plus a faint ref — "scout #3", or
"chief ↩ #2" for a reply), while EVENT-origin messages collapse to a faint
one-liner (first line plus a "(+N lines)" tail, with the payload still in
the span's logs) and skip the shaded cue and card padding. Plain user
prompts render unchanged.
vito added a commit that referenced this pull request Aug 26, 2026
Message provenance (agent-messaging.md §4.1) reached every frontend as a
rendered attribution header and structured LLMMessage.origin, but the TUI
still drew an agent's message exactly like a prompt the user typed, and an
idle/failure event as a full prompt bubble — P3's presentation half.

The recorded origin now rides the message's "LLM prompt" span as
dagger.io/llm.origin.* span attributes (kind, agent id/name, ref, replyTo),
stamped by emitUserMessageSpan only when an origin was recorded, so
pre-provenance spans are byte-identical. dagui ingests them onto
SpanSnapshot.LLMOrigin* with AGENT/EVENT kind predicates, and the pretty
frontend styles origin-carrying messages at the shared styleLLMMessageView
choke point, covering the live transcript and the final report alike:
AGENT-origin messages keep the shaded incoming-prompt block under a
sender-attribution header (bold cyan name plus a faint ref — "scout #3", or
"chief ↩ #2" for a reply), while EVENT-origin messages collapse to a faint
one-liner (first line plus a "(+N lines)" tail, with the payload still in
the span's logs) and skip the shaded cue and card padding. Plain user
prompts render unchanged.
vito added a commit that referenced this pull request Aug 26, 2026
Message provenance (agent-messaging.md §4.1) reached every frontend as a
rendered attribution header and structured LLMMessage.origin, but the TUI
still drew an agent's message exactly like a prompt the user typed, and an
idle/failure event as a full prompt bubble — P3's presentation half.

The recorded origin now rides the message's "LLM prompt" span as
dagger.io/llm.origin.* span attributes (kind, agent id/name, ref, replyTo),
stamped by emitUserMessageSpan only when an origin was recorded, so
pre-provenance spans are byte-identical. dagui ingests them onto
SpanSnapshot.LLMOrigin* with AGENT/EVENT kind predicates, and the pretty
frontend styles origin-carrying messages at the shared styleLLMMessageView
choke point, covering the live transcript and the final report alike:
AGENT-origin messages keep the shaded incoming-prompt block under a
sender-attribution header (bold cyan name plus a faint ref — "scout #3", or
"chief ↩ #2" for a reply), while EVENT-origin messages collapse to a faint
one-liner (first line plus a "(+N lines)" tail, with the payload still in
the span's logs) and skip the shaded cue and card padding. Plain user
prompts render unchanged.
com55 added a commit to com55/AtlasToolkit that referenced this pull request Sep 4, 2026
A review found using .label for the extracted filename breaks the
existing duplicate-region-name case (same atlasName, different internal
key -- e.g. dagger/dagger#2) by making both extract to the same
filename. .key matches the pre-refactor behavior exactly. Switching to
.label is deferred until a name-collision scheme exists (out of this
prerequisite's scope).

Co-Authored-By: Claude Code <[email protected]>
com55 added a commit to com55/AtlasToolkit that referenced this pull request Sep 4, 2026
Task 4's review found that regions sharing a literal atlas name (distinct
internal keys, e.g. dagger/dagger#2, but the same atlasName) made
label === atlasName produce the SAME label for both -- changing rendered
text in preview.js/region-list.js for that case, a real behavior change.
Fix: label now defaults to key itself via a private test-only override
map, making label === key a structural guarantee in production instead
of an assumption. __testOnlySetLabel writes into that map rather than
mutating region.atlasName. No changes needed to preview.js or
region-list.js -- they already correctly render whatever label
get_region_names() provides.

Co-Authored-By: Claude Code <[email protected]>
com55 added a commit to com55/AtlasToolkit that referenced this pull request Sep 4, 2026
A scoped re-review (Codex) of the prior fix-wave commit found the new
rationale comment described the collision risk as 'same .label,
different .key' -- but under the current code, label always equals key
by construction, so that phrasing describes the OLD (pre-Task-4)
atlasName-derived mechanism as if it were current. Confirmed via
SHA-256 that the function body itself is unaffected (comment-only fix).

Reworded to separate the historical incident (label was atlasName-
derived; dagger/dagger#2 collided) from the forward-looking reason .key
still matters (a future Rename feature letting label diverge could
recreate the same collision). Corrected directly by the controller
rather than dispatching another fix-and-rereview cycle, per this
workflow's exception for a controller-caused wording error found during
verification -- the original rationale text was the controller's own
dispatch instruction, not an implementer deviation.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XWB3FA58UUe5dejAzg3tHT
com55 added a commit to com55/AtlasToolkit that referenced this pull request Oct 9, 2026
A review found using .label for the extracted filename breaks the
existing duplicate-region-name case (same atlasName, different internal
key -- e.g. dagger/dagger#2) by making both extract to the same
filename. .key matches the pre-refactor behavior exactly. Switching to
.label is deferred until a name-collision scheme exists (out of this
prerequisite's scope).

Co-Authored-By: Claude Code <[email protected]>
com55 added a commit to com55/AtlasToolkit that referenced this pull request Oct 9, 2026
Task 4's review found that regions sharing a literal atlas name (distinct
internal keys, e.g. dagger/dagger#2, but the same atlasName) made
label === atlasName produce the SAME label for both -- changing rendered
text in preview.js/region-list.js for that case, a real behavior change.
Fix: label now defaults to key itself via a private test-only override
map, making label === key a structural guarantee in production instead
of an assumption. __testOnlySetLabel writes into that map rather than
mutating region.atlasName. No changes needed to preview.js or
region-list.js -- they already correctly render whatever label
get_region_names() provides.

Co-Authored-By: Claude Code <[email protected]>
com55 added a commit to com55/AtlasToolkit that referenced this pull request Oct 9, 2026
A scoped re-review (Codex) of the prior fix-wave commit found the new
rationale comment described the collision risk as 'same .label,
different .key' -- but under the current code, label always equals key
by construction, so that phrasing describes the OLD (pre-Task-4)
atlasName-derived mechanism as if it were current. Confirmed via
SHA-256 that the function body itself is unaffected (comment-only fix).

Reworded to separate the historical incident (label was atlasName-
derived; dagger/dagger#2 collided) from the forward-looking reason .key
still matters (a future Rename feature letting label diverge could
recreate the same collision). Corrected directly by the controller
rather than dispatching another fix-and-rereview cycle, per this
workflow's exception for a controller-caused wording error found during
verification -- the original rationale text was the controller's own
dispatch instruction, not an implementer deviation.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XWB3FA58UUe5dejAzg3tHT
vito added a commit that referenced this pull request Oct 9, 2026
A copy-on-write full checkout still rewrote the whole worktree: it removed
the source snapshot's worktree, which cannot be trusted (a workspace
repository carries pending edits), and checked out every file again. On
dagger/dagger (16.5k files, 253MB) `git checkout -f` alone took 6.3s under
load; GitRef.__fullCheckout was #2 on the resume critical path.

When the ref has a checkout base (withCommit and pulls record one, see
LocalGitRef.incrementalCheckoutIneligible), start instead from the base's own
__fullCheckout: a clean worktree of that commit by construction, never
edited. In a copy-on-write child of it:

- fetch only what the base lacks from the source repository, negotiating from
  its HEAD (a checkout's HEAD is usually detached: without the tip, fetch
  would receive the whole history again), keeping packs whole so no
  inherited pack is freshened;
- apply the tree delta to the worktree with the same plan and writer as
  incremental source trees (planIncrementalGitCheckout,
  applyIncrementalGitCheckout), which also gate on ancestry, gitlinks and
  attribute changes; .gitmodules falls back too;
- rebuild .git's metadata as before, but set HEAD and the refs as the
  checkout would (gitCheckoutRefs) instead of running it, and normalize
  timestamps under .git only.

The base checkout is materialized cold only at the top level, as for
incremental trees (incrementalParentTree). Otherwise, and for refs without a
checkout base, unusual ref names, or any failure, the wipe path runs as
before, then the full checkout.

Each copy-on-write checkout now records the path it took (delta, wipe, full),
its detail and the skipped paths' reasons as dagger.git.checkout.cow.path,
.detail and .skipped, and a zero-length wcprof marker of class
git.checkout.<path>[...]. TestCowGitCheckoutDelta compares the result with a
fresh checkout file for file across branch, tag, detached and commit-named
refs and directory/file/symlink reshapes, and bounds the fetched objects by
the delta. In the engine test, the committed head's checkout layer is 0.5MiB
instead of 21MiB.

Signed-off-by: Alex Suraci <[email protected]>
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.

1 participant