#[Solved] Blueprint update on non-default branch, fails

1 messages · Page 1 of 1 (latest)

frail bone
#

dagger init --blueprint=ssh://github.com/my-org/my-repo/dagger-modules/blueprints/golang-build-deploy@my-branch
Works fine and generates:

{
  "name": "my-repo",
  "engineVersion": "v0.18.14",
  "blueprint": {
    "name": "golang-build-deploy",
    "source": "ssh://github.com/my-org/my-repo/dagger-modules/blueprints/golang-build-deploy@my-branch",
    "pin": "8dced021e8f3ea78ec17cc2015ebfce2db6925b8"
  }
}

Then, running a:
dagger update

Returns:

▶ connect 0.2s

● moduleSource(refString: ".", requireKind: LOCAL_SOURCE): ModuleSource! 9.1s
▶ .configExists: Boolean! 0.0s

▶ ModuleSource.localContextDirectoryPath: String! 0.0s

▼ ModuleSource.withUpdateBlueprint: ModuleSource! 4.1s ERROR
! failed to load updated blueprint: select: path "dagger-modules/blueprints/golang-build-deploy" does not exist in git repo
╰─✘ moduleSource(refString: "ssh://github.com/my-org/my-repo/dagger-modules/blueprints/golang-build-deploy"): ModuleSource! 4.1s ERROR
  ! path "dagger-modules/blueprints/golang-build-deploy" does not exist in git repo
Error: failed to update dependencies: failed to load updated blueprint: select: path "dagger-modules/blueprints/golang-build-deploy" does not exist in git repo

Am i missing something? Referencing the remote repository in a bad format?

ty This feature is great!

sage juniper
#

So either 1) it's a bug in the implementation in general, or 2) an issue related to git auth, with a confusing error message?

#

The allowed address format for blueprint is exactly the same as for a regular dependency btw

#

What happens if you init a regular module (no blueprint), then install the same blueprint but as a regular dependency? Do you get the same error on update?

frail bone
#

I executed both commands one after the other, same shell, same environment... It retrieved the module fine to generate the dagger.json, and inmediately after it's unable to find it...

Let me try that

#

Works fine... 🤔

#

dagger init + dagger install blueprint-module (without --blueprint)

gray imp
#

dagger init --blueprint=ssh://git@github.com/marcosnils/dagger_example/not-working@main
^ calling dagger update after that works

sage juniper
#

Also, does loading the module actually work before calling the failing update?

frail bone
#

yes, I can call the blueprint no problem...

sage juniper
#

hum

gray imp
#

@frail bone any way we can repro? As I shared above, seems to work in my example. You should be able to try it out yourself also

frail bone
#

I'll do some more debugging and come back (in back2back meetings til EOD 😦 )

#

Interestingly, the blueprint has a bunch of module dependencies on the private repo, which are resolved (from the ref @my-branch) when running the update
dagger -vvvv update

It can resolve all dependencies (and the dependencies of those dependencies...) . I can DM the 560 lines of output 😅

#

I'll do more testing tomorrow and come back. ty

sage juniper
#

Thanks @frail bone ! Sorry for the rough edges. If there's a bug, we'll find it and fix it

frail bone
#

I think the bug lies on the dagger update when looking for the blueprint module.
It does not respect the @ref

I've been able to reproduce it by:
your daggerverse repo

$> git checkout -b test
$> dagger init --sdk go --name not-main --license none --source not-main not-main
$> git add .
$> git commit -m 'chore: non-default branch module'

And then, i your consumer repo:

$> dagger init --blueprint=ssh://github.com/nadirollo/daggerverse/not-main@test
$> dagger update
#

When doing the init:

.withBlueprint(
  ┆ blueprint: moduleSource(
  ┆ ┆ refString: "ssh://github.com/nadirollo/daggerverse/not-main@test"

When doing the update:

withUpdateBlueprint: ModuleSource! 1.7s ERROR
! failed to load updated blueprint: select: path "not-main" does not exist in git repo
╰─✘ moduleSource(
    ┆ refString: "ssh://github.com/nadirollo/daggerverse/not-main"
#

Notice the lack of @test in the update command output

sage juniper
#

@grand needle is this the same issue you're encountering?

grand needle
#

I think yes

#

I am using http though.

#

It truncates the @ref

#

Happens even if I manually edit the dagger.json and update to a ref

frail bone
#

Blueprint update on non-default branch, fails

sage juniper
#

ok thank you both, and sorry. will look into it today/tomorrow

grand needle
#

Thank you! love the feature btw! Cuts down on a ton of boilerplate

frail bone
#

We are SO excited with this feature 😄 Thank you 🙂

#

We've been rolling it out to the rest of engineering, and some of the feedback so far is (quoting):

I think this would be fantastic for reducing the barrier to entry for sure

This might also be a useful evolution of the Release Pipeline "release" module I've hacked together. That is basically intended to be a standard release pipeline.

this is amazing!! im super excited!!!

This is a game changer. I love it

#

Do you want a GH issue for this? I wasn't sure if it was me or not before debugging it further yesterday 😄

frail bone
sage juniper
#

Update: I'm working on a fix

frail bone
#

Just tested it and works fine. Thank so much! 🫶

#

[Fixed] Blueprint update on non-default branch, fails