Skip to content

Commit

Permalink
doc(compute/deploy): document special case for package comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
Integralist committed Oct 13, 2023
1 parent a17f2d0 commit c10a50d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/commands/compute/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,15 @@ func errLogService(l fsterr.LogInterface, err error, sid string, sv int) {

// CompareLocalRemotePackage compares the local package files hash against the
// existing service package version and exits early with message if identical.
//
// NOTE: We can't avoid the first 'no-changes' upload after the initial deploy.
// This is because the fastly.toml manifest does actual change after first deploy.
// When user first deploys, there is no value for service_id.
// That version of the manifest is inside the package we're checking against.
// So on the second deploy, even if user has made no changes themselves, we will
// still upload that package because technically there was a change made by the
// CLI to add the Service ID. Any subsequent deploys will be aborted because
// there will be no changes made by the CLI nor the user.
func (c *DeployCommand) CompareLocalRemotePackage(serviceID string, version int) error {
filesHash, err := getFilesHash(c.PackagePath)
if err != nil {
Expand Down

0 comments on commit c10a50d

Please sign in to comment.