#Having some issues invoking remote module from azure repos, logging progress/variations here

1 messages · Page 1 of 1 (latest)

jolly galleon
#

I'm not certain yet what's causing but I'm suspecting it might be because I use 1password for SSH key management, but working through this. I'm going to post in the thread my invocation types cause maybe it will be useful to someone or you'll notice something wrong I'm doing. There are some quirks with Go and azure devops so hoping that doesn't impact it

If this is better suited for github discussions I'll do it there, so completely up for "please move there for visibility". Cheers

#

ℹ️ from what I see I don't have to handle normal Go module syntax for packages. meaning the go module doesn't need to be a canonical name for the dagger module. "terraform" is fine, doesn't have to be github.com/sheldonhull/daggerverse/terraform@main as dagger is it's own thing and no need to adhere to fully qualified name for a dagger module

#

ssh based

dagger call \
    -m git@ssh.dev.azure.com:v3/{ORG}/{PROJECT}/daggerverse/tf-yolo@main \
    init \
    --dir tf-yolo/test \
    --arm-subscription-id {GUID}

So far that type of invocation doesn't seem to work as can't find the dagger.json, but I think it's not even finding the repo at this point.

#

failed to lookup cache key/can't find, but I think it did more activity, took longer to come back vs the other one

dagger call \
    -m dev.azure.com/{ORG}/{PROJECT}/_git/daggerverse.git/tf-yolo@main \
    init \
    --dir tf-yolo/test \
    --arm-subscription-id {GUID}

note the .git at the end, that's following the quirks to make sure Go modules work with https/canonical name.

#

variation without .git doesn't work either

#
Error: failed to get configured module: failed to get module ref kind: input: moduleSource resolve: failed to resolve git src to commit: failed to load cache key: failed to fetch remote https://dev.azure.com/{org}/{project}/_git/daggerverse: git error: exit status 128
stderr:
fatal: could not read Username for 'https://dev.azure.com': terminal prompts disabled

So I'll give https a try with the token hard coded in the url to eliminate any oddities there, the ssh won't work as I'm suspicious has to do with 1password protection of SSH key

#

Tried variance of

  • username:token@dev.azure.com/{org}/{project}/_git/daggerverse/tf-yolo@main
  • username:token@dev.azure.com/{org}/{project}/_git/daggerverse.git/tf-yolo@main
  • https://username:token@dev.azure.com/{org}/{project}/_git/daggerverse.git/tf-yolo@main
  • https://username:token@dev.azure.com/{org}/{project}/_git/daggerverse/tf-yolo@main
#

so far no go.
Any tips on remote module invocation? I'm not using github for the module, but if it's absolutely necessary I could evaluate that, just not ideal due to all code being in azure repos.

jolly galleon
#

bump, could use some help figuring out how to invoke so I can continue my pilot test . <@&946480760016207902> sorry if not the right group to bump.
If I can't figure out how to use these calls correctly the idea of having CI + devs invoke a shared dagger module and functions is gonna run dry.

Worst case I'll setup a private repo in our github org, but not every single dev has access to this so opting first to using azure repos. If will be a poor experience (like most integrations with azure repos ;-P) then I'll call it quits on this and try github instead.

bitter grotto
#

Hey 👋 It should work, could you please show me the value of your SSH_AUTH_SOCK key ?

jolly galleon
#

would love to! sorry I just saw this.

bitter grotto
#

I'm on dev-audio

bitter grotto
#

Solution was:

  1. Create a symlink at /tmp/agent.sock to generated sock path from 1password
  2. Set SSH_AGENT_SOCK to this symlink path
bitter grotto
jolly galleon
#

Oh I'm really good at finding the edge case issues. Been the bane of my developer experience on edge adoption of tooling laughcry

runic pike
bitter grotto
#

Yes + another one that we seem to have since the creation of core.socket