#Testing #8805 - Github PAT support

1 messages Β· Page 1 of 1 (latest)

scenic summit
#

Hey @high wave , ./hack/dev fails for me with a certificate error although I have the CA certs installed within the container. Is there a way to get an already built engine image from the container registry?

high wave
scenic summit
#

arm64 please

high wave
#

Doing it in 30πŸ™

scenic summit
high wave
#

Not a Darwin, it's linux arm64?

scenic summit
#

either is fine

high wave
#
docker pull ghcr.io/grouville/dagger-engine:latest
high wave
#

The file I sent:

bash-5.2$ file ~/work/dagger/bin/dagger
~/work/dagger/bin/dagger: Mach-O 64-bit executable arm64
high wave
#

can send the linux one if you want

scenic summit
#

Yeah I can try that. Or.. the engine has the CLI embedded right? I could pull from that?

#

I'm on a Mac so Darwin is fine

#

I just left for the day. I'll test this tomorrow

high wave
#

Yeah sorry was multitasking πŸ™

#

Thanks, excited for you to test it out

scenic summit
#

No worries! Same

high wave
scenic summit
#

tried pulling the CLI fron container, didn't work (exec format error). Let me try your binary

high wave
scenic summit
#

I was able to build too

#

going to test some private git stuff

#

ok nvm!!! I'm a dummy. I'm not used to using a custom CLI. I was invoking it with the 0.13.6. When I ran with the custom CLI it worked!

high wave
#

How do you feel about the DX ? πŸ™

#

Did it trigger your credential helper ?

scenic summit
#

I mean.. smooth? Like I didn't have to do anything other than using the custom CLI + engine. Importing just worked.

#

It didn't prompt me for anything

high wave
#

Perfect then πŸ™ Awesome 😍

Do you use this env var GIT_ASKPASS to ask for the auth token ? Usually git doesnt ask for anything either because you stored the gitcredential using git credential store

Or, you have the GIT_ASKPASS or the .gitcredential helper configs, with either some cache:

cat ~/.gitconfig
[credential]
    helper = /usr/local/bin/git-credential-manager
scenic summit
#

I have this in my .gitconfig

[credential]
        helper = store
high wave
#

Ok perfect, so you stored it, thanks πŸ™

scenic summit
#

I don't have the ASKPASS env though

#

I may have used gh auth login to auth

high wave
#

Awesome, thanks a lot 😍

scenic summit
#

ah I don't use vscode so, might explain that.

#

does this support Windows? I can test

high wave
#

Yes please, I don't think so though 😏 Need to finish fixing my non booting computer to iterate on that though

scenic summit
#

any other use cases you want me to test on my mac?

high wave
#

Right now, I silently fail only if it's a credential error, meaning that if I successfully tried to retrieve the secret but the store returns "not found" , then I log and continue as if it was a public ref

But, for any other error, I would actually error. For example, if you don't have git, the implementation should error, i wonder if I shall silently fail on this too ? (there is a dependency on the git CLI for now)

#

What do you think around that ? Shall the default be: silently error ? log it, but continue as if it was a public ref. The thing is that I can't know in advance what is a public of a private ref: a badly configured credential helper would break all module cloning

#

Maybe safer at first to just silently fail ?

#

The git dependency is temporary, I have in mind to upstream the credential helper handling on the go-git library

#

Also, maybe testing the caching behavior: it shouldnt cache (if it's too much work I'll do it on my integration test no worries)

scenic summit
high wave
#

Did it log ?

scenic summit
#

it's super cool how this works with interdependent modules. Even when the dependent module is not present. I'm late to the "install a module from external" repo game but wow

scenic summit
#

I didn't see anything in log

#

let me remove container and see.. maybe caching played a part

high wave
scenic summit
high wave
#

Which ones are private in this configuration ? πŸ‘Ό

scenic summit
#

all of them

high wave
#

Oh yes πŸ‘Ό

scenic summit
#

that's just incredible!

high wave
#

Amazing if you like it πŸ™ If your gitconfig has fine-grained, cross git server provider, and for example you need oauth for bitbucket only, it would trigger it automatically

scenic summit
#

I love it! So far, I've always had all the dependencies in the same folder when testing modules. Obviously because I couldn't import from external repos

#

for me it's only github.com so I can't test other providers unfortunately

high wave
#

yeah no worries I did it, but thanks for testing that. Interested in Windows if you can too, if it's not too much to ask

scenic summit
#

but it seems to work well for me. I'll try to get a colleague to test too.

scenic summit
high wave
#

Yeah will do tonight, if it can wait πŸ™

scenic summit
#

yeah no hurry!

scenic summit
#

hey @high wave were you able to create that multi-arch image?

high wave
# scenic summit hey <@274903880343748619> were you able to create that multi-arch image?

Hey Nipuna, was actually checking the thread ahah. I realized on some of my tests yesterday that there is potentially a conflict with host without the credential set. Currently digging into that.

Tried to do the multiarch:

Setup tracing at https://dagger.cloud/traces/setup. To hide: export SHUTUP=1

Error: response from query: input: daggerDev.devExport resolve: call function "DevExport": process "/runtime" did not complete successfully: exit code: 2

Stdout:
invoke: input: container.from.withExec.withEnvVariable.withFile.withExec.withDirectory.withExec.asTarball resolve: container image to tarball file conversion failed: failed to solve for container publish: process "/dev/.buildkit_qemu_emulator go build std" did not complete successfully: exit code: 1

Stderr:
regexp: /usr/local/go/pkg/tool/linux_amd64/compile: signal: segmentation fault (core dumped)
#

getting a segfault when using qemu

high wave