Skip to content

Commit 73fd4e6

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

File tree

4 files changed

+0
-20
lines changed

4 files changed

+0
-20
lines changed

pkg/cnab/provider/action.go

-9
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 {
@@ -38,10 +37,6 @@ type ActionArguments struct {
3837
// Target Path => File Contents
3938
Files map[string]string
4039

41-
// Params is the fully resolved set of parameters.
42-
// TODO(PEP003): This should be removed in https://github.com/getporter/porter/issues/2699
43-
Params map[string]interface{}
44-
4540
// Driver is the CNAB-compliant driver used to run bundle actions.
4641
Driver string
4742

@@ -107,10 +102,6 @@ func (r *Runtime) AddEnvironment(args ActionArguments) cnabaction.OperationConfi
107102
// Pass the verbosity from porter's local config into the bundle
108103
op.Environment[verbosityEnv] = r.Config.GetVerbosity().Level().String()
109104

110-
// 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-
}
114105
return nil
115106
}
116107
}

pkg/porter/dependencies.go

-2
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ 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)
308307
}
309308
}
310309

@@ -426,7 +425,6 @@ func (e *dependencyExecutioner) getActionArgs(ctx context.Context,
426425
Run: depRun,
427426
Driver: e.parentArgs.Driver,
428427
AllowDockerHostAccess: e.parentOpts.AllowDockerHostAccess,
429-
Params: finalParams,
430428
PersistLogs: e.parentArgs.PersistLogs,
431429
}
432430
return nil

pkg/porter/lifecycle.go

-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ func (p *Porter) BuildActionArgs(ctx context.Context, installation storage.Insta
354354
Run: run,
355355
Installation: installation,
356356
BundleReference: bundleRef,
357-
Params: opts.GetParameters(),
358357
Driver: opts.Driver,
359358
AllowDockerHostAccess: opts.AllowDockerHostAccess,
360359
HostVolumeMounts: opts.GetHostVolumeMounts(),

pkg/porter/lifecycle_test.go

-8
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,8 @@ 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-
}
150-
151144
assert.Equal(t, opts.AllowDockerHostAccess, args.AllowDockerHostAccess, "AllowDockerHostAccess not populated correctly")
152145
assert.Equal(t, opts.Driver, args.Driver, "Driver not populated correctly")
153-
assert.EqualValues(t, expectedParams, args.Params, "Params not populated correctly")
154146
assert.NotEmpty(t, args.Installation, "Installation not populated")
155147
wantReloMap := relocation.ImageRelocationMap{"gabrtv/microservice@sha256:cca460afa270d4c527981ef9ca4989346c56cf9b20217dcea37df1ece8120687": "my.registry/microservice@sha256:cca460afa270d4c527981ef9ca4989346c56cf9b20217dcea37df1ece8120687"}
156148
assert.Equal(t, wantReloMap, args.BundleReference.RelocationMap, "RelocationMapping not populated correctly")

0 commit comments

Comments
 (0)