Skip to content

Commit

Permalink
Merge pull request #193 from fujiwara/remote-arch-warning
Browse files Browse the repository at this point in the history
remove a warning for Architectures
  • Loading branch information
fujiwara authored Nov 18, 2021
2 parents f5dc21a + 1f030fc commit 724930c
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ func (app *App) Deploy(opt DeployOption) error {
}

log.Printf("[info] starting deploy function %s", *fn.FunctionName)
var current *lambda.FunctionConfiguration
if res, err := app.lambda.GetFunction(&lambda.GetFunctionInput{
if _, err := app.lambda.GetFunction(&lambda.GetFunctionInput{
FunctionName: fn.FunctionName,
}); err != nil {
if aerr, ok := err.(awserr.Error); ok {
Expand All @@ -94,8 +93,6 @@ func (app *App) Deploy(opt DeployOption) error {
}
}
return err
} else {
current = res.Configuration
}

if err := app.prepareFunctionCodeForDeploy(opt, fn); err != nil {
Expand All @@ -119,11 +116,6 @@ func (app *App) Deploy(opt DeployOption) error {
VpcConfig: fn.VpcConfig,
ImageConfig: fn.ImageConfig,
}
newArch, _ := marshalJSON(fn.Architectures)
currArch, _ := marshalJSON(current.Architectures)
if len(newArch) != 0 && !bytes.Equal(currArch, newArch) {
log.Printf("[warn] Architectures cannot be updated %s %s", currArch, newArch)
}
if env := fn.Environment; env == nil || env.Variables == nil {
confIn.Environment = &lambda.Environment{
Variables: map[string]*string{}, // set empty variables explicitly
Expand Down

0 comments on commit 724930c

Please sign in to comment.