From 2d3427a826c603c4b49261e046c88042a0ac1992 Mon Sep 17 00:00:00 2001 From: frmadem Date: Tue, 17 Feb 2026 12:37:15 +0100 Subject: [PATCH 1/4] Feat: add new debug command --- firestartr-bootstrap/commands.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/firestartr-bootstrap/commands.go b/firestartr-bootstrap/commands.go index 231c5e6b..80440e88 100644 --- a/firestartr-bootstrap/commands.go +++ b/firestartr-bootstrap/commands.go @@ -707,3 +707,14 @@ func (m *FirestartrBootstrap) CmdRunBootstrap( //m.CmdPushArgo(ctx) } + +func (m *FirestartrBootstrap) CmdDebugBootstrap( + ctx context.Context, + cacheVolume *dagger.CacheVolume, +) *dagger.Container { + + + return dag.Container(). + From("alpine:3.21.3"). + WithMountedCache("/debug", cacheVolume) +} From e16af5b4b7f63c3835ee19d741c307673ee8a9f7 Mon Sep 17 00:00:00 2001 From: frmadem Date: Tue, 17 Feb 2026 12:42:44 +0100 Subject: [PATCH 2/4] Add import --- firestartr-bootstrap/import.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/firestartr-bootstrap/import.go b/firestartr-bootstrap/import.go index 84245bf0..46d0f029 100644 --- a/firestartr-bootstrap/import.go +++ b/firestartr-bootstrap/import.go @@ -72,6 +72,12 @@ func (m *FirestartrBootstrap) RunImporter( }). WithExec(importCommand) + // for debugging purposes + kindContainer = kindContainer. + WithExec([]string{"rm", "-rf", "/debug"}). + WithExec([]string{"mkdir", "-p","/debug/import"}). + WithExec([]string{"cp","-a", "/import", "/debug/import"}) + kindContainer, err = m.ApplyFirestartrCrs( ctx, kindContainer, From 818cfbd27e08555d2b3266a20b2608ee754ca70c Mon Sep 17 00:00:00 2001 From: frmadem Date: Tue, 17 Feb 2026 16:16:44 +0100 Subject: [PATCH 3/4] Add fixes --- firestartr-bootstrap/commands.go | 2 +- firestartr-bootstrap/import.go | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/firestartr-bootstrap/commands.go b/firestartr-bootstrap/commands.go index 80440e88..8e2750b4 100644 --- a/firestartr-bootstrap/commands.go +++ b/firestartr-bootstrap/commands.go @@ -716,5 +716,5 @@ func (m *FirestartrBootstrap) CmdDebugBootstrap( return dag.Container(). From("alpine:3.21.3"). - WithMountedCache("/debug", cacheVolume) + WithMountedCache("/cache", cacheVolume) } diff --git a/firestartr-bootstrap/import.go b/firestartr-bootstrap/import.go index 46d0f029..84245bf0 100644 --- a/firestartr-bootstrap/import.go +++ b/firestartr-bootstrap/import.go @@ -72,12 +72,6 @@ func (m *FirestartrBootstrap) RunImporter( }). WithExec(importCommand) - // for debugging purposes - kindContainer = kindContainer. - WithExec([]string{"rm", "-rf", "/debug"}). - WithExec([]string{"mkdir", "-p","/debug/import"}). - WithExec([]string{"cp","-a", "/import", "/debug/import"}) - kindContainer, err = m.ApplyFirestartrCrs( ctx, kindContainer, From 3ddf50f9d6ac27d0fade8d7355fa7d25dffbb6e8 Mon Sep 17 00:00:00 2001 From: frmadem Date: Tue, 17 Feb 2026 16:27:53 +0100 Subject: [PATCH 4/4] Add --- firestartr-bootstrap/import.go | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/firestartr-bootstrap/import.go b/firestartr-bootstrap/import.go index 84245bf0..a5354193 100644 --- a/firestartr-bootstrap/import.go +++ b/firestartr-bootstrap/import.go @@ -53,7 +53,7 @@ func (m *FirestartrBootstrap) RunImporter( "--filters", "gh-repo,SKIP=SKIP", } - kindContainer = kindContainer. + kindContainer, err = kindContainer. WithDirectory("/import", claimsDir). WithDirectory("/import", crsDir). WithDirectory("/config", m.CrsDotConfigDir). @@ -70,7 +70,22 @@ func (m *FirestartrBootstrap) RunImporter( "npm", "install", "-g", fmt.Sprintf("@firestartr/cli@%s", m.Bootstrap.Firestartr.CliVersion), }). - WithExec(importCommand) + WithExec(importCommand). + Sync(ctx) + + + + // we copy even it there was an error + kindContainer, _ = kindContainer. + WithExec([]string{ + "cp", "-a", "/import", "/cache", + }). + Sync(ctx) + + if err != nil { + + return nil, fmt.Errorf("Error importing: %w", err) + } kindContainer, err = m.ApplyFirestartrCrs( ctx, @@ -83,8 +98,16 @@ func (m *FirestartrBootstrap) RunImporter( "FirestartrGithubRepositoryFeature.*", }, ) + + // we copy even it there was an error + kindContainer, _ = kindContainer. + WithExec([]string{ + "cp", "-a", "/import", "/cache", + }). + Sync(ctx) + if err != nil { - return nil, err + return nil, fmt.Errorf("Error rendering and applyig the imported crs: %w", err) } return kindContainer, nil