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

CRD schema object causing a panic #141

Closed
hanthor opened this issue Jul 15, 2024 · 3 comments · Fixed by #143
Closed

CRD schema object causing a panic #141

hanthor opened this issue Jul 15, 2024 · 3 comments · Fixed by #143
Assignees
Labels
impact/panic This bug represents a panic or unexpected crash kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@hanthor
Copy link

hanthor commented Jul 15, 2024

Threw a crazy long CRD at crd2pulumi and it error out like on #135 Its a 5000 line CRD from https://github.com/element-hq/ess-starter-edition-core

 panic: fatal: error An assertion has failed: could not parse Pulumi package. source error: could not import spec: <nil>: #/types/kubernetes:matrix.element.io%2Fv1alpha1:ElementDeploymentSpecComponentsSynapseConfigMedia/properties/volume/default: type pulumi:pulumi:Any cannot have a constant value; only booleans, integers, numbers and strings may have constant values; , and 3 other diagnostic(s)

 properties:
   volume:
     default:
       name: media
       size: 2048
     description: The volume holding media
     oneOf:
     - not:
         required:
         - name
       required:
       - size
     - required:
       - name
       - size
     properties:
       name:
         description: The volume name to use to store the
           media
         type: string
       size:
         anyOf:
         - type: integer
         - type: string
         description: The volume size to use to store the
           media
         pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[MGTPE])?$
         x-kubernetes-int-or-string: true
     type: object
type: object
@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Jul 15, 2024
@mjeffryes mjeffryes added p1 A bug severe enough to be the next item assigned to an engineer impact/panic This bug represents a panic or unexpected crash kind/bug Some behavior is incorrect or out of spec labels Jul 16, 2024
@blampe blampe removed the needs-triage Needs attention from the triage team label Jul 22, 2024
@blampe
Copy link
Contributor

blampe commented Jul 22, 2024

Thanks for this example @hanthor!

We're currently working on some improvements to crd2pulumi which I expect will address this. Stay tuned!

cc @rquitales

@mjeffryes mjeffryes removed the p1 A bug severe enough to be the next item assigned to an engineer label Aug 5, 2024
@cleverguy25
Copy link

Added to epic https://github.com/pulumi/home/issues/3431

@pulumi-bot
Copy link

This issue has been addressed in PR #143 and shipped in release v1.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/panic This bug represents a panic or unexpected crash kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants