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

Windows CI broken #233

Open
mchitre opened this issue Nov 8, 2021 · 6 comments
Open

Windows CI broken #233

mchitre opened this issue Nov 8, 2021 · 6 comments
Assignees

Comments

@mchitre
Copy link
Member

mchitre commented Nov 8, 2021

Windows CI is broken as one of the JAR attributes turns out to be null on Windows:

jar {
  manifest {
    attributes 'Build-Owner': System.getenv().USER, 'Build-Timestamp': new Date().format('d-MM-yyyy_HH:mm:ss'), 'Build-Version': "${project.version}/${commit}"
  }
}

perhaps System.getenv().USER?

Temporarily disabled Windows CI to avoid it from canceling Linux CI.

@mchitre mchitre self-assigned this Nov 8, 2021
@mchitre mchitre added tests and removed bug labels Nov 8, 2021
@notthetup
Copy link
Collaborator

I've a branch which fixes some of these issues but not all..

https://github.com/org-arl/fjage/tree/windows-github-actions

@notthetup
Copy link
Collaborator

notthetup commented Nov 9, 2021

OK. I fixed this branch (mostly just rebase) https://github.com/org-arl/fjage/tree/windows-github-actions to make the windows build work on CI.

Most of the other tests seem to be passing but the Java ShellAgent testShell fails when deleting files.

I moved the hardcoded dir to java.io.tmpdir for the test so it could create/delete the file from the appropriate temporary directory based on the platform. And all the other tests pass, except somehow the delete test. Any ideas?

org.arl.fjage.test.BasicTests > testShell STANDARD_ERROR
    1636449167759|INFO|org.arl.fjage.test.BasicTests@1:testShell|testShell
    1636449167761|INFO|org.arl.fjage.Container@35:shutdown|Initiating shutdown...
    1636449167762|INFO|org.arl.fjage.Container@35:shutdown|All agents have shutdown
    2000|INFO|org.arl.fjage.DiscreteEventSimulator@34:run|Simulator shutdown
    1636449167767|INFO|org.arl.fjage.Container@1:init|Initializing agents...
    1636449167768|INFO|org.arl.fjage.shell.ShellAgent@40:init|Agent shell init
    1636449167868|INFO|org.arl.fjage.Container@1:init|Agents ready...
    1636449167868|INFO|org.arl.fjage.Container@1:start|Starting container...
    1636449168468|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|put1 rsp: AGREE
    1636449168469|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|get rsp: INFORM: GetFileRsp
    1636449168469|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|get data len: 14
    1636449168470|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|get data: this is a test
    1636449168473|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|get2 rsp: INFORM: GetFileRsp
    1636449168474|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|get data len: 4
    1636449168474|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|get data: is a
    1636449168475|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|get3 rsp: INFORM: GetFileRsp
    1636449168475|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|get data len: 5
    1636449168475|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|get data:  test
    1636449168476|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|get4 rsp: REFUSE
    1636449168487|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|put2 rsp: AGREE
    1636449168495|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|put3 rsp: AGREE
    1636449168495|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|put3 length 40 : 40
    1636449168497|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|put4 rsp: AGREE
    1636449168504|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|get dir rsp: INFORM: GetFileRsp
    1636449168505|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: 1/	0	1636448922298
    1636449168505|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: chocolatey/	0	1635980127229
    1636449168505|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: fjage-test.txt	14	1636449168496
    1636449168505|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: hsperfdata_runneradmin/	0	1636449164631
    1636449168506|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: NuGetScratch/	0	1635980137176
    1636449168507|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: RazorVSFeedbackLogs/	0	1635980267118
    1636449168507|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: servicehub/	0	1635980216516
    1636449168508|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: TFR966E.tmp	416	1635980172871
    1636449168508|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: v8-compile-cache/	0	1636449141434
    1636449168508|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: vs.mcj872576055/	0	1635980351943
    1636449168508|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: VSFaultInfo/	0	1635980276161
    1636449168508|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: VSFeedbackPerfWatsonData/	0	1635980348213
    1636449168508|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: VSLogs/	0	1635980312299
    1636449168509|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: VSTelem/	0	1635980347565
    1636449168509|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|DIR: VSTelem.Out/	0	1635980348213
    1636449168510|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@41:action|del rsp: FAILURE
    1636449168871|INFO|org.arl.fjage.Container@42:shutdown|Initiating shutdown...
    1636449168872|INFO|org.arl.fjage.shell.ShellAgent@40:shutdown|Agent shell shutdown
    1636449168874|INFO|org.arl.fjage.Container@42:shutdown|All agents have shutdown

@mchitre
Copy link
Member Author

mchitre commented Nov 10, 2021

Hmm. The FAILURE response without an exception logged seems to suggest that File.delete() returns false. But the file clearly exists, since all other tests pass and we see it in the DIR listing. Might be worth printing filename in ShellAgent, just before deleting and removing the if (rsp != null && rsp.getPerformative() == Performative.AGREE) check in BasicTests.java to see if the file actually got deleted.

@notthetup
Copy link
Collaborator

notthetup commented Nov 11, 2021

1636604435502|INFO|org.arl.fjage.shell.ShellAgent@38:handlePutFileReq|Deleting file C:\Users\RUNNER~1\AppData\Local\Temp\fjage-test.txt >> false

1636604435503|WARNING|org.arl.fjage.shell.ShellAgent@38:handlePutFileReq|C:\Users\RUNNER~1\AppData\Local\Temp\fjage-test.txt: The process cannot access the file because it is being used by another process.

1636604435509|INFO|org.arl.fjage.test.BasicTests$ShellTestAgent@39:action|del rsp: FAILURE

@notthetup
Copy link
Collaborator

Seems like File.delete doesn't give much explanation as to why it failed, but Files.delete() does throw this exception.

1636604435503|WARNING|org.arl.fjage.shell.ShellAgent@38:handlePutFileReq|C:\Users\RUNNER~1\AppData\Local\Temp\fjage-test.txt: The process cannot access the file because it is being used by another process.

@notthetup
Copy link
Collaborator

Ah! I know the file is being held open by the isCache! Cleaning it before deleting seems to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants