Skip to content

Conversation

@sdudoladov
Copy link
Member

@sdudoladov sdudoladov commented Dec 16, 2019

At present e2e tests fail with

Error response from daemon: manifest for registry.opensource.zalan.do/acid/postgres-operator-e2e-tests:latest not 
found: manifest unknown: manifest unknown 

the cause of this are modifications to go.mod /go.sum during build that make git status add the dirty suffix to an image tag

changes are the result of installing kind via go modules (PR); They were reverted in a later PR despite the PR's author correctly raising a warning that certain tests exhibit failures.

UPD looks like some form of dep conflict with kind ; the proposed changes from this PR actually break unit tests

@sdudoladov
Copy link
Member Author

@zimbatm already identified the issue

for now we may switch back to installing kind as a binary to prevent kind installation from overwriting operator dependencies

@sdudoladov sdudoladov closed this Dec 16, 2019
@zimbatm
Copy link
Contributor

zimbatm commented Dec 16, 2019

One trick I used in other projects is to create a tools package that contains a file like this:

// +build tools
package tools

// put all the tools here
import (
  _ "sigs.k8s.io/kind"
)

and a bunch of wrapper scripts like this:

#!/bin/sh
exec go run sigs.8s.io/kind "$@"

Thanks to the +build tools build pragma, the package never gets built, but each dependency still gets listed in go.sum. The wrapper scripts can be invoked directly instead of running go install.

In this case it wouldn't solve the dependency conflict but it has the benefit of making it explicit and avoid unnecessary churn in the go.sum file.

Also, it definitely feels like a hack but this is the best solution I know of for dev dependencies.

PPS: a variation on that it to create a go.mod in the tools folder to split the tools dependencies from the code dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants