apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.54k stars 1.17k forks source link

Build binary test actions from source #4630

Open dgrove-oss opened 5 years ago

dgrove-oss commented 5 years ago

Apache source releases should not include compiled files or other binary artifacts.

Our git repo includes binary artifacts as listed below that are used as input to our test suite. We should add support for building these artifacts from source so that it is possible to run the full openwhisk test suite from a pure source release.

tests/dat/actions/helloSwift311.zip: application/zip; charset=binary
tests/dat/actions/sleep.jar: application/java-archive; charset=binary
tests/dat/actions/helloJavaDefaultPackage.jar: application/java-archive; charset=binary
tests/dat/actions/python_virtualenv_name.zip: application/zip; charset=binary
tests/dat/actions/zippedaction.zip: application/zip; charset=binary
tests/dat/actions/helloJava.jar: application/zip; charset=binary
tests/dat/actions/python37_virtualenv.zip: application/zip; charset=binary
tests/dat/actions/python_virtualenv_dir.zip: application/zip; charset=binary
tests/dat/actions/multiSwift.zip: application/zip; charset=binary
tests/dat/actions/python3_virtualenv.zip: application/zip; charset=binary
tests/dat/actions/unicode.tests/ballerina-0.990.bin: application/octet-stream; charset=binary
tests/dat/actions/unicode.tests/dotnet-2.2.bin: application/zip; charset=binary
tests/dat/actions/unicode.tests/java-8.bin: application/zip; charset=binary
tests/dat/actions/python.zip: application/zip; charset=binary
tests/dat/actions/blackbox.zip: application/zip; charset=binary
tests/dat/actions/python2_virtualenv.zip: application/zip; charset=binary
tests/performance/gatling_tests/src/gatling/resources/data/javaAction.jar: application/java-archive; charset=binary)
rabbah commented 4 years ago

https://github.com/apache/openwhisk/issues/4630 Removes the zip and jar files in test/dat. Some of the files referenced above are not used in this repo and should move to their proper home. I’ve taken liberties in deleting them.

With the pr these files are left:

tests/dat/actions/unicode.tests/ballerina-0.990.bin: application/octet-stream; charset=binary
tests/dat/actions/unicode.tests/dotnet-2.2.bin: application/zip; charset=binary
tests/dat/actions/unicode.tests/java-8.bin: application/zip; charset=binary
tests/performance/gatling_tests/src/gatling/resources/data/javaAction.jar: application/java-archive; charset=binary)
rabbah commented 4 years ago

iirc the ballerina Unicode test could just use the source version. Similarly we can use java source for the java Unicode test although there is a gradle file so we can just run gradlew and get the jar.

The dotnet sources for the Unicode test are also in the repo so we need a way to build this action. @shawnallen85 whats is the most a convenient way to build this test artifact from source?

That leaves the Gatling test. I haven’t looked into it but it should be manageable.

rabbah commented 4 years ago

I committed a build from source for Java. I first attempted to run from source but the java 8 runtime we're publishing isn't the action loop version so it requires a JAR. :/ The build script will make sure java 8 is available since the versions must match.

Rather than figure out how to build Ballerina and Dotnet from source, I just removed them. The unicode test is checked anyway in the action runtime basic tests.

That leaves the Gatling test. Will just build it from source like the unicode test.

rabbah commented 4 years ago

Now gatling test is build from source also. I think that's that then.