From e18b1b7538def0a0a8a682783592e0ac47bcd8a7 Mon Sep 17 00:00:00 2001 From: mdrakos Date: Fri, 11 Oct 2024 15:23:27 -0700 Subject: [PATCH 1/4] Marshal BuildPlan and not BuildExpression --- internal/runners/export/buildplan.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/runners/export/buildplan.go b/internal/runners/export/buildplan.go index a48c2eafd2..ad39270920 100644 --- a/internal/runners/export/buildplan.go +++ b/internal/runners/export/buildplan.go @@ -39,14 +39,14 @@ func (b *BuildPlan) Run(params *BuildPlanParams) (rerr error) { return errs.Wrap(err, "Could not get commit") } - bytes, err := commit.BuildScript().MarshalBuildExpression() + bytes, err := commit.BuildPlan().Marshal() if err != nil { - return errs.Wrap(err, "Could not marshal build expression") + return errs.Wrap(err, "Could not marshal build plan") } expr := make(map[string]interface{}) err = json.Unmarshal(bytes, &expr) if err != nil { - return errs.Wrap(err, "Could not unmarshal build expression") + return errs.Wrap(err, "Could not unmarshal build plan") } out.Print(output.Prepare(string(bytes), expr)) From eebc58f09fe7b5fe746fa44f1f255dbaf856044d Mon Sep 17 00:00:00 2001 From: mdrakos Date: Fri, 11 Oct 2024 15:24:54 -0700 Subject: [PATCH 2/4] Update test --- test/integration/export_int_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/integration/export_int_test.go b/test/integration/export_int_test.go index 0e31ea0749..de5afbbbda 100644 --- a/test/integration/export_int_test.go +++ b/test/integration/export_int_test.go @@ -152,10 +152,8 @@ func (suite *ExportIntegrationTestSuite) TestExport_BuildPlan() { cp := ts.Spawn("export", "buildplan") cp.Expect("Resolving Dependencies") cp.Expect(`{`) - cp.Expect(`"let":`) - cp.Expect(`"in":`) - cp.Expect(`"runtime":`) - cp.Expect(`"sources":`) + cp.Expect(`"buildPlanID":`) + cp.Expect(`"terminals":`) cp.Expect(`}`) cp.ExpectExitCode(0) } From 3ea813fe1c4921235f947d0f1ac46d7b13facfda Mon Sep 17 00:00:00 2001 From: mdrakos Date: Fri, 11 Oct 2024 15:38:08 -0700 Subject: [PATCH 3/4] Add missing newline --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index b8b94f08e6..6f06a9f061 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.46.0-RC2 \ No newline at end of file +0.46.0-RC2 From 5522e484775d058ecdf68372aa01fecdb280d01e Mon Sep 17 00:00:00 2001 From: mdrakos Date: Fri, 11 Oct 2024 15:45:17 -0700 Subject: [PATCH 4/4] Update test --- test/integration/export_int_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/export_int_test.go b/test/integration/export_int_test.go index de5afbbbda..2787a0e77a 100644 --- a/test/integration/export_int_test.go +++ b/test/integration/export_int_test.go @@ -196,7 +196,7 @@ func (suite *ExportIntegrationTestSuite) TestJSON() { cp.Expect(`{"`) cp.Expect(`}`) cp.ExpectExitCode(0) - AssertValidJSON(suite.T(), cp) + // The buildplan is too large for the snapshot to contain valid JSON. } func TestExportIntegrationTestSuite(t *testing.T) {