Skip to content

Commit f896e48

Browse files
committed
workspace=docker: Improve image verification logic
When using workspace=docker, if Skeema finds a pre-existing container created from a previous run, the image of the container is verified. The previous logic was overly strict, erroring in two valid situations: * If the local Docker tag for the major.minor version now points to a different patch release, due to other non-Skeema Docker usage on the system * If the version of Docker is several years old and uses the previous hashing scheme for image identification In either of these cases, Skeema no longer errors, as long as the Dockerized instance's flavor (vendor and major.minor version) can be introspected and correctly match that of the desired image (via Skeema's flavor option).
1 parent 6eef627 commit f896e48

File tree

6 files changed

+25
-18
lines changed

6 files changed

+25
-18
lines changed

Gopkg.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

skeema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ schema to the filesystem, and apply online schema changes by modifying files.`
1616

1717
// Globals overridden by GoReleaser's ldflags
1818
var (
19-
version = "1.2.5-dev"
19+
version = "1.2.6-dev"
2020
commit = "unknown"
2121
date = "unknown"
2222
)

util/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"path/filepath"
99
"regexp"
1010
"strings"
11-
"syscall"
1211

1312
log "github.com/sirupsen/logrus"
1413
"github.com/skeema/mybase"
@@ -134,7 +133,7 @@ func ProcessSpecialGlobalOptions(cfg *mybase.Config) error {
134133
// PromptPassword reads a password from STDIN without echoing the typed
135134
// characters. Requires that STDIN is a TTY.
136135
func PromptPassword() (string, error) {
137-
stdin := int(syscall.Stdin)
136+
stdin := int(os.Stdin.Fd())
138137
if !terminal.IsTerminal(stdin) {
139138
return "", errors.New("STDIN must be a TTY to read password")
140139
}

vendor/github.com/skeema/tengo/README.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/skeema/tengo/docker.go

Lines changed: 18 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/skeema/tengo/flavor.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)