Skip to content

Conversation

@jglick
Copy link
Member

@jglick jglick commented Jan 14, 2025

Flaking in #499 (jenkins-infra/helpdesk#4490 (comment)):

java.lang.AssertionError: 
Expected C:\Jenkins\agent\workspace\ugins_workflow-job-plugin_PR-499\target\tmp\j h889974776841325549\jobs\test0\builds\4 to be empty but saw: [build.xml, log, log-index, workflow-completed]
Expected: an empty array
     but: array size was <4>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
	at org.jenkinsci.plugins.workflow.job.WorkflowRunTest.logRotationOnlyProcessesCompletedBuilds(WorkflowRunTest.java:732)

Amending #470.

@jglick jglick added the tests label Jan 14, 2025
@jglick jglick requested a review from a team as a code owner January 14, 2025 23:03
@jglick jglick requested a review from dwnusbaum January 14, 2025 23:05
@jglick jglick enabled auto-merge January 14, 2025 23:05
@jglick
Copy link
Member Author

jglick commented Jan 14, 2025

Hmm, still flaking in CI

org.awaitility.core.ConditionTimeoutException: Condition with alias 'C:\Jenkins\agent\workspace\ugins_workflow-job-plugin_PR-502\target\tmp\j h4771907368547386517\jobs\test0\builds\1 should be empty' didn't complete within 10 seconds because lambda expression in org.jenkinsci.plugins.workflow.job.WorkflowRunTest expected an empty collection but <[build.xml, log, log-index, workflow-completed]>.
 	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
 	at org.awaitility.core.AbstractHamcrestCondition.await(AbstractHamcrestCondition.java:86)
 	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
 	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:712)
 	at org.jenkinsci.plugins.workflow.job.WorkflowRunTest.logRotationOnlyProcessesCompletedBuilds(WorkflowRunTest.java:728)

Passes for me locally (Windows 10 VM).

@jglick
Copy link
Member Author

jglick commented Jan 14, 2025

Ah now I see in full test logs e.g.

WARNING	j.m.GlobalBuildDiscarderListener#onFinalized: Failed to rotate log for test0 #2
Also:   java.nio.file.AccessDeniedException: C:\Jenkins\agent\workspace\ugins_workflow-job-plugin_PR-502\target\tmp\j h4771907368547386517\jobs\test0\builds\1 -> C:\Jenkins\agent\workspace\ugins_workflow-job-plugin_PR-502\target\tmp\j h4771907368547386517\jobs\test0\builds\.1
		at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
		at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
		at java.base/sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317)
		at java.base/sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293)
		at java.base/java.nio.file.Files.move(Files.java:1432)
		at hudson.model.Run.delete(Run.java:1596)
		at hudson.tasks.LogRotator.perform(LogRotator.java:179)
jenkins.util.io.CompositeIOException: Failed to rotate logs for [test0 #1]
	at hudson.tasks.LogRotator.perform(LogRotator.java:236)
	at hudson.model.Job.logRotate(Job.java:490)
	at jenkins.model.GlobalBuildDiscarderListener.onFinalized(GlobalBuildDiscarderListener.java:51)
	at hudson.model.listeners.RunListener.lambda$fireFinalized$3(RunListener.java:260)
	at jenkins.util.Listeners.lambda$notify$0(Listeners.java:59)
	at jenkins.util.Listeners.notify(Listeners.java:67)
	at hudson.model.listeners.RunListener.fireFinalized(RunListener.java:258)
	at hudson.model.Run.onEndBuilding(Run.java:1983)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:672)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1070)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1545)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:522)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$2(CpsVmExecutorService.java:85)
	at …

@jglick
Copy link
Member Author

jglick commented Jan 14, 2025

The failing code has been there for years: jenkinsci/jenkins#4138

… it seems to be triggered by the switch to VMs from ACI, meaning that it is platform-dependent
@jglick jglick disabled auto-merge January 15, 2025 00:09
@jglick jglick merged commit 8a84adf into jenkinsci:master Jan 15, 2025
17 checks passed
@jglick jglick deleted the WorkflowRunTest.logRotationOnlyProcessesCompletedBuilds branch January 15, 2025 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant