nus-cs2103-AY2122S2 / forum

13 stars 1 forks source link

Java CI gradle failing but no issues on local machine #229

Closed NatalieTanML closed 2 years ago

NatalieTanML commented 2 years ago

Hello, I am currently facing some issues with Github Actions failing. Here is the link to the workflow.

I have tested it on my machine and I do not get any errors. It seems like the errors are related to the static objects after I updated them, but I'm not sure how to fix it/force clean(?) on Github's side.

image
domlimm commented 2 years ago

Hey @NatalieTanML! I saw that you tried to re-run the CI but to no avail.

Could you in IntelliJ go to File -> Invalidate Caches -> Invalidate and Restart (ensure these 2 boxes are checked; In image below) and then go to your gradle panel look for build -> clean and try to run test locally again?

Let us know how it goes!

image

NatalieTanML commented 2 years ago

Could you in IntelliJ go to File -> Invalidate Caches -> Invalidate and Restart (ensure these 2 boxes are checked; In image below) and then go to your gradle panel look for build -> clean and try to run test locally again?

Hi @domlimm, I just tried this out but I still managed to pass all the test cases locally.

damithc commented 2 years ago

I have tested it on my machine and I do not get any errors. It seems like the errors are related to the static objects after I updated them, but I'm not sure how to fix it/force clean(?) on Github's side.

A caching problem is more likely to happen locally than on GitHub, as GitHub uses a clean slate for each CI run.

Also try deleting your local build folder and output folder (if any) manually.

NatalieTanML commented 2 years ago

Wow after a few hours of debugging and tracing through the errors, it seems like there were some locale issues from the GitHub Actions environment with regards to date time string parsing. Updating our date time string parser to enforce a 24-hour format and removing the AM/PM format somehow resolved this issue.

Strangely enough even when i re-ran only the macOS GH action workflow it also broke there but on my local environment it was fine...