Skip to content

Commit 6bd17c7

Browse files
committed
fix(service): prevent image update flag from affecting service hash
1 parent 2707202 commit 6bd17c7

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

pkg/config/config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,9 @@ func extractNamedVolume(volRef string) string {
408408
}
409409

410410
func (s *Service) Hash() (string, error) {
411-
sortedService := s.sortServiceFields()
411+
service := *s
412+
service.ImageUpdated = false
413+
sortedService := service.sortServiceFields()
412414
bytes, err := json.Marshal(sortedService)
413415
if err != nil {
414416
return "", fmt.Errorf("failed to marshal sorted service: %w", err)

pkg/deployment/dependency.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ func (d *Deployment) startDependency(project string, dependency *config.Dependen
5858
}
5959

6060
return nil
61-
}
61+
}

pkg/deployment/deployment.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ package deployment
33
import (
44
"context"
55
"fmt"
6-
"github.com/yarlson/ftl/pkg/runner/local"
76
"io"
87
"path/filepath"
98
"strings"
109

10+
"github.com/yarlson/ftl/pkg/runner/local"
11+
1112
"github.com/yarlson/ftl/pkg/config"
1213
"github.com/yarlson/ftl/pkg/console"
1314
)

pkg/deployment/service.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ package deployment
33
import (
44
"context"
55
"fmt"
6-
"github.com/yarlson/ftl/pkg/config"
76
"strings"
87
"sync"
98
"time"
9+
10+
"github.com/yarlson/ftl/pkg/config"
1011
)
1112

1213
func (d *Deployment) deployServices(ctx context.Context, project string, services []config.Service) error {

pkg/deployment/volume.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ func (d *Deployment) createVolume(ctx context.Context, project, volume string) e
3434
}
3535

3636
return nil
37-
}
37+
}

pkg/tunnel/tunnel.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ package tunnel
33
import (
44
"context"
55
"fmt"
6-
"github.com/yarlson/ftl/pkg/config"
76
"sync"
87
"time"
98

9+
"github.com/yarlson/ftl/pkg/config"
10+
1011
"github.com/yarlson/ftl/pkg/ssh"
1112
)
1213

0 commit comments

Comments
 (0)