-
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
aws-native:datazone:DataSource: Create Datasource fails with "2 subschemas matched instead of one" #1846
Labels
Comments
MeTimesThree
added
kind/bug
Some behavior is incorrect or out of spec
needs-triage
Needs attention from the triage team
labels
Nov 22, 2024
Thank you for an excellent repro, this is indeed a bug in the provider. I have narrowed it down to this spot:
The type of "configuration" is a union of possibilities and this code incorrectly selects option 1 instead of option 2. |
I filed #1849 for the root cause. |
t0yv0
added a commit
that referenced
this issue
Nov 25, 2024
This change fixes the conversion of Pulumi input properties to the format expected by the CloudControl API in the case when Pulumi schema specifies a union type (OneOf) without a discriminator. Previously the first matching case would be picked which could erroneously send empty data to CloudControl. With this change a heuristic is run instead to pick the non-error case with the largest map or array. In the long term it would be better to support discriminators and manage their metadata (#1849). Fixes #1846
t0yv0
added a commit
that referenced
this issue
Nov 25, 2024
This change fixes the conversion of Pulumi input properties to the format expected by the CloudControl API in the case when Pulumi schema specifies a union type (OneOf) without a discriminator. Previously the first matching case would be picked which could erroneously send empty data to CloudControl. With this change a heuristic is run instead to pick the non-error case with the largest map or array. In the long term it would be better to support discriminators and manage their metadata (#1849). Fixes #1846
t0yv0
added a commit
that referenced
this issue
Nov 25, 2024
This change fixes the conversion of Pulumi input properties to the format expected by the CloudControl API in the case when Pulumi schema specifies a union type (OneOf) without a discriminator. Previously the first matching case would be picked which could erroneously send empty data to CloudControl. With this change a heuristic is run instead to pick the non-error case with the largest map or array. In the long term it would be better to support discriminators and manage their metadata (#1849). Fixes #1846
t0yv0
added a commit
that referenced
this issue
Nov 25, 2024
This change fixes the conversion of Pulumi input properties to the format expected by the CloudControl API in the case when Pulumi schema specifies a union type (OneOf) without a discriminator. Previously the first matching case would be picked which could erroneously send empty data to CloudControl. With this change a heuristic is run instead to pick the non-error case with the largest map or array. In the long term it would be better to support discriminators and manage their metadata (#1849). Fixes #1846
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
What happened?
We receive a strange error when trying to create a new Datazone-DataSource.
We see:
ValidationException: Model validation failed (#/Configuration: #: 2 subschemas matched instead of one
In the debug-log we see a succesful Unmarshaling:
I1122 12:56:31.903150 32148 rpc.go:292] Unmarshaling property for RPC[aws-native.Create(urn:pulumi:datenkatalog::datenkatalog::aws-native:datazone:DataSource::kk_source_redshift-poc-dp).properties]: configuration={map[redshiftRunConfiguration:{map[dataAccessRole:{arn:aws:iam::381492292231:role/datazone-redshift-manage-access-role-poc-dpServRole} redshiftCredentialConfiguration:{map[secretManagerArn:{arn:aws:secretsmanager:eu-central-1:381492292231:secret:kk_redshift_credentials202411212-poc-dp-StKPm2}]} redshiftStorage:{map[redshiftClusterSource:{map[clusterName:{redshift-poc-dp}]}]} relationalFilterConfigurations:{[{map[databaseName:{dwh_poc_db} filterExpressions:{[{map[expression:{*} type:{INCLUDE}]}]} schemaName:{public}]}]}]}]}
But then a DesiredState with a seemingly empty configuration appears in the log:
{"ClientToken":"fb7c17f6-ccc3-4b39-8bb7-c2f67e920ebb","DesiredState":"{\"Configuration\":{},\"Description\":\"KK DataSource des PoC\",\"DomainIdentifier\":\"dzd_arcll8lb4xk7bf\",\"EnvironmentIdentifier\":\"boyub3bhivj4ln\",\"Name\":\"kk_source_redshift-poc-dp\",\"ProjectIdentifier\":\"4bdmaeh6uinsej\",\"PublishOnImport\":true,\"Recommendation\":{\"EnableBusinessNameGeneration\":false},\"Type\":\"REDSHIFT\"}","TypeName":"AWS::DataZone::DataSource"}
Example
This is the Pulumi-main that fails: Pulumi-Main
It needs the following dependency: SftSecurityGroup
The CLI works fine with the following commands: AWS CLI Call
Output of
pulumi about
Additional context
No response
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: