Skip to content

Prevent AccessDeniedException in DEV mode when DEV UI is locating workspace item - #48385

Merged
phillip-kruger merged 1 commit into
quarkusio:mainfrom
michalvavrik:feature/fix-dev-ui-access-denied-ex
Jun 16, 2025
Merged

Prevent AccessDeniedException in DEV mode when DEV UI is locating workspace item#48385
phillip-kruger merged 1 commit into
quarkusio:mainfrom
michalvavrik:feature/fix-dev-ui-access-denied-ex

Conversation

@michalvavrik

Copy link
Copy Markdown
Member

public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
if (Files.isHidden(dir) || ignoreFolders.contains(dir.getFileName().toString())) {
if (Files.isHidden(dir) || ignoreFolders.contains(dir.getFileName().toString())
|| !Files.isReadable(dir)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For a directory, you also need executable. At least on Unix. Not sure how Windows reacts when checking for executable...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, maybe that's why I had to add visitFileFailed (although I'll probably keep it anyway). I'll try it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes keep it, it’s nice to have a safe guard.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I have added a check for "executable" file permission and it is in the PR now. But when I tried to reproduce it without visitFileFailed, application still failed to start. So I'll keep it as you are OK with it.

@gsmet

gsmet commented Jun 14, 2025

Copy link
Copy Markdown
Member

Thanks for having a look at this one, I had it on my list and then forgot!

@michalvavrik
michalvavrik force-pushed the feature/fix-dev-ui-access-denied-ex branch from 16ec2da to 02b3476 Compare June 14, 2025 16:18
@quarkus-bot

This comment has been minimized.

@michalvavrik
michalvavrik force-pushed the feature/fix-dev-ui-access-denied-ex branch from 02b3476 to 3fa48ad Compare June 14, 2025 19:50
@michalvavrik

Copy link
Copy Markdown
Member Author

I don't think these failures are related at all, I push the same code again (as it is already rebased on current main) so that we get idea if these failures are stable.

@quarkus-bot

quarkus-bot Bot commented Jun 14, 2025

Copy link
Copy Markdown

Status for workflow Quarkus CI

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

✅ 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

⚙️ Gradle Tests - JDK 17 Windows

📦 integration-tests/gradle

io.quarkus.gradle.devmode.IncludedKotlinBuildDevModeTest.main - History

  • Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 1 minutes 30 seconds. - org.awaitility.core.ConditionTimeoutException
Details
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 1 minutes  30 seconds.
	at app//org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at app//org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at app//org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at app//org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at app//org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at app//io.quarkus.test.devmode.util.DevModeClient.getHttpResponse(DevModeClient.java:164)
	at app//io.quarkus.gradle.devmode.QuarkusDevGradleTestBase.getHttpResponse(QuarkusDevGradleTestBase.java:165)
  • Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 1 minutes 30 seconds. - org.awaitility.core.ConditionTimeoutException
Details
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 1 minutes  30 seconds.
	at app//org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at app//org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at app//org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at app//org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at app//org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at app//io.quarkus.test.devmode.util.DevModeClient.getHttpResponse(DevModeClient.java:164)
	at app//io.quarkus.gradle.devmode.QuarkusDevGradleTestBase.getHttpResponse(QuarkusDevGradleTestBase.java:165)

⚙️ JVM Integration Tests - JDK 17

📦 integration-tests/opentelemetry

io.quarkus.it.opentelemetry.LoggingResourceTest.testException - History

  • Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes. - org.awaitility.core.ConditionTimeoutException
Details
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at io.quarkus.it.opentelemetry.LoggingResourceTest.testException(LoggingResourceTest.java:113)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)

⚙️ JVM Integration Tests - JDK 21

📦 integration-tests/opentelemetry

io.quarkus.it.opentelemetry.LoggingResourceTest.testException - History

  • Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes. - org.awaitility.core.ConditionTimeoutException
Details
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at io.quarkus.it.opentelemetry.LoggingResourceTest.testException(LoggingResourceTest.java:113)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)

@phillip-kruger phillip-kruger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM ! Thanks

@phillip-kruger
phillip-kruger merged commit 3e365d6 into quarkusio:main Jun 16, 2025
@quarkus-bot quarkus-bot Bot added this to the 3.25 - main milestone Jun 16, 2025
@michalvavrik
michalvavrik deleted the feature/fix-dev-ui-access-denied-ex branch June 16, 2025 06:02
@gsmet gsmet modified the milestones: 3.25 - main, 3.24.0 Jun 18, 2025
@gsmet gsmet modified the milestones: 3.24.0, 3.23.4 Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AccessDeniedException in quarkus dev mode

3 participants