-
Notifications
You must be signed in to change notification settings - Fork 16
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
PANIC
generated into public-facing documentation
#1341
Comments
Since the page https://www.pulumi.com/registry/packages/random/api-docs/randominteger/ does not have this problem yet, this must be a new issue generated by the converter rollout. |
@t0yv0 I've been investigating this issue. I am using the following:
Running import pulumi
import pulumi_aws as aws
import pulumi_random as random
priority = random.RandomInteger("priority",
min=1,
max=50000,
keepers={
"listener_arn": listener_arn,
})
main = aws.alb.ListenerRule("main",
listener_arn=priority.keepers["listenerArn"],
priority=priority.result,
actions=[aws.alb.ListenerRuleActionArgs(
type="forward",
target_group_arn=target_group_arn,
)]) Notice the subtle difference in The specific java issue is that when it tries load the schema type of an object and it can't find it, it panics. That means program-gen here needs to be more resilient with these cases. That said, when we do have access to the schema of
Gives: package generated_program;
// imports ...
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var priority = new RandomInteger("priority", RandomIntegerArgs.builder()
.min(1)
.max(50000)
.keepers(Map.of("listener_arn", listenerArn))
.build());
var main = new ListenerRule("main", ListenerRuleArgs.builder()
.listenerArn(priority.keepers().applyValue(keepers -> keepers.listenerArn()))
.priority(priority.result())
.actions(ListenerRuleActionArgs.builder()
.type("forward")
.targetGroupArn(targetGroupArn)
.build())
.build());
}
} |
That's a brilliant suggestion, let me go ahead and do a pass at fixing this in pulumi-random.
We do try to run with disabled plugin acquisition indeed as much as possible. QQ: is there a chance we can make a switch to fail hard and fast when a schema for something is not available, or perhaps not listed in a config file ? In this provider build scenario, we would very much rather have that, so that'd guide us quickly in the direction of pinning and making available all the required dependencies. |
Similar issue in pulumi/pulumi-aws#3125 - still a problem, I reopened it; checking up on it as well. |
Random provider is unblocked, good news. Still struggling with completely closing out the issues in AWS, I opened a few more tickets with concrete examples. |
You can close this one as no-repro (once the AWS dependency in random is updated to 6.x). |
FWIW since we updated the dependencies in Random it no longer reproduces. |
I'm going to go ahead and close this as fixed by #1357 (and no longer repos anyway given updating the deps in Random). |
What happened?
Currently as spotted by @VenelinMartinov RandomInteger docs generate a PANIC into Java code, where other languages work fine. This is using
pulumi convert
to perform the translation.Example
Getting this rendered:
Python translation:
Output of
pulumi about
N/A
Additional context
N/A
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).
The text was updated successfully, but these errors were encountered: