Skip to content

Commit

Permalink
fix(compute/deploy): ignore package comparison error (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
Integralist authored Oct 25, 2023
1 parent bbabbbc commit d1da50c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/commands/compute/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,10 +753,12 @@ func (c *DeployCommand) CompareLocalRemotePackage(serviceID string, version int)
ServiceID: serviceID,
ServiceVersion: version,
})
if err != nil {
return err
}
if filesHash == p.Metadata.FilesHash {
// IMPORTANT: Skip error as some services won't have a package to compare.
// This happens in situations where a user will create the service outside of
// the CLI and then reference the Service ID in their fastly.toml manifest.
// In that scenario the service might just be an empty service and so trying
// to get the package from the service with 404.
if err == nil && filesHash == p.Metadata.FilesHash {
return ErrPackageUnchanged
}
return nil
Expand Down

0 comments on commit d1da50c

Please sign in to comment.