Skip to content

Commit

Permalink
fix volume diffing
Browse files Browse the repository at this point in the history
  • Loading branch information
GiGurra committed Sep 19, 2023
1 parent e64a64f commit a029810
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions pkg/domain/deployment_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,11 @@ func runIntermediateVolumeSteps(input deployInput) error {

deployedVolumesThisRegion := deployedVolumesByNameAndRegion[wantedVolume.Name+region]

fmt.Printf("Currently deployed volumes: %d\n", len(deployedVolumesThisRegion))
for _, deployedVolume := range deployedVolumesThisRegion {
fmt.Printf(" - %s (%d GB)\n", deployedVolume.Name, deployedVolume.SizeGb)
}

// First bring all deployed volumes up to our required size
for _, currentVolume := range deployedVolumesThisRegion {
if currentVolume.SizeGb < wantedVolume.SizeGb {
Expand Down
12 changes: 6 additions & 6 deletions pkg/domain/model/volume_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import "time"

type VolumeState struct {
ID string `json:"id"`
Name string `json:"Name"`
SizeGb int `json:"SizeGb"`
State string `json:"State"`
Region string `json:"Region"`
Encrypted bool `json:"Encrypted"`
CreatedAt time.Time `json:"CreatedAt"`
Name string `json:"name"`
SizeGb int `json:"size_gb"`
State string `json:"state"`
Region string `json:"region"`
Encrypted bool `json:"encrypted"`
CreatedAt time.Time `json:"created_at"`

// TODO: later:
// App App `json:"App"`
Expand Down

0 comments on commit a029810

Please sign in to comment.