kubeflow / common

Common APIs and libraries shared by other Kubeflow operator repositories.
Apache License 2.0
51 stars 73 forks source link

Fix dependency configuration #136

Closed MartinForReal closed 3 years ago

MartinForReal commented 3 years ago

Remove unnecessary replace statements Add test dependencies.

MartinForReal commented 3 years ago

/assign @jeffwan

gaocegege commented 3 years ago

@terrytangyuan Yeah I think so.

MartinForReal commented 3 years ago

this kind of validation utility is still under discussion. ref: https://github.com/golang/go/issues/27005 A possible workaround is as described here: https://blog.urth.org/2019/08/13/testing-go-mod-tidiness-in-ci/

#!/bin/bash
set -e
go mod tidy
STATUS=$( git status --porcelain go.mod go.sum )
if [ ! -z "$STATUS" ]; then
    echo "Running go mod tidy modified go.mod and/or go.sum"
    exit 1
fi
exit 0
terrytangyuan commented 3 years ago

Would you like to add it to part of the CI as well in this PR?

gaocegege commented 3 years ago

/lgtm /assign @terrytangyuan

google-oss-robot commented 3 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: terrytangyuan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubeflow/common/blob/master/OWNERS)~~ [terrytangyuan] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
terrytangyuan commented 3 years ago

Build failed: https://travis-ci.com/github/kubeflow/common/builds/227049950

gaocegege commented 3 years ago

Ref https://travis-ci.com/github/kubeflow/common/builds/227050579#L332

gaocegege commented 3 years ago

Can you please update go mod?

Or is it caused by the go version?

MartinForReal commented 3 years ago

Can you please update go mod?

Or is it caused by the go version?

tricky part is: I can't reproduce the error on my laptop. So I just manually copy missing configuration from build logs and it works.

@terrytangyuan @gaocegege Since I've resolved build error, please take a look. Thanks!

terrytangyuan commented 3 years ago

/lgtm