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

Differences in the generated SDK between current code gen and the schema-based code gen #1072

Closed
praneetloke opened this issue Apr 15, 2020 · 1 comment
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec mro1 Monica's list of 1st tier overlay related issues resolution/fixed This issue was fixed

Comments

@praneetloke
Copy link
Contributor

praneetloke commented Apr 15, 2020

While working on the resource docs, I noted a few issues with the schema based code gen when using it to generate the type strings from the k8s Pulumi schema.

NodeJS

  • Schema code gen is not aware of the module name override available with the k8s schema unlike the Go code gen is.
  • The current code gen does not add the "Args" suffix to the type name of the args property for a resource, whereas the schema-based code gen will add that to all input types.
    • Additionally, the schema code gen seems will create the args type in the high-level module namespace and not in the "types" namespace.
    • For example, note the path for the s3 module's BucketArgs for nodejs. And here's the input args type for ControllerRevision in k8s.

C#

  • The Namespaces override map uses the normalized k8s module names rather than the actual module names as the key in the map. This makes it so that every lookup in the map using the raw module name will be a miss.
  • The namespace path for every type is currently Pulumi.Kubernetes.Types.Inputs.<ModuleName>.<PropertyType> (and Types.Outputs for output types) whereas the schema code gen will generate
    Pulumi.Kubernetes.<ModuleName>.Inputs.<PropertyType>. Note the placement of the input/output qualifier in the namespace path.

Overlays

This is sort of a duplication of what I mentioned above under the NodeJS heading. But this one is a problem in both NodeJS, as well as C#.

The input type for the overlay resource is in the same namespace as the resource, which is actually correct, however, the type name does not follow the naming convention used by non-overlay resource input types. Specifically, these input types don't have the suffix "Args". For example, the input param for the Chart resource is ChartOpts or LocalChartOpts, instead of ChartArgs.

@mnlumi mnlumi added the mro1 Monica's list of 1st tier overlay related issues label Mar 28, 2023
@lblackstone lblackstone removed their assignment Jul 14, 2023
@lblackstone lblackstone added the kind/bug Some behavior is incorrect or out of spec label Jul 14, 2023
@EronWright EronWright added the resolution/fixed This issue was fixed label Jun 17, 2024
@EronWright EronWright self-assigned this Jun 17, 2024
@EronWright
Copy link
Contributor

I believe all issues have been addressed, or are obsolete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec mro1 Monica's list of 1st tier overlay related issues resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

4 participants