cloudfoundry / app-autoscaler-release

Automated scaling for apps running on Cloud Foundry
Apache License 2.0
27 stars 52 forks source link

tests appear to be broken #581

Closed thelangley closed 2 years ago

thelangley commented 2 years ago

It looks like something hasn't been fully go mod downloaded as part of the tests

/src/acceptance /tmp/build/2221e65c/app-autoscaler-release

+ go build -i -o ginkgo_v2 github.com/onsi/ginkgo/v2/ginkgo

go: github.com/KevinJCross/cf-test-helpers/v2@v2.0.0 requires

    github.com/kr/text@v0.2.0: missing go.sum entry; to add it:

    go mod download github.com/kr/text
thelangley commented 2 years ago

@KevinJCross I think this might be for you

KevinJCross commented 2 years ago

@thelangley Ive just tried 5.2.2 it seems to work correctly.

I believe you may just need to update your golang version to use golang 1.16 or higher. Golang 1.15 seems to give some "undefined: X" errors.

To prevent this in future Im currently adding some checks into the test script to check both the ginkgo version and golang. I will also update the running docs.

KevinJCross commented 2 years ago

BTW please give more information when reporting an issue, like golang version, Release version, and commands used to run the tests when reporting an error. This would save us some time.

thelangley commented 2 years ago

Sorry about that.

golang version was 1.16, re-running thorough the pipeline with 1.18

release version was 5.2.2

commands was ./src/acceptance/bin/test_default with some --flake-attempts set to 3

I'll let you know how I get on. Thanks again

KevinJCross commented 2 years ago

ok ... So this was not using the acceptance test release artifact ?

try using the acceptance tar from our release section: https://github.com/cloudfoundry/app-autoscaler-release/releases/download/5.2.2/app-autoscaler-acceptance-tests-v5.2.2.tgz

It has everything vendored so you dont need internet access.

then its cd accpetance/; ./bin/test_default .... or you can use the test script directly ./bin/test args...

KevinJCross commented 2 years ago

ill check your way of running its possible our release scripts update the go.sum when it fendors for the artifact.

KevinJCross commented 2 years ago

yup, Ive confirmed you actually need version 1.17+ to run it from the source code (the mod file is in 1.17 format), where you only need 1.16+ to run it from the artifact. If you update your golang version to 1.17+ then it will work. I'll be updating the scripts shortly to check for 1.17+ go when executing to avoid this confusion. https://github.com/cloudfoundry/app-autoscaler-release/pull/586

thelangley commented 2 years ago

that is great. thanks.

yeah all looks good in 1.17+