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

fix(core): ForEachItem inside an If task #7395

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

loicmathieu
Copy link
Member

Fixes #6801

Copy link

codecov bot commented Feb 14, 2025

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
1755 5 1750 9
View the top 3 failed test(s) by shortest run time
io.kestra.cli.services.FileChangedEventListenerTest executionError
Stack Traces | 0.009s run time
org.apache.commons.io.IOExceptionList: 1 exception(s): [org.apache.commons.io.IOIndexedException: FileNotFoundException #3: File does not exist: build/file-watch/io.kestra.tests.watch_pluginDefault.yml]
	at org.apache.commons.io.IOExceptionList.checkEmpty(IOExceptionList.java:50)
	at org.apache.commons.io.function.IOStream.forAll(IOStream.java:357)
	at org.apache.commons.io.function.IOStreams.forAll(IOStreams.java:42)
	at org.apache.commons.io.function.IOStreams.forAll(IOStreams.java:36)
	at org.apache.commons.io.function.IOConsumer.forAll(IOConsumer.java:80)
	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:381)
	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1256)
	at io.kestra.cli.services.FileChangedEventListenerTest.tearDown(FileChangedEventListenerTest.java:47)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1116)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: org.apache.commons.io.IOIndexedException: FileNotFoundException #3: File does not exist: build/file-watch/io.kestra.tests.watch_pluginDefault.yml
	at org.apache.commons.io.function.IOStream.lambda$forAll$11(IOStream.java:352)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
	at org.apache.commons.io.function.IOStream.forAll(IOStream.java:343)
	... 10 more
Caused by: java.io.FileNotFoundException: File does not exist: build/file-watch/io.kestra.tests.watch_pluginDefault.yml
	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1432)
	at org.apache.commons.io.FileUtils.lambda$cleanDirectory$0(FileUtils.java:381)
	at org.apache.commons.io.function.IOStream.lambda$forAll$11(IOStream.java:345)
	... 13 more
io.kestra.core.tasks.test.SanityCheckTest qaFetch(Execution)
Stack Traces | 1.13s run time
java.lang.AssertionError: 
Expected: is <SUCCESS>
     but: was <FAILED>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
	at io.kestra.core.tasks.test.SanityCheckTest.qaFetch(SanityCheckTest.java:27)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension$2.proceed(MicronautJunit5Extension.java:142)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptEach(AbstractMicronautExtension.java:162)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptTest(AbstractMicronautExtension.java:119)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension.interceptTestMethod(MicronautJunit5Extension.java:129)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
io.kestra.runner.h2.H2ServiceLivenessCoordinatorTest taskResubmitSkipExecution()
Stack Traces | 2.08s run time
java.lang.AssertionError: 
Expected: is <true>
     but: was <false>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
	at io.kestra.jdbc.runner.JdbcServiceLivenessCoordinatorTest.taskResubmitSkipExecution(JdbcServiceLivenessCoordinatorTest.java:161)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension$2.proceed(MicronautJunit5Extension.java:142)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptEach(AbstractMicronautExtension.java:162)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptTest(AbstractMicronautExtension.java:119)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension.interceptTestMethod(MicronautJunit5Extension.java:129)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@loicmathieu loicmathieu force-pushed the fix/for-each-item-in-if branch from 10d07a4 to df9a873 Compare February 14, 2025 09:42
@loicmathieu loicmathieu force-pushed the fix/for-each-item-in-if branch from df9a873 to f164d33 Compare February 14, 2025 10:46
@loicmathieu loicmathieu merged commit d9d2f86 into develop Feb 14, 2025
5 of 6 checks passed
@loicmathieu loicmathieu deleted the fix/for-each-item-in-if branch February 14, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

ForEachItem doesn't work inside an If flow
1 participant