I am an developer of checker framework, we are fac...
# community-support
a
I am an developer of checker framework, we are facing random failure issue (sometimes the task work and sometimes it fails) on github CI for this gradle task https://github.com/eisop/checker-framework/blob/5e54d0748525cd128147c1e4912cc0c45caa207a/dataflow/build.gradle#L99, looks like it might related to gradle cache. Anyone have experience with the caching mechanism? https://github.com/eisop/checker-framework/issues/849
c
the two ‘delete’ lines are done at configuration time and won’t be executed if the configuration cache is used. Move them into the doLast such that they are run at execution time.
👍 1
The conditional input “if (diff)” is also unusual. Not clear that even needs to be conditional.
v
You should probably start with doing what the error tells you. Run with
--info
,
--stacktrace
, and
--scan
to get more info on what is happening. And then as your run some Java class you probably need to add debug logging to your class to see what is failing. As the only files coming from cache are the compilation results, I doubt it is a cache problem. The not about the delete lines is right of course, but most probably irrelevant here, as CC is not used here.
a
I actually can not reproduce it locally. It only fails on github action.
v
Doesn't mean you cannot add
--info
,
--stacktrace
, and
--scan
or add debug output to the code that is executed. If it would reproduce locally I'd had recommended to debug the execution in an IDE. ;-)
a
Thanks! I add
--stacktrace
in the script, and it fails with
Copy code
BUILD FAILED in 29s 402
28 actionable tasks: 15 executed, 13 from cache
https://github.com/eisop/checker-framework/actions/runs/10333405533/job/28605715625?pr=852
And everytime we run
gh cache delete --all
and it works for a few jobs. After a few, it fails the same place...
v
Well you still ignored 3/4 of what I said. I recommended to add
--info
,
--stacktrace
, and
--scan
. And as you then probably just find out that your class you are calling is running into an error, to add debug output to the code that is executed.
a
oh thanks. let me try it out
ah, interesting. After adding those three flags, it stops failing...
🤨 1
v
Wait for it :-D
👀 1
a
Looks like the junit task completes without error at this time.... Interesting...
does it make any difference in terms of execution after adding those gradle options?
c
Those flags don’t affect execution
a
yeah... but it turns with the flags, the ci works fine. Remove them I will get the same error. This is so weird...
c
--info
adjust the logger to print out messages at the info level;
--stacktrace
prints a stack trace on build failure;
--scan
publishes a build scan on build completion.
its highly unlikely the flags interact with your issue - more likely is the problem being intermittent. You could try one flag at a time if you wish.
v
> more likely is the problem being intermittent long form of my last comment 🙂
c
indeed! 😉
a
thanks for answering the question, maybe it is intermittent...