Skip to content

Commit 4768e47

Browse files
committed
TEMP
Signed-off-by: Kim Christensen <kimworking@gmail.com>
1 parent ed58ffe commit 4768e47

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

pkg/cnab/provider/action.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"github.com/cnabio/cnab-go/driver"
1515
"github.com/hashicorp/go-multierror"
1616
"go.opentelemetry.io/otel/attribute"
17-
"go.uber.org/zap/zapcore"
1817
)
1918

2019
type HostVolumeMountSpec struct {
@@ -40,7 +39,7 @@ type ActionArguments struct {
4039

4140
// Params is the fully resolved set of parameters.
4241
// TODO(PEP003): This should be removed in https://github.com/getporter/porter/issues/2699
43-
Params map[string]interface{}
42+
// Params map[string]interface{}
4443

4544
// Driver is the CNAB-compliant driver used to run bundle actions.
4645
Driver string
@@ -108,9 +107,9 @@ func (r *Runtime) AddEnvironment(args ActionArguments) cnabaction.OperationConfi
108107
op.Environment[verbosityEnv] = r.Config.GetVerbosity().Level().String()
109108

110109
// When a bundle is run in debug mode, the verbosity is automatically set to debug
111-
if debugMode, _ := args.Params["porter-debug"].(bool); debugMode {
112-
op.Environment[verbosityEnv] = zapcore.DebugLevel.String()
113-
}
110+
// if debugMode, _ := args.Params["porter-debug"].(bool); debugMode {
111+
// op.Environment[verbosityEnv] = zapcore.DebugLevel.String()
112+
// }
114113
return nil
115114
}
116115
}

pkg/porter/dependencies.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ func (e *dependencyExecutioner) prepareDependency(ctx context.Context, dep *queu
304304
dep.Parameters = make(map[string]string, 1)
305305
}
306306
dep.Parameters[paramName] = value
307-
delete(e.parentArgs.Params, key)
307+
// delete(e.parentArgs.Params, key)
308308
}
309309
}
310310

@@ -426,8 +426,8 @@ func (e *dependencyExecutioner) getActionArgs(ctx context.Context,
426426
Run: depRun,
427427
Driver: e.parentArgs.Driver,
428428
AllowDockerHostAccess: e.parentOpts.AllowDockerHostAccess,
429-
Params: finalParams,
430-
PersistLogs: e.parentArgs.PersistLogs,
429+
// Params: finalParams,
430+
PersistLogs: e.parentArgs.PersistLogs,
431431
}
432432
return nil
433433
}

pkg/porter/lifecycle.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,10 @@ func (p *Porter) BuildActionArgs(ctx context.Context, installation storage.Insta
351351
}
352352

353353
args := cnabprovider.ActionArguments{
354-
Run: run,
355-
Installation: installation,
356-
BundleReference: bundleRef,
357-
Params: opts.GetParameters(),
354+
Run: run,
355+
Installation: installation,
356+
BundleReference: bundleRef,
357+
// Params: opts.GetParameters(),
358358
Driver: opts.Driver,
359359
AllowDockerHostAccess: opts.AllowDockerHostAccess,
360360
HostVolumeMounts: opts.GetHostVolumeMounts(),

pkg/porter/lifecycle_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,16 @@ func TestPorter_BuildActionArgs(t *testing.T) {
141141
args, err := p.BuildActionArgs(ctx, existingInstall, opts)
142142
require.NoError(t, err, "BuildActionArgs failed")
143143

144-
expectedParams := map[string]interface{}{
145-
"my-first-param": 1,
146-
"my-second-param": "VALUE2",
147-
"porter-debug": true,
148-
"porter-state": nil,
149-
}
144+
// expectedParams := map[string]interface{}{
145+
// "my-first-param": 1,
146+
// "my-second-param": "VALUE2",
147+
// "porter-debug": true,
148+
// "porter-state": nil,
149+
// }
150150

151151
assert.Equal(t, opts.AllowDockerHostAccess, args.AllowDockerHostAccess, "AllowDockerHostAccess not populated correctly")
152152
assert.Equal(t, opts.Driver, args.Driver, "Driver not populated correctly")
153-
assert.EqualValues(t, expectedParams, args.Params, "Params not populated correctly")
153+
// assert.EqualValues(t, expectedParams, args.Params, "Params not populated correctly")
154154
assert.NotEmpty(t, args.Installation, "Installation not populated")
155155
wantReloMap := relocation.ImageRelocationMap{"gabrtv/microservice@sha256:cca460afa270d4c527981ef9ca4989346c56cf9b20217dcea37df1ece8120687": "my.registry/microservice@sha256:cca460afa270d4c527981ef9ca4989346c56cf9b20217dcea37df1ece8120687"}
156156
assert.Equal(t, wantReloMap, args.BundleReference.RelocationMap, "RelocationMapping not populated correctly")

0 commit comments

Comments
 (0)