mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Removed image check and mount docker socket in quickstart. (#531)
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/iron-io/functions/api"
|
||||
"github.com/iron-io/functions/api/models"
|
||||
"github.com/iron-io/functions/api/runner/task"
|
||||
"github.com/iron-io/runner/common"
|
||||
)
|
||||
|
||||
@@ -44,13 +43,13 @@ func (s *Server) handleRouteCreate(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
err = s.Runner.EnsureImageExists(ctx, &task.Config{
|
||||
Image: wroute.Route.Image,
|
||||
})
|
||||
if err != nil {
|
||||
c.JSON(http.StatusBadRequest, simpleError(models.ErrUsableImage))
|
||||
return
|
||||
}
|
||||
// err = s.Runner.EnsureImageExists(ctx, &task.Config{
|
||||
// Image: wroute.Route.Image,
|
||||
// })
|
||||
// if err != nil {
|
||||
// c.JSON(http.StatusBadRequest, simpleError(models.ErrUsableImage))
|
||||
// return
|
||||
// }
|
||||
|
||||
app, err := s.Datastore.GetApp(ctx, wroute.Route.AppName)
|
||||
if err != nil && err != models.ErrAppsNotFound {
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/iron-io/functions/api"
|
||||
"github.com/iron-io/functions/api/models"
|
||||
"github.com/iron-io/functions/api/runner/task"
|
||||
"github.com/iron-io/runner/common"
|
||||
)
|
||||
|
||||
@@ -41,14 +40,14 @@ func (s *Server) handleRouteUpdate(c *gin.Context) {
|
||||
wroute.Route.Path = path.Clean(c.MustGet(api.Path).(string))
|
||||
|
||||
if wroute.Route.Image != "" {
|
||||
err = s.Runner.EnsureImageExists(ctx, &task.Config{
|
||||
Image: wroute.Route.Image,
|
||||
})
|
||||
if err != nil {
|
||||
log.WithError(err).Debug(models.ErrRoutesUpdate)
|
||||
c.JSON(http.StatusBadRequest, simpleError(models.ErrUsableImage))
|
||||
return
|
||||
}
|
||||
// err = s.Runner.EnsureImageExists(ctx, &task.Config{
|
||||
// Image: wroute.Route.Image,
|
||||
// })
|
||||
// if err != nil {
|
||||
// log.WithError(err).Debug(models.ErrRoutesUpdate)
|
||||
// c.JSON(http.StatusBadRequest, simpleError(models.ErrUsableImage))
|
||||
// return
|
||||
// }
|
||||
}
|
||||
|
||||
route, err := s.Datastore.UpdateRoute(ctx, wroute.Route)
|
||||
|
||||
Reference in New Issue
Block a user