Closed t0yv0 closed 1 month ago
javagen version is behind, v0.9.8 vs 0.16.1, we need to automate having this up-to-date, likely fixing the issue here.
rolearn
is required for aws.eks.Cluster
(that's the CR, not the component). The error is about that. See: https://www.pulumi.com/registry/packages/aws/api-docs/eks/cluster/#rolearn_java
You are right! Trying this:
package myproject;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.Bucket;
import com.pulumi.eks.Cluster;
public class App {
public static void main(String[] args) {
Pulumi.run(ctx -> {
new Cluster("my-cluster");
});
}
}
This looks better.
Panics though.
Please choose a stack, or create a new one: dev
Previewing update (dev)
View in Browser (Ctrl+O): https://app.pulumi.com/anton-pulumi-corp/java-test/dev/previews/7d89ba14-585a-4384-b0f6-139ef0fdefe7
Type Name Plan Info
+ pulumi:pulumi:Stack java-test-dev create 2 errors; 21 messages
+ ββ eks:index:Cluster my-cluster create
+ ββ eks:index:ServiceRole my-cluster-instanceRole create
+ β ββ aws:iam:Role my-cluster-instanceRole-role create
+ β ββ aws:iam:RolePolicyAttachment my-cluster-instanceRole-3eb088f2 create
+ β ββ aws:iam:RolePolicyAttachment my-cluster-instanceRole-03516f97 create
+ β ββ aws:iam:RolePolicyAttachment my-cluster-instanceRole-e1b295bd create
+ ββ eks:index:ServiceRole my-cluster-eksRole create
+ β ββ aws:iam:Role my-cluster-eksRole-role create
+ β ββ aws:iam:RolePolicyAttachment my-cluster-eksRole-4b490823 create
+ ββ aws:iam:InstanceProfile my-cluster-instanceProfile create
+ ββ aws:ec2:SecurityGroup my-cluster-eksClusterSecurityGroup create
+ ββ aws:ec2:SecurityGroupRule my-cluster-eksClusterInternetEgressRule create
+ ββ aws:eks:Cluster my-cluster-eksCluster create
+ ββ aws:ec2:SecurityGroup my-cluster-nodeSecurityGroup create
+ ββ aws:eks:Addon my-cluster-coredns create
+ ββ aws:eks:Addon my-cluster-kube-proxy create
+ ββ aws:ec2:SecurityGroupRule my-cluster-eksExtApiServerClusterIngressRule create
+ ββ aws:ec2:SecurityGroupRule my-cluster-eksNodeInternetEgressRule create
+ ββ pulumi:providers:kubernetes my-cluster-eks-k8s create
+ ββ aws:ec2:SecurityGroupRule my-cluster-eksNodeIngressRule create
+ ββ eks:index:VpcCniAddon my-cluster-vpc-cni create
+ β ββ aws:eks:Addon my-cluster-vpc-cni create
+ ββ aws:ec2:SecurityGroupRule my-cluster-eksNodeClusterIngressRule create
+ ββ aws:autoscaling:Group my-cluster create
+ ββ aws:ec2:SecurityGroupRule my-cluster-eksClusterIngressRule create
+ ββ kubernetes:core/v1:ConfigMap my-cluster-nodeAccess create
+ ββ aws:ec2:LaunchTemplate my-cluster-launchTemplate create
Diagnostics:
pulumi:pulumi:Stack (java-test-dev):
error: Running program [PID: 11864](/nix/store/y033py0gyjxdvxxhplhyl29s15asp7xc-zulu19.32.13-ca-jdk-19.0.2/bin/java -classpath /nix/store/fg7sva8pccx1zqy63djh4md5qawfqj5l-apache-maven-3.9.5/maven/boot/plexus-classworlds-2.7.0.jar -Dclassworlds.conf=/nix/store/fg7sva8pccx1zqy63djh4md5qawfqj5l-apache-maven-3.9.5/maven/bin/m2.conf -Dmaven.home=/nix/store/fg7sva8pccx1zqy63djh4md5qawfqj5l-apache-maven-3.9.5/maven -Dlibrary.jansi.path=/nix/store/fg7sva8pccx1zqy63djh4md5qawfqj5l-apache-maven-3.9.5/maven/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/Users/anton/Library/Mobile Documents/com~apple~CloudDocs/pulumi-bugs/test-eks-alpha/java-test org.codehaus.plexus.classworlds.launcher.Launcher -Dorg.slf4j.simpleLogger.defaultLogLevel=warn --no-transfer-progress compile exec:java) failed with an unhandled exception:
java.lang.UnsupportedOperationException: Convert [com.pulumi.eks.Cluster.defaultNodeGroup]: Error converting 'com.google.common.collect.RegularImmutableMap' to 'TypeShape{type=class com.pulumi.eks.outputs.NodeGroupData, parameters=[]}'. Expected type 'com.pulumi.eks.outputs.NodeGroupData' (annotated with 'com.pulumi.core.annotations.CustomType') to have a setter annotated with @com.pulumi.core.annotations.CustomType$Setter("autoScalingGroup"), got: autoScalingGroupName,nodeSecurityGroup,extraNodeSecurityGroups
at com.pulumi.serialization.internal.Converter.convertObjectUntyped(Converter.java:119)
at com.pulumi.serialization.internal.Converter.convertValue(Converter.java:86)
at com.pulumi.core.internal.OutputCompletionSource.setValue(OutputCompletionSource.java:95)
at com.pulumi.deployment.internal.DeploymentImpl$ReadOrRegisterResourceInternal.lambda$completeResourceAsync$1(DeploymentImpl.java:1258)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1311)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1841)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1806)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: java.lang.IllegalArgumentException: Expected type 'com.pulumi.eks.outputs.NodeGroupData' (annotated with 'com.pulumi.core.annotations.CustomType') to have a setter annotated with @com.pulumi.core.annotations.CustomType$Setter("autoScalingGroup"), got: autoScalingGroupName,nodeSecurityGroup,extraNodeSecurityGroups
at com.pulumi.serialization.internal.Converter.lambda$tryConvertObjectInner$7(Converter.java:401)
at java.base/java.util.HashMap.forEach(HashMap.java:1429)
at com.pulumi.serialization.internal.Converter.tryConvertObjectInner(Converter.java:399)
at com.pulumi.serialization.internal.Converter.convertObjectUntyped(Converter.java:115)
... 10 more
error: an unhandled error occurred: '/Users/anton/bin/mvn /Users/anton/bin/mvn -Dorg.slf4j.simpleLogger.defaultLogLevel=warn --no-transfer-progress compile exec:java' exited with non-zero exit code: 32
Sep 27, 2024 3:29:35 PM com.pulumi.deployment.internal.DeploymentImpl$DefaultEngineLogger errorAsync
SEVERE: Running program [PID: 11864](/nix/store/y033py0gyjxdvxxhplhyl29s15asp7xc-zulu19.32.13-ca-jdk-19.0.2/bin/java -classpath /nix/store/fg7sva8pccx1zqy63djh4md5qawfqj5l-apache-maven-3.9.5/maven/boot/plexus-classworlds-2.7.0.jar -Dclassworlds.conf=/nix/store/fg7sva8pccx1zqy63djh4md5qawfqj5l-apache-maven-3.9.5/maven/bin/m2.conf -Dmaven.home=/nix/store/fg7sva8pccx1zqy63djh4md5qawfqj5l-apache-maven-3.9.5/maven -Dlibrary.jansi.path=/nix/store/fg7sva8pccx1zqy63djh4md5qawfqj5l-apache-maven-3.9.5/maven/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/Users/anton/Library/Mobile Documents/com~apple~CloudDocs/pulumi-bugs/test-eks-alpha/java-test org.codehaus.plexus.classworlds.launcher.Launcher -Dorg.slf4j.simpleLogger.defaultLogLevel=warn --no-transfer-progress compile exec:java) failed with an unhandled exception:
java.lang.UnsupportedOperationException: Convert [com.pulumi.eks.Cluster.defaultNodeGroup]: Error converting 'com.google.common.collect.RegularImmutableMap' to 'TypeShape{type=class com.pulumi.eks.outputs.NodeGroupData, parameters=[]}'. Expected type 'com.pulumi.eks.outputs.NodeGroupData' (annotated with 'com.pulumi.core.annotations.CustomType') to have a setter annotated with @com.pulumi.core.annotations.CustomType$Setter("autoScalingGroup"), got: autoScalingGroupName,nodeSecurityGroup,extraNodeSecurityGroups
at com.pulumi.serialization.internal.Converter.convertObjectUntyped(Converter.java:119)
at com.pulumi.serialization.internal.Converter.convertValue(Converter.java:86)
at com.pulumi.core.internal.OutputCompletionSource.setValue(OutputCompletionSource.java:95)
at com.pulumi.deployment.internal.DeploymentImpl$ReadOrRegisterResourceInternal.lambda$completeResourceAsync$1(DeploymentImpl.java:1258)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1311)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1841)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1806)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: java.lang.IllegalArgumentException: Expected type 'com.pulumi.eks.outputs.NodeGroupData' (annotated with 'com.pulumi.core.annotations.CustomType') to have a setter annotated with @com.pulumi.core.annotations.CustomType$Setter("autoScalingGroup"), got: autoScalingGroupName,nodeSecurityGroup,extraNodeSecurityGroups
at com.pulumi.serialization.internal.Converter.lambda$tryConvertObjectInner$7(Converter.java:401)
at java.base/java.util.HashMap.forEach(HashMap.java:1429)
at com.pulumi.serialization.internal.Converter.tryConvertObjectInner(Converter.java:399)
at com.pulumi.serialization.internal.Converter.convertObjectUntyped(Converter.java:115)
... 10 more
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
I'd update Java before we investigate further.
Fixed it with Fix output of default node group referring to autoscalingGroupName #1410. Release is currently running
What happened?
Getting this problem on pulumi up on the 3.x testing:
With the latest alpha:
This is unexpected, ClusterArgs does not even have roleArn. Wondering if something in Java SDK generation is going awry here.
Example
Output of
pulumi about
N/A
Additional context
No response
Contributing
Vote on this issue by adding a π reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).