mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Remove V1 endpoints and Routes (#1210)
Largely a removal job, however many tests, particularly system level ones relied on Routes. These have been migrated to use Fns. * Add 410 response to swagger * No app names in log tags * Adding constraint in GetCall for FnID * Adding test to check FnID is required on call * Add fn_id to call selector * Fix text in docker mem warning * Correct buildConfig func name * Test fix up * Removing CPU setting from Agent test CPU setting has been deprecated, but the code base is still riddled with it. This just removes it from this layer. Really we need to remove it from Call. * Remove fn id check on calls * Reintroduce fn id required on call * Adding fnID to calls for execute test * Correct setting of app id in middleware * Removes root middlewares ability to redirect fun invocations * Add over sized test check * Removing call fn id check
This commit is contained in:
committed by
Owen Cliffe
parent
6a01dae923
commit
d56a49b321
@@ -77,62 +77,10 @@ var (
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Invalid payload"),
|
||||
}
|
||||
ErrDatastoreEmptyRoute = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Missing route"),
|
||||
}
|
||||
ErrRoutesAlreadyExists = err{
|
||||
code: http.StatusConflict,
|
||||
error: errors.New("Route already exists"),
|
||||
}
|
||||
ErrRoutesMissingNew = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Missing new route"),
|
||||
}
|
||||
ErrRoutesNotFound = err{
|
||||
code: http.StatusNotFound,
|
||||
error: errors.New("Route not found"),
|
||||
}
|
||||
ErrRoutesPathImmutable = err{
|
||||
code: http.StatusConflict,
|
||||
error: errors.New("Could not update - path is immutable"),
|
||||
}
|
||||
ErrFoundDynamicURL = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Dynamic URL is not allowed"),
|
||||
}
|
||||
ErrRoutesInvalidPath = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Invalid route path format"),
|
||||
}
|
||||
ErrRoutesInvalidType = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Invalid route Type"),
|
||||
}
|
||||
ErrRoutesInvalidFormat = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Invalid route Format"),
|
||||
}
|
||||
ErrRoutesMissingAppID = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Missing route AppName"),
|
||||
}
|
||||
ErrRoutesMissingImage = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Missing route Image"),
|
||||
}
|
||||
ErrRoutesInvalidImage = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Invalid route Image"),
|
||||
}
|
||||
ErrRoutesMissingName = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Missing route Name"),
|
||||
}
|
||||
ErrRoutesMissingPath = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Missing route Path"),
|
||||
}
|
||||
ErrPathMalformed = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Path malformed"),
|
||||
@@ -145,21 +93,9 @@ var (
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("from_time is not an epoch time"),
|
||||
}
|
||||
ErrRoutesInvalidTimeout = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: fmt.Errorf("timeout value is out of range. Sync should be between 0 and %d, async should be between 0 and %d", MaxSyncTimeout, MaxAsyncTimeout),
|
||||
}
|
||||
ErrRoutesInvalidIdleTimeout = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: fmt.Errorf("idle_timeout value is out of range. It should be between 0 and %d", MaxIdleTimeout),
|
||||
}
|
||||
ErrRoutesInvalidMemory = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: fmt.Errorf("memory value is out of range. It should be between 0 and %d", RouteMaxMemory),
|
||||
}
|
||||
ErrInvalidMemory = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: fmt.Errorf("memory value is out of range. It should be between 0 and %d", RouteMaxMemory),
|
||||
error: fmt.Errorf("memory value is out of range. It should be between 0 and %d", MaxMemory),
|
||||
}
|
||||
ErrCallResourceTooBig = err{
|
||||
code: http.StatusBadRequest,
|
||||
@@ -178,14 +114,6 @@ var (
|
||||
code: http.StatusNotFound,
|
||||
error: errors.New("Call log not found"),
|
||||
}
|
||||
ErrInvokeNotSupported = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Invoking routes /r/ is not supported on nodes configured as type API"),
|
||||
}
|
||||
ErrAPINotSupported = err{
|
||||
code: http.StatusBadRequest,
|
||||
error: errors.New("Invoking api /v1/ requests is not supported on nodes configured as type Runner"),
|
||||
}
|
||||
ErrPathNotFound = err{
|
||||
code: http.StatusNotFound,
|
||||
error: errors.New("Path not found"),
|
||||
|
||||
Reference in New Issue
Block a user