#Query has no such field: "myModule" after updating to v0.18.14

1 messages · Page 1 of 1 (latest)

jagged spruce
#

Hi, I just updated from v0.18.12 to v0.18.14. Now, I get the following error:

failed to create secret transfer post call: failed to load secret instances: load myModule.build(token: {secret(uri: "env://TOKEN"): Secret!}, netrcFile: {secret(uri: "file:///Users/[redacted]/.netrc"): Secret!}).myOtherModule.netrcFile: Secret: load: load base: load base: load base: Call: Query has no such field: "myModule"
Seems like an issue with transferring secrets between modules?

wanton comet
#

Silently pinging @silk flame and @abstract moth

jagged spruce
#

https://github.com/skycaptain/dagger-issue-passing-secrets. Try to call dagger -m ./module-b call job --netrc-file 'file:dagger.json' run. With v0.18.12 the command passes:

[run] $ dagger -m ./module-b call job --netrc-file 'file:dagger.json' run
▶ connect 1.5s
▶ load module: ./module-b 19.5s
● parsing command line arguments 0.0s

● moduleB: ModuleB! 0.7s
● .job(
  ┆ netrcFile: secret(uri: "file://dagger.json"): Secret!
  ): ModuleBJob! 0.7s
▶ .run: Void 3.6s

A new release of dagger is available: v0.18.12 → v0.18.14
To upgrade, see https://docs.dagger.io/install
https://github.com/dagger/dagger/releases/tag/v0.18.14

With v0.18.14 I'll get:

[run] $ dagger -m ./module-b call job --netrc-file 'file:dagger.json' run
▶ connect 0.2s
▶ load module: ./module-b 5.1s
● parsing command line arguments 0.0s

● moduleB: ModuleB! 0.7s
✘ .job(
  ┆ netrcFile: secret(uri: "file://dagger.json"): Secret!
  ): ModuleBJob! 0.7s ERROR
! failed to create secret transfer post call: failed to load secret instances: load moduleB.job(netrcFile: {secret(uri: "file://dagger.json"): Secret!}).builder.netrcFile: Secret: load: load base: load base: load base: Call: Query has no such
  field: "moduleB"
[run] ERROR task failed

The issue is somehow related to the secret being bound to a field of the custom type ("Builder" in the repro)

wanton comet
silk flame
#

Taking a look!

jagged spruce
abstract moth
silk flame
# jagged spruce I managed to simplify the example even more: https://github.com/skycaptain/dagge...

Thank you! The clue that it only failed when you made it a field helped quite a bit. Tracked it down and have a fix here: https://github.com/dagger/dagger/pull/10780

We'll do a release soon to get this and some other fixes out. Optimistically I'd like to aim for end of this week.

GitHub

Fixes #10776
When a module object had a Nullable field for an object type, we were subtly setting the ID for the field to the ID that selects the field, rather than the ID for the object it wraps (...