Skip to content

Commit aeaf2c6

Browse files
authored
fix: change error to warning for build platform (#7402)
mismatch with cluster node platform
1 parent f08a832 commit aeaf2c6

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

pkg/skaffold/platform/resolver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func NewResolver(ctx context.Context, pipelines []latest.Pipeline, cliPlatformsS
8484
} else if p := platforms.Intersect(fromClusterNodes); p.IsNotEmpty() {
8585
platforms = p
8686
} else {
87-
return r, fmt.Errorf("build target platforms %q do not match active kubernetes cluster node platforms %q", platforms, fromClusterNodes)
87+
log.Entry(ctx).Warnf("build target platforms %q do not match active kubernetes cluster node platforms %q", platforms, fromClusterNodes)
8888
}
8989
}
9090
instrumentation.AddResolvedBuildTargetPlatforms(platforms.String())

pkg/skaffold/platform/resolver_test.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ func TestResolver(t *testing.T) {
6767
pipelines: []latest.Pipeline{{Build: latest.BuildConfig{
6868
Platforms: []string{"windows/amd64"},
6969
Artifacts: []*latest.Artifact{{ImageName: "img1"}, {ImageName: "img2"}}}}},
70-
runMode: config.RunModes.Dev,
71-
shouldErr: true,
70+
runMode: config.RunModes.Dev,
71+
expected: map[string]Matcher{
72+
"img1": {Platforms: []v1.Platform{{OS: "linux", Architecture: "amd64"}, {OS: "linux", Architecture: "386"}}},
73+
"img2": {Platforms: []v1.Platform{{OS: "linux", Architecture: "amd64"}, {OS: "linux", Architecture: "386"}}},
74+
},
7275
},
7376
{
7477
description: "cluster platform selected for `dev` mode",

0 commit comments

Comments
 (0)