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

IDE freezes (until timeout) if you set MIRRORD_IMPERSONATED_TARGET env var in a java project with an invalid config. #182

Open
meowjesty opened this issue Oct 17, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@meowjesty
Copy link
Member

Bug Description

Long title, but that's what happens. If you set MIRRORD_IMPERSONATED_TARGET in the launcher options thingy for a java project, and the mirrord.json config file contains an error (missing comma is enough to trigger), then the IDE freezes until the timeout of 2 minutes is reached.

try {
env.get(2, TimeUnit.MINUTES)
} catch (e: ExecutionException) {
throw e.cause ?: e
} catch (e: CancellationException) {
throw ProcessCanceledException(e)
} catch (e: TimeoutException) {
process.destroy()
MirrordLogger.logger.error("mirrord task `${commandLine.commandLineString} timed out", e)
throw MirrordError("mirrord process timed out")
}

It only happens in java projects, but I'm not sure if it happens in different JVM projects, like kotlin samples, or even in different java project settings (my sample uses gradle, but don't know if maven also triggers it).

Steps to Reproduce

  1. Create a java project in Intellij Idea (I'm using the Community version);
  2. Set up mirrord config with a target (java projects can't show the selection dialog for it), and a typo somewhere (add an extra comma, or remove one);
  3. Go into the launcher settings, and add MIRRORD_IMPERSONATED_TARGET={some-pod};

Backtrace

No response

Relevant Logs

No response

Your operating system and version

linux

Local process

intellij with java "hello, world" sample

Local process version

No response

Additional Info

No response

@meowjesty meowjesty added the bug Something isn't working label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant