You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used crd2pulumi for type generation from victoria-metrics-operator.
After generation I'm unable to use any custom kind because of gazillion errors like:
TSError: ⨯ Unable to compile TypeScript:
components/apps/crds/victoriametrics-operator/types/input.ts(6036,13): error TS1131: Property or signature expected.
components/apps/crds/victoriametrics-operator/types/input.ts(6036,14): error TS1109: Expression expected.
components/apps/crds/victoriametrics-operator/types/input.ts(6036,15): error TS1109: Expression expected.
components/apps/crds/victoriametrics-operator/types/input.ts(6041,27): error TS1109: Expression expected.
components/apps/crds/victoriametrics-operator/types/input.ts(6046,33): error TS1109: Expression expected.
components/apps/crds/victoriametrics-operator/types/input.ts(6051,23): error TS1109: Expression expected.
components/apps/crds/victoriametrics-operator/types/input.ts(6055,19): error TS1109: Expression expected.
components/apps/crds/victoriametrics-operator/types/input.ts(6060,28): error TS1109: Expression expected.
components/apps/crds/victoriametrics-operator/types/input.ts(26665,1): error TS1128: Declaration or statement expected.
components/apps/crds/victoriametrics-operator/types/input.ts(6036,24): error TS2339: Property 'Input' does not exist on type 'typeof import("/node_modules/@pulumi/pulumi/index")'.
components/apps/crds/victoriametrics-operator/types/input.ts(6041,13): error TS2304: Cannot find name 'inhibit_rules'.
components/apps/crds/victoriametrics-operator/types/input.ts(6041,36): error TS2339: Property 'Input' does not exist on type 'typeof import("/node_modules/@pulumi/pulumi/index")'.
components/apps/crds/victoriametrics-operator/types/input.ts(6041,79): error TS2724: '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member named 'VMAlertmanagerConfigSpecInhibitRulesArgs'. Did you mean 'VMAlertmanagerConfigSpecArgs'?
components/apps/crds/victoriametrics-operator/types/input.ts(6046,13): error TS2304: Cannot find name 'mute_time_intervals'.
components/apps/crds/victoriametrics-operator/types/input.ts(6046,42): error TS2339: Property 'Input' does not exist on type 'typeof import("/node_modules/@pulumi/pulumi/index")'.
components/apps/crds/victoriametrics-operator/types/input.ts(6046,85): error TS2694: Namespace '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member 'VMAlertmanagerConfigSpecMuteTimeIntervalsArgs'.
components/apps/crds/victoriametrics-operator/types/input.ts(6051,13): error TS2304: Cannot find name 'receivers'.
components/apps/crds/victoriametrics-operator/types/input.ts(6051,32): error TS2339: Property 'Input' does not exist on type 'typeof import("/node_modules/@pulumi/pulumi/index")'.
components/apps/crds/victoriametrics-operator/types/input.ts(6051,75): error TS2724: '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member named 'VMAlertmanagerConfigSpecReceiversArgs'. Did you mean 'VMAlertmanagerConfigSpecArgs'?
components/apps/crds/victoriametrics-operator/types/input.ts(6055,13): error TS2304: Cannot find name 'route'.
components/apps/crds/victoriametrics-operator/types/input.ts(6055,28): error TS2339: Property 'Input' does not exist on type 'typeof import("/node_modules/@pulumi/pulumi/index")'.
components/apps/crds/victoriametrics-operator/types/input.ts(6055,58): error TS2724: '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member named 'VMAlertmanagerConfigSpecRouteArgs'. Did you mean 'VMAlertmanagerConfigSpecArgs'?
components/apps/crds/victoriametrics-operator/types/input.ts(6060,13): error TS2304: Cannot find name 'time_intervals'.
components/apps/crds/victoriametrics-operator/types/input.ts(6060,37): error TS2339: Property 'Input' does not exist on type 'typeof import("/node_modules/@pulumi/pulumi/index")'.
components/apps/crds/victoriametrics-operator/types/input.ts(6060,80): error TS2724: '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member named 'VMAlertmanagerConfigSpecTimeIntervalsArgs'. Did you mean 'VMAlertmanagerConfigSpecArgs'?
components/apps/crds/victoriametrics-operator/types/input.ts(6098,79): error TS2694: Namespace '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member 'VMAlertmanagerConfigSpecMuteTimeIntervalsTimeIntervalsArgs'.
components/apps/crds/victoriametrics-operator/types/input.ts(6122,71): error TS2694: Namespace '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member 'VMAlertmanagerConfigSpecMuteTimeIntervalsTimeIntervalsTimesArgs'.
components/apps/crds/victoriametrics-operator/types/input.ts(6152,81): error TS2694: Namespace '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member 'VMAlertmanagerConfigSpecReceiversDiscordConfigsArgs'.
components/apps/crds/victoriametrics-operator/types/input.ts(6156,79): error TS2694: Namespace '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member 'VMAlertmanagerConfigSpecReceiversEmailConfigsArgs'.
components/apps/crds/victoriametrics-operator/types/input.ts(6157,81): error TS2694: Namespace '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member 'VMAlertmanagerConfigSpecReceiversMsteamsConfigsArgs'.
components/apps/crds/victoriametrics-operator/types/input.ts(6165,82): error TS2694: Namespace '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member 'VMAlertmanagerConfigSpecReceiversOpsgenieConfigsArgs'.
components/apps/crds/victoriametrics-operator/types/input.ts(6169,83): error TS2694: Namespace '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member 'VMAlertmanagerConfigSpecReceiversPagerdutyConfigsArgs'.
components/apps/crds/victoriametrics-operator/types/input.ts(6173,82): error TS2694: Namespace '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member 'VMAlertmanagerConfigSpecReceiversPushoverConfigsArgs'.
components/apps/crds/victoriametrics-operator/types/input.ts(6177,79): error TS2694: Namespace '"/components/apps/crds/victoriametrics-operator/types/input".operator.v1beta1' has no exported member 'VMAlertmanagerConfigSpecReceiversSlackConfigsArgs'.
CLI
Version 3.107.0
Go Version go1.22.0
Go Compiler gc
Plugins
NAME VERSION
cloudflare 5.27.0
command 0.9.2
gcp 7.20.0
github 6.2.0
kubernetes 4.11.0
kubernetes 4.11.0
nodejs unknown
postgresql 3.11.0
random 4.16.1
Host
OS darwin
Version 14.4.1
Arch arm64
This project is written in nodejs: executable='<REDUCTED>/.nvm/versions/node/v20.11.1/bin/node' version='v20.11.1'
Current Stack: <REDUCTED>
TYPE URN
<REDUCTED>
Found no pending operations associated with <REDUCTED>
Backend
Name MacBook-Pro.local
URL gs://<REDUCTED>
User <REDUCTED>
Organizations
Token type personal
Dependencies:
NAME VERSION
eslint-config-prettier 9.1.0
prettier 3.2.5
ts-jest 29.1.2
typescript-eslint 7.8.0
@kubernetes/client-node 0.20.0
@pulumi/postgresql 3.11.0
@pulumi/pulumi 3.114.0
dotenv 16.4.5
typescript 5.4.5
@typescript-eslint/parser 7.8.0
eslint 8.57.0
jest 29.7.0
@pulumi/gcp 7.20.0
@pulumi/github 6.2.0
@pulumi/kubernetes 4.11.0
@types/jest 29.5.12
@types/uuid 9.0.8
@google-cloud/container 5.12.0
@pulumi/cloudflare 5.27.0
@pulumi/random 4.16.1
@types/js-yaml 4.0.9
@pulumi/command 0.9.2
@types/node 18.19.31
@typescript-eslint/eslint-plugin 7.8.0
uuid 9.0.1
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:
The VictoriaMetrics CRD includes a property like this:
```yaml
properties:
'-':
type: string
```
which breaks codegen because the property name camel cases to "", and as
a result we generates a bunch of unnamed functions.
This PR modifies our logic to ignore unnamed properties like this.
We also bump pu/pu and apimachinery for good measure.
Fixes#133.
What happened?
Hi there!
I used
crd2pulumi
for type generation from victoria-metrics-operator.After generation I'm unable to use any custom kind because of gazillion errors like:
Example
crd2pulumi --nodejsName victoriametrics --nodejsPath ../victoriametrics victoria-metrics-operator.yaml
Output of
pulumi about
pulumi about
Additional context
I also get invalid ts code for kafka-operator mentioned here
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: