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

Could not load the cache metadata at Hello_World.meta in HelloWorldCacheTest #11196

Closed
hubertp opened this issue Sep 27, 2024 · 2 comments · Fixed by #12025
Closed

Could not load the cache metadata at Hello_World.meta in HelloWorldCacheTest #11196

hubertp opened this issue Sep 27, 2024 · 2 comments · Fixed by #12025
Assignees
Labels
-compiler p-low Low priority

Comments

@hubertp
Copy link
Collaborator

hubertp commented Sep 27, 2024

The PR makes simple build.sbt cleanups yet we get an assertion failure in runtime-integration-tests:

 INFO ide_ci::program::command: sbt ℹ️ [error] Test org.enso.interpreter.caches.HelloWorldCacheTest.loadingHelloWorldTwiceUsesCaching failed: java.lang.AssertionError: Contains hello world:
 INFO ide_ci::program::command: sbt ℹ️ [error] [enso::Compiler] FINE: Parsing module [Hello_World].
 INFO ide_ci::program::command: sbt ℹ️ [error] [enso::Cache] FINE: Could not load the cache metadata at [***\Hello_World.meta].
 INFO ide_ci::program::command: sbt ℹ️ [error] [enso::Cache] FINE: Could not load the cache metadata at [***\Hello_World.meta].
 INFO ide_ci::program::command: sbt ℹ️ [error] [enso::SerializationPool] FINE: Unable to load a cache for module [Hello_World].
 INFO ide_ci::program::command: sbt ℹ️ [error] [enso::SerializationPool] FINE: Deserializing module Hello_World from IR file: false
 INFO ide_ci::program::command: sbt ℹ️ [error] [enso::Compiler] FINE: Loading module [Hello_World] from source.
 INFO ide_ci::program::command: sbt ℹ️ [error] [enso::Compiler] FINE: Generating code for module [Hello_World].
 INFO ide_ci::program::command: sbt ℹ️ [error] [enso::SerializationPool] FINE: Requesting serialization for module [Hello_World].
 INFO ide_ci::program::command: sbt ℹ️ [error] Hello World
 INFO ide_ci::program::command: sbt ℹ️ [error] [enso::SerializationPool] FINE: Running serialization for module [Hello_World]., took 2.205 sec
 INFO ide_ci::program::command: sbt ℹ️ [error]     at org.enso.interpreter.caches.HelloWorldCacheTest.loadingHelloWorldTwiceUsesCaching(HelloWorldCacheTest.java:26)
 INFO ide_ci::program::command: sbt ℹ️ [error]     at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
 INFO ide_ci::program::command: sbt ℹ️ [error]     at java.lang.reflect.Method.invoke(Method.java:580)
 INFO ide_ci::program::command: sbt ℹ️ [error]     ...
 INFO ide_ci::program::command: sbt ℹ️ [info] Test run org.enso.interpreter.caches.HelloWorldCacheTest finished: 1 failed, 0 ignored, 1 total, 2.205s

https://github.com/enso-org/enso/actions/runs/11057308790/job/30720802542?pr=11170#step:7:6304

@JaroslavTulach
Copy link
Member

JaroslavTulach commented Nov 20, 2024

Luckily the test collects logs, inspects them and searches for predefined words. When it fails, it prints the log and we can inspect them. Printing the logs in a correct run can be achieved with:

enso.master$ git diff
diff --git engine/runtime-integration-tests/src/test/java/org/enso/interpreter/caches/HelloWorldCacheTest.java engine/runtime-integration-tests/src/test/java/org/enso/interpreter/caches/HelloWorldCacheTest.java
index 77ce983116..efc4be3292 100644
--- engine/runtime-integration-tests/src/test/java/org/enso/interpreter/caches/HelloWorldCacheTest.java
+++ engine/runtime-integration-tests/src/test/java/org/enso/interpreter/caches/HelloWorldCacheTest.java
@@ -39,7 +39,7 @@ public class HelloWorldCacheTest {
             containsString("Deserializing module"),
             containsString("Hello_World"),
             containsString("from IR file: true")));
-  }
+  assertTrue("OK:\n" + secondMsgs, false);}
 
   private static String executeOnce(File src) throws Exception {
     var backLog = new ByteArrayOutputStream();

let's compare the logs:

OK and BAD logs

The only common log is:

FINE: Parsing module [Hello_World].

then there is a difference. For same reason the CI failure Could not load the cache metadata at [***\Hello_World.meta] - e.g. this is a bug in the caching infrastructure, not in the test.

@JaroslavTulach JaroslavTulach removed their assignment Nov 20, 2024
@JaroslavTulach JaroslavTulach changed the title Unstable HelloWorldCacheTest enso:SerializationPool Could not load the cache metadata at [***\Hello_World.meta] in HelloWorldCacheTest Nov 20, 2024
@JaroslavTulach JaroslavTulach changed the title enso:SerializationPool Could not load the cache metadata at [***\Hello_World.meta] in HelloWorldCacheTest Could not load the cache metadata at Hello_World.meta in HelloWorldCacheTest Nov 20, 2024
@JaroslavTulach
Copy link
Member

Additional logs to explain why

Could not load the cache metadata at [***\Hello_World.meta]

is the file missing? Is it corrupted? Does it have wrong time stamp? Might explain why the test fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-compiler p-low Low priority
Projects
Status: 🟢 Accepted
Development

Successfully merging a pull request may close this issue.

2 participants