Skip to content

Commit 80cd0ef

Browse files
authored
Remove local config key warning (#1006)
1 parent 78660d0 commit 80cd0ef

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

cli/local/validations.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -98,27 +98,13 @@ func ValidateLocalAPIs(apis []userconfig.API, projectFiles ProjectFiles, awsClie
9898
}
9999

100100
apisRequiringGPU := strset.New()
101-
nonLocalConfigs := strset.New()
102101
for i := range apis {
103102
api := &apis[i]
104103

105104
if err := spec.ValidateAPI(api, projectFiles, types.LocalProviderType, awsClient); err != nil {
106105
return err
107106
}
108107

109-
if api.Endpoint != nil {
110-
nonLocalConfigs.Add(userconfig.EndpointKey)
111-
}
112-
if api.Autoscaling != nil {
113-
nonLocalConfigs.Add(userconfig.AutoscalingKey)
114-
}
115-
if api.Tracker != nil {
116-
nonLocalConfigs.Add(userconfig.TrackerKey)
117-
}
118-
if api.UpdateStrategy != nil {
119-
nonLocalConfigs.Add(userconfig.UpdateStrategyKey)
120-
}
121-
122108
if api.Compute.CPU != nil && (api.Compute.CPU.MilliValue() > int64(dockerClient.Info.NCPU)*1000) {
123109
qty := k8s.NewQuantity(int64(dockerClient.Info.NCPU))
124110
api.Compute.CPU = &qty
@@ -129,14 +115,6 @@ func ValidateLocalAPIs(apis []userconfig.API, projectFiles ProjectFiles, awsClie
129115
}
130116
}
131117

132-
if len(nonLocalConfigs) > 0 {
133-
configurationStr := "configuration"
134-
if len(nonLocalConfigs) > 1 {
135-
configurationStr = "configurations"
136-
}
137-
fmt.Println(fmt.Sprintf("note: you're deploying locally, so the %s %s won't apply\n", s.StrsAnd(nonLocalConfigs.SliceSorted()), configurationStr))
138-
}
139-
140118
if len(apisRequiringGPU) > 0 {
141119
if _, ok := dockerClient.Info.Runtimes["nvidia"]; !ok {
142120
if !strings.HasPrefix(strings.ToLower(runtime.GOOS), "linux") {

0 commit comments

Comments
 (0)