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 glob to regex conversion to properly handle **/*.suffix #44678

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

zakkak
Copy link
Contributor

@zakkak zakkak commented Nov 25, 2024

Fixes issue reported in #44664 (reply in thread)

In the reproducer **/.json gets translated to the regex ./[^/]\.json, which doesn't match test.json because it needs at least one /.
...
Now my understanding is that **/
.json is expected to match all json files (see here), including test.json

@quarkus-bot quarkus-bot bot added the area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins label Nov 25, 2024
@zakkak zakkak added triage/backport-3.8 triage/backport-3.15 triage/backport-3.16 triage/backport and removed area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins labels Nov 25, 2024
Comment on lines +37 to +38
assertMatch("**/*.txt", Arrays.asList("/test.txt", "test.txt", "/path/to/a.txt", "relative/path/to/a.txt"),
Arrays.asList("/test.py", "test.json", "/path/to/a.js", "relative/path/to/a.exe"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test with foo/**/test.json and foo/**/*.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@zakkak zakkak force-pushed the 2024-11-25-fix-glob-to-regex branch from aea7b99 to e9d1674 Compare November 25, 2024 12:07
@quarkus-bot quarkus-bot bot added the area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins label Nov 25, 2024
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@gsmet gsmet added triage/waiting-for-ci Ready to merge when CI successfully finishes and removed triage/backport-3.16 labels Nov 25, 2024
@zakkak zakkak changed the title Fix glob to regex conversation to properly handle **/*.suffix Fix glob to regex convertion to properly handle **/*.suffix Nov 25, 2024
Copy link

quarkus-bot bot commented Nov 25, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit e9d1674.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 integration-tests/reactive-messaging-kafka

io.quarkus.it.kafka.KafkaConnectorTest.testRequestReply - History

  • iterable contents differ at index [4], expected: <reply-5> but was: <{"details":"Error id 12f4a1c4-5b9a-46c4-a711-5ce46efd81b2-1, org.jboss.resteasy.spi.UnhandledException: io.smallrye.mutiny.TimeoutException","stack":"org.jboss.resteasy.spi.UnhandledException: io.smallrye.mutiny.TimeoutException\n\tat org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:107)\n\tat org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:344)\n\tat org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:205)\n\tat org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:452)\n\tat org.jboss.resteasy.core.SynchronousDispatcher.lambda$invokePropagateNotFound$6(SynchronousDispatcher.java:275)\n\tat org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:154)\n\tat org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchC... - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: iterable contents differ at index [4], expected: <reply-5> but was: <{"details":"Error id 12f4a1c4-5b9a-46c4-a711-5ce46efd81b2-1, org.jboss.resteasy.spi.UnhandledException: io.smallrye.mutiny.TimeoutException","stack":"org.jboss.resteasy.spi.UnhandledException: io.smallrye.mutiny.TimeoutException\n\tat org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:107)\n\tat org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:344)\n\tat org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:205)\n\tat org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:452)\n\tat org.jboss.resteasy.core.SynchronousDispatcher.lambda$invokePropagateNotFound$6(SynchronousDispatcher.java:275)\n\tat org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:154)\n\tat org.jboss.resteasy.core.interception.jaxrs.PreMatchCon...

⚙️ JVM Tests - JDK 17 Windows

📦 extensions/micrometer/deployment

io.quarkus.micrometer.deployment.binder.VertxTcpMetricsTest.testTcpMetrics - History

  • event executor terminated - java.util.concurrent.RejectedExecutionException
java.util.concurrent.RejectedExecutionException: event executor terminated
	at io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:934)
	at io.netty.util.concurrent.SingleThreadEventExecutor.offerTask(SingleThreadEventExecutor.java:353)
	at io.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:346)
	at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:836)
	at io.netty.util.concurrent.SingleThreadEventExecutor.execute0(SingleThreadEventExecutor.java:827)
	at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:817)
	at io.vertx.core.impl.EventLoopExecutor.execute(EventLoopExecutor.java:35)

@gastaldi gastaldi merged commit 180a4b5 into quarkusio:main Nov 25, 2024
52 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.18 - main milestone Nov 25, 2024
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Nov 25, 2024
@zakkak zakkak deleted the 2024-11-25-fix-glob-to-regex branch November 25, 2024 21:09
@gsmet gsmet modified the milestones: 3.18 - main, 3.17.1 Nov 27, 2024
@gsmet gsmet changed the title Fix glob to regex convertion to properly handle **/*.suffix Fix glob to regex conversion to properly handle **/*.suffix Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins triage/backport-3.8 triage/backport-3.15 triage/flaky-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants