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

Oracle Provider Generates Invalid Classes #290

Closed
skorfmann opened this issue Aug 6, 2020 · 1 comment · Fixed by #341
Closed

Oracle Provider Generates Invalid Classes #290

skorfmann opened this issue Aug 6, 2020 · 1 comment · Fixed by #341
Labels
bug Something isn't working providers

Comments

@skorfmann
Copy link
Contributor

skorfmann commented Aug 6, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

cdktf & Language Versions

Affected Resource(s)

  • Oracle Provider
    • containerengine-node-pool.ts
    • data-oci-containerengine-node-pool.ts

Debug Output

imports/providers/oci/containerengine-node-pool.ts:451:14 - error TS2416: Property 'nodeMetadata' in type 'ContainerengineNodePool' is not assignable to the same property in base type 'TerraformResource'.
  Type '{ [key: string]: string; } | undefined' is not assignable to type '{ [key: string]: any; }'.
    Type 'undefined' is not assignable to type '{ [key: string]: any; }'.

451   public get nodeMetadata(): { [key: string]: string } | undefined {
                 ~~~~~~~~~~~~


imports/providers/oci/containerengine-node-pool.ts:454:14 - error TS2416: Property 'nodeMetadata' in type 'ContainerengineNodePool' is not assignable to the same property in base type 'TerraformResource'.
  Type '{ [key: string]: string; } | undefined' is not assignable to type '{ [key: string]: any; }'.
    Type 'undefined' is not assignable to type '{ [key: string]: any; }'.

454   public set nodeMetadata(value: { [key: string]: string } | undefined) {
                 ~~~~~~~~~~~~


imports/providers/oci/data-oci-containerengine-node-pool.ts:388:10 - error TS2426: Class 'TerraformDataSource' defines instance member accessor 'nodeMetadata', but extended class 'DataOciContainerengineNodePool' defines it as instance member function.

388   public nodeMetadata(key: string): string {
             ~~~~~~~~~~~~


main.ts:3:23 - error TS6133: 'CoreDedicatedVmHost' is declared but its value is never read.

3 import { OciProvider, CoreDedicatedVmHost } from './imports/providers/oci'
                        ~~~~~~~~~~~~~~~~~~~



Found 4 errors.


non-zero exit code 1

Expected Behavior

It should compile

Actual Behavior

The typescript types are invalid an therefore aren't compiling

Steps to Reproduce

Generate oci provider bindings and compile - See here for a ready to go example: https://github.com/skorfmann/cdktf-oracle-example

@skorfmann skorfmann added bug Something isn't working providers labels Aug 6, 2020
skorfmann added a commit that referenced this issue Aug 24, 2020
There's a function in the Oracle provider which is named `nodeMetadata`. This conflicts
with function in cdktf base classes.

Hence, this PR aligins the naming with the change from `node` to `constructNode` (see #230)

Fixes #290
@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2022

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working providers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant