Program hangs indefinitely if provider is specified before Pulumi dependency in pom.xml
Open
Nobody has claimed this yet.
impact/usability
kind/bug
- Dominant language
- Java
- Stars
- 85
- Forks
- 26
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 22
Description
The following Pulumi program hangs indefinitely on my machine:
package myproject;
import com.pulumi.Pulumi;
import com.pulumi.azurenative.resources.ResourceGroup;
import com.pulumi.azurenative.storage.StorageAccount;
import com.pulumi.azurenative.storage.StorageAccountArgs;
import com.pulumi.azurenative.storage.inputs.SkuArgs;
import com.pulumi.azurenative.storage.enums.Kind;
import com.pulumi.azurenative.storage.enums.SkuName;
import com.pulumi.azurenative.storage.StorageAccountStaticWebsite;
import com.pulumi.azurenative.storage.StorageAccountStaticWebsiteArgs;
import com.pulumi.azurenative.storage.Blob;
import com.pulumi.azurenative.storage.BlobArgs;
import com.pulumi.asset.FileAsset;
public class App {
public static void main(String[] args) {
Pulumi.run(ctx -> {
var resourceGroup = new ResourceGroup("app");
var storageAccount = new StorageAccount("app", StorageAccountArgs.builder()
.enableHttpsTrafficOnly(true)
.kind(Kind.StorageV2)
.resourceGroupName(resourceGroup.name())
.sku(SkuArgs.builder()
.name(SkuName.Standard_LRS)
.build())
.build());
var staticWebsite = new StorageAccountStaticWebsite("app",
StorageAccountStaticWebsiteArgs.builder()
.accountName(storageAccount.name())
.resourceGroupName(resourceGroup.name())
.indexDocument("index.html")
.error404Document("404.html")
.build());
var files = new String[] { "index.html", "404.html" };
for (var file : files) {
new Blob(file, BlobArgs.builder()
.resourceGroupName(resourceGroup.name())
.accountName(storageAccount.name())
.containerName(staticWebsite.containerName())
.source(new FileAsset("../wwwroot/" + file))
.contentType("text/html")
.build());
}
});
}
}
pulumi up --logtostderr --logflow -v=9 2> out.txt output (I let it go until it stopped producing additional logged output, then hit ctrl-c):
I0817 11:26:42.752665 99357 backend.go:420] found username for access token
I0817 11:26:43.130145 99357 util.go:564] errors detecting git metadata: 2 errors occurred:
* detecting Git remote URL: could not read origin information: remote not found
* getting repository HEAD: reference not found
I0817 11:26:43.223308 99357 backend.go:420] found username for access token
I0817 11:26:43.325765 99357 ignore.go:44] Explicitly ignoring and discarding error: could not read origin information: remote not found
I0817 11:26:43.431518 99357 backend.go:420] found username for access token
I0817 11:26:43.431098 99357 backend.go:974] Stack dev being updated to version 2
I0817 11:26:43.616713 99357 update.go:190] *** Starting Update(preview=true) ***
I0817 11:26:43.617134 99357 plugins.go:120] gatherPluginsFromProgram(): gathering plugins from language host
I0817 11:26:43.618085 99357 plugins.go:1439] GetPluginPath(language, java, <nil>): found on $PATH /opt/homebrew/bin/pulumi-language-java
I0817 11:26:43.618207 99357 plugin.go:184] Launching plugin 'java' from '/opt/homebrew/bin/pulumi-language-java' with args: -root=/Users/jkodroff/tmp/my-first-azure-app,127.0.0.1:62180
I0817 11:26:43.689755 99357 langruntime_plugin.go:202] langhost[java].GetPluginInfo() executing
I0817 11:26:43.691128 99357 langruntime_plugin.go:111] langhost[java].GetRequiredPlugins(proj=my-first-azure-app,pwd=/Users/jkodroff/tmp/my-first-azure-app,program=.) executing
I0817 11:26:43.691472 99357 eventsink.go:78] eventSink::Infoerr(<{%reset%}>I0817 11:26:43.691456 99358 main.go:150] GetRequiredPlugins: program=.
<{%reset%}>)
I0817 11:26:43.691515 99357 eventsink.go:78] eventSink::Infoerr(<{%reset%}>I0817 11:26:43.691463 99358 main.go:188] GetRequiredPlugins: Determining Pulumi plugins
<{%reset%}>)
I0817 11:26:43.691558 99357 eventsink.go:78] eventSink::Infoerr(<{%reset%}>I0817 11:26:43.691550 99358 main.go:228] Language host launching process: /opt/homebrew/bin/mvn -Dorg.slf4j.simpleLogger.logFile=System.err --no-transfer-progress compile exec:java -DmainClass=com.pulumi.bootstrap.internal.Main -DmainArgs=packages
<{%reset%}>)
I0817 11:26:45.375849 99357 eventsink.go:78] eventSink::Infoerr(<{%reset%}>I0817 11:26:45.375758 99358 main.go:257] '/opt/homebrew/bin/mvn -Dorg.slf4j.simpleLogger.logFile=System.err --no-transfer-progress compile exec:java -DmainClass=com.pulumi.bootstrap.internal.Main -DmainArgs=packages' completed successfully
<{%reset%}>)
I0817 11:26:45.375913 99357 eventsink.go:78] eventSink::Infoerr(<{%reset%}>I0817 11:26:45.375795 99358 main.go:206] GetRequiredPlugins: bootstrap raw output=[{"resource":true,"name":"azure-native","version":"1.64.0"}]
<{%reset%}>)
I0817 11:26:45.375951 99357 eventsink.go:78] eventSink::Infoerr(<{%reset%}>I0817 11:26:45.375876 99358 main.go:163] GetRequiredPlugins: Determining plugin dependency: azure-native, 1.64.0
<{%reset%}>)
I0817 11:26:45.376600 99357 eventsink.go:78] eventSink::Infoerr(<{%reset%}>I0817 11:26:45.375883 99358 main.go:180] GetRequiredPlugins: plugins=[name:"azure-native" kind:"resource" version:"1.64.0"]
<{%reset%}>)
I0817 11:26:45.377460 99357 langruntime_plugin.go:153] langhost[java].GetRequiredPlugins(proj=my-first-azure-app,pwd=/Users/jkodroff/tmp/my-first-azure-app,program=.) success: #versions=1
I0817 11:26:45.377475 99357 plugins.go:132] gatherPluginsFromProgram(): plugin java <nil> () is required by language host
I0817 11:26:45.377496 99357 plugins.go:132] gatherPluginsFromProgram(): plugin azure-native 1.64.0 () is required by language host
I0817 11:26:45.377695 99357 plugins.go:144] gatherPluginsFromSnapshot(): gathering plugins from snapshot
I0817 11:26:45.377723 99357 plugins.go:181] ensurePluginsAreInstalled(): beginning
I0817 11:26:45.377794 99357 plugins.go:1439] GetPluginPath(language, java, <nil>): found on $PATH /opt/homebrew/bin/pulumi-language-java
I0817 11:26:45.377809 99357 plugins.go:186] ensurePluginsAreInstalled(): plugin java <nil> already installed
I0817 11:26:45.378762 99357 plugins.go:1486] GetPluginPath(resource, azure-native, 1.64.0): enabling new plugin behavior
I0817 11:26:45.379029 99357 plugins.go:1570] SelectCompatiblePlugin(..., azure-native): beginning
I0817 11:26:45.379046 99357 plugins.go:1599] SelectCompatiblePlugin(..., azure-native): best plugin azure-native-1.64.0: semver match
I0817 11:26:45.379052 99357 plugins.go:1612] SelectCompatiblePlugin(..., azure-native): selecting plugin 'azure-native-1.64.0': best match
I0817 11:26:45.379080 99357 plugins.go:1529] GetPluginPath(resource, azure-native, 1.64.0): found in cache at /Users/jkodroff/.pulumi/plugins/resource-azure-native-v1.64.0/pulumi-resource-azure-native
I0817 11:26:45.379087 99357 plugins.go:186] ensurePluginsAreInstalled(): plugin azure-native 1.64.0 already installed
I0817 11:26:45.379092 99357 plugins.go:201] ensurePluginsAreInstalled(): completed
I0817 11:26:45.379120 99357 plugins.go:310] computeDefaultProviderPlugins(): considering java
I0817 11:26:45.379131 99357 plugins.go:313] computeDefaultProviderPlugins(): skipping java, not a resource provider
I0817 11:26:45.379137 99357 plugins.go:310] computeDefaultProviderPlugins(): considering azure-native-1.64.0
I0817 11:26:45.379147 99357 plugins.go:341] computeDefaultProviderPlugins(): plugin azure-native-1.64.0 selected for package azure-native (first seen)
I0817 11:26:45.379154 99357 plugins.go:347] computeDefaultProviderPlugins(): summary of default plugins:
I0817 11:26:45.379161 99357 plugins.go:349] azure-native = 1.64.0
I0817 11:26:45.380123 99357 step_generator.go:1143] stepGenerator.GeneratePendingDeletes(): scanning previous snapshot for pending deletes
I0817 11:26:45.380158 99357 deployment_executor.go:475] deploymentExecutor.retirePendingDeletes(...): no pending deletions
I0817 11:26:45.380196 99357 deployment_executor.go:256] deploymentExecutor.Execute(...): waiting for incoming events
I0817 11:26:45.380226 99357 step_executor.go:389] StepExecutor worker(-2): worker coming online
I0817 11:26:45.380234 99357 step_executor.go:389] StepExecutor worker(-2): worker waiting for incoming chains
I0817 11:26:45.380438 99357 langruntime_plugin.go:163] langhost[java].Run(pwd=/Users/jkodroff/tmp/my-first-azure-app,program=.,#args=0,proj=my-first-azure-app,stack=dev,#config=0,dryrun=true) executing
I0817 11:26:45.381286 99357 eventsink.go:78] eventSink::Infoerr(<{%reset%}>I0817 11:26:45.381235 99358 main.go:265] Run: program=.
<{%reset%}>)
I0817 11:26:45.381362 99357 eventsink.go:78] eventSink::Infoerr(<{%reset%}>I0817 11:26:45.381248 99358 main.go:289] Language host launching process: /opt/homebrew/bin/mvn -Dorg.slf4j.simpleLogger.defaultLogLevel=warn --no-transfer-progress compile exec:java
<{%reset%}>)
I0817 11:27:51.643958 99357 deployment_executor.go:156] deploymentExecutor.Execute(...): signalling cancellation to providers...
I0817 11:27:51.644279 99357 step_executor.go:389] StepExecutor worker(-2): worker exiting due to cancellation
I0817 11:27:51.643949 99357 deployment_executor.go:294] deploymentExecutor.Execute(...): context finished: context canceled
I0817 11:27:51.644786 99357 step_executor.go:389] StepExecutor worker(-1): StepExecutor.waitForCompletion(): waiting for worker threads to exit
I0817 11:27:51.648287 99357 step_executor.go:389] StepExecutor worker(-1): StepExecutor.waitForCompletion(): worker threads all exited
I0817 11:27:51.648345 99357 deployment_executor.go:304] deploymentExecutor.Execute(...): step executor has completed
I0817 11:27:51.649306 99357 eventsink.go:86] eventSink::Error(<{%reset%}>preview canceled<{%reset%}>)
I0817 11:27:51.653549 99357 langruntime_plugin.go:188] langhost[java].Run(pwd=/Users/jkodroff/tmp/my-first-azure-app,program=.,...,dryrun=true) failed: err=error reading from server: read tcp 127.0.0.1:62183->127.0.0.1:62181: use of closed network connection
I0817 11:27:51.654671 99357 ignore.go:44] Explicitly ignoring and discarding error: rpc error: code = Canceled desc = grpc: the client connection is closing
I0817 11:27:51.654931 99357 ignore.go:44] Explicitly ignoring and discarding error: 1 error occurred:
* operation not permitted
I0817 11:27:51.655780 99357 source_eval.go:187] EvalSourceIterator ended with an error: error reading from server: read tcp 127.0.0.1:62183->127.0.0.1:62181: use of closed network connection
I0817 11:27:51.656012 99357 deployment_executor.go:241] deploymentExecutor.Execute(...): incoming events goroutine exiting
I0817 11:27:51.672432 99357 update.go:193] *** Update(preview=true) complete ***
pulumi about output:
➜ my-first-azure-app git:(main) ✗ pulumi about
CLI
Version 3.38.0
Go Version go1.19
Go Compiler gc
Plugins
NAME VERSION
azure-native 1.64.0
java unknown
Host
OS darwin
Version 12.5
Arch arm64
This project is written in java: executable='/usr/bin/java' version='openjdk 18.0.1 2022-04-19
OpenJDK Runtime Environment Homebrew (build 18.0.1+0)
OpenJDK 64-Bit Server VM Homebrew (build 18.0.1+0, mixed mode, sharing)' maven='Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)' gradle='7.4.2' java='/usr/bin/java' javac='18.0.1'
Current Stack: dev
Found no resources associated with dev
Found no pending operations associated with dev
Backend
Name pulumi.com
URL https://app.pulumi.com/jkodroff
User jkodroff
Organizations jkodroff, pulumi
No dependencies found
Pulumi locates its logs in /var/folders/5m/4n1x3f8151s35wc80w06z5k80000gn/T/ by default
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the project’s pom.xml and the Java language host path exercised by pulumi up; reproduce the hang with the provider dependency listed before the Pulumi dependency and compare the dependency order. Done means the sample program completes instead of hanging in the Maven launch, while preserving the reported plugin discovery behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100