Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect example client checks #1169

Merged
merged 1 commit into from
Jun 18, 2020
Merged

Conversation

jul-sh
Copy link
Contributor

@jul-sh jul-sh commented Jun 18, 2020

Fixes the issue of incorrectly skipping clients, as caught by David: #1148 (comment)

Looking back the forgiving nature of this logic probably isn't ideal. Instead it seems that a type of "manifest" that specifies all clients that should be available for an example (and fails if they are not) is preferable.

@jul-sh jul-sh added the bug Something isn't working label Jun 18, 2020
@jul-sh jul-sh requested a review from daviddrysdale June 18, 2020 11:25
@@ -125,7 +125,7 @@ do
;;
cpp)
cpp_client="./bazel-client-bin/examples/${EXAMPLE}/client/client"
if [[ -d "${cpp_client}" ]]; then
if [[ -f "${cpp_client}" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for now to get things moving again, but this has a couple of confusions that it would be good to come back and fix.

  • On a minor note, cpp_client doesn't actually indicate a C++ client, it indicates a client that's built with Bazel (example: examples/translator/client/client is built from Go). This is mostly pedantry, up until the point where it isn't.
  • More significantly, this isn't checking whether there is C++ client source code available, it's checking whether there is an already-built client binary present in the directory that our build scripts happen to put Bazel output into. This means that using the -s none option in an environment that hasn't done build_example is going to skip the tests.

For the latter, I wonder if a test for "${SCRIPTS_DIR}/../examples/${EXAMPLE}/client/BUILD" would be more reliable (and would be more closely analogous to the rust) case above).

Copy link
Contributor Author

@jul-sh jul-sh Jun 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your comment.

I agree with you on the cpp naming, though arguably that issue is not new in this logic and preceded those changes.

My suggestion is to take inspiration from the rust runner and follow this up with another PR that changes that check & renames cpp to the more accurate bazel, alongside renaming nodejs to npm, aka the build system the scripts will use.

@jul-sh jul-sh merged commit 19ff6bb into project-oak:main Jun 18, 2020
@jul-sh jul-sh deleted the fix-checks branch June 18, 2020 12:11
@github-actions
Copy link

Reproducibility Index:

c7e447de8c9dc9456f7a8ba83959474a39970eb4967998fe0b908f92f0a4d89b  ./examples/target/wasm32-unknown-unknown/release/abitest_0_frontend.wasm
7197a5c68eaf0d2d5ae226ea1cb8dbf1a5a3b499c8a205e5d7a0537faa7dcd1f  ./examples/target/wasm32-unknown-unknown/release/abitest_1_backend.wasm
20c9b09fd04da0a06a69f6343eaf0f3afd7bbf97304e3a08464e13f185feb969  ./examples/target/wasm32-unknown-unknown/release/aggregator.wasm
0bdbe9ec58af36a1c50311a598bdc0bb09327ba4ea9aa4abd0d5c4ce6426bf02  ./examples/target/wasm32-unknown-unknown/release/chat.wasm
c0f0cfc1d370b0adfe7907d79f8afa0548f2f77dc7ef8aa5a17be3405f30cd76  ./examples/target/wasm32-unknown-unknown/release/hello_world.wasm
97f2f2eff51281290bd836ed86cffc8999718659431d0f5f8468d1afcaa24cdf  ./examples/target/wasm32-unknown-unknown/release/machine_learning.wasm
a3e0afddba46224ca81f1a43a163e9f0c47fe106bd5f670ead206610939db449  ./examples/target/wasm32-unknown-unknown/release/private_set_intersection.wasm
2ed84ec712fbfc733e204a6ed1af7651f7b9b1bc241878adb17c6ea301a233d1  ./examples/target/wasm32-unknown-unknown/release/running_average.wasm
f42dae0e0c31c6dea9766ee2441327d95de2242990d024d68e99b431a414c562  ./examples/target/wasm32-unknown-unknown/release/translator.wasm
f2f4a2ced4d1af2c4fde34361742d3bceae636c6bfcc468af92e9b4be5427ad7  ./examples/target/wasm32-unknown-unknown/release/trusted_information_retrieval.wasm
05d38c3651a5957046612a92119daf777e5632e4e033bb3b5180160358e6db6b  ./oak/server/target/x86_64-unknown-linux-musl/release/oak_loader

Reproducibility Index diff:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants