apache / openwhisk-wskdeploy

Apache OpenWhisk utility for deploying and managing OpenWhisk projects and packages
https://openwhisk.apache.org/
Apache License 2.0
77 stars 74 forks source link

Remove redundant script from Travis build and improve log information #1140

Closed mrutkows closed 3 years ago

mrutkows commented 3 years ago

In reviewing this PR: https://github.com/apache/openwhisk-wskdeploy/pull/1137 I found something unexpected... Although the PR itself was attempting to add arm64 support (aka aarch64); we knew that arm64 was being already being built and released without any code in that script .

I determined that we had a script that was not doing what it was named for... https://github.com/apache/openwhisk-wskdeploy/blob/master/tools/travis/build_tag_releases.sh

and was not accounted for properly (i.e., removed) when gogradle support was added and then subsequently improved over time.

History

The original support of gogradle was added here (no "build_tag_release.sh): https://github.com/apache/openwhisk-wskdeploy/pull/812

which removed the script in question:

- export build_file_name=wskdeploy
- go get github.com/inconshreveable/mousetrap
- "./tools/travis/build_tag_releases.sh $build_file_name"
- export RELEASE_PKG_FILE=$(ls $build_file_name-*.*)

later the same day it was added back (with no reason provided): https://github.com/apache/openwhisk-wskdeploy/pull/814 with the comment/title: "Keep the date update-to-date when the tag latest is updated"

before_deploy:
- export build_file_name=wskdeploy
- go get github.com/inconshreveable/mousetrap
- "./tools/travis/build_tag_releases.sh $build_file_name"
- ./gradlew --console=plain releaseBinaries

Note that:

It was specifically removed here "Remove the redundant packages from the release artifacts": https://github.com/apache/openwhisk-wskdeploy/pull/934

BUT, then it was explicitly added back here "Add the build_tag_release script back": https://github.com/apache/openwhisk-wskdeploy/pull/936

Thankfully, Anthony added support for the LDFLAGS here: https://github.com/apache/openwhisk-wskdeploy/pull/1047/files

LDFLAGS=-ldflags "-X main.Version=${VERSION} -X main.GitCommit=${BUILD} -X main.BuildDate=${BUILD_DATE} -X main.Build=`git rev-parse HEAD` "

which made any part of the very questionable script rendered defunct.

mrutkows commented 3 years ago

While here, tried to address our ability to debug recurring issues we have seen for a very long time only in Travis around doing large project exports (esp. with project dependencies) in rapid succession by adding additional error checking and trace capabilities around the ExportProject test entry point (and its fulfilling code).