Repository navigation
🐛 bug(Source facebook-marketing): remove unused discriminator from spec - #41644
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
…cebook_marketing_spec
…cebook_marketing_spec
|
Cristina Mariscal (@cmm-airbyte) Baz (@bazarnov)
|
…cebook_marketing_spec
There was a problem hiding this comment.
I'm not sure I'm the right person to review this, but this seems like it would indeed get rid of the thing that's causing my issue.
I think the main thing I want to make sure of as someone who isn't super familiar with which files end up affecting the registry is - is the spec.json file in integration_tests the file that we care about? The fact that it's in integration_tests suggests no, but again I know relatively little about this area.
| "title": "Authentication", | ||
| "description": "Credentials for connecting to the Facebook Marketing API", | ||
| "type": "object", | ||
| "discriminator": { |
There was a problem hiding this comment.
what is the discriminator used for?
There was a problem hiding this comment.
It is used to distinguish between different schema definitions based on a property value. In this case I think this is a little overloaded as we also are using also OneOf to have one of either schemas
|
Aldo Gonzalez (@aldogonzalez8) looks like there's a version increment check failing FYI |
| @@ -202,7 +200,6 @@ class Config: | |||
| credentials: Optional[Union[OAuthCredentials, ServiceAccountCredentials]] = Field( | |||
There was a problem hiding this comment.
without the discriminator field you should remove "Optional" here as well.
There was a problem hiding this comment.
Actually ignore previous comment, let me do more testing on this.
There was a problem hiding this comment.
Actually this comment was very useful, thanks Cristina Mariscal (@cmm-airbyte)
|
Baz (@bazarnov) Cristina Mariscal (@cmm-airbyte), with current changes, this is the result diff of the master vs. fix branch (poetry run source-facebook-marketing spec). Can you confirm that this looks good to you? 1.- Unused discriminator in credentials is gone (unused because the #defined paths won't exist). The spec.json was updated to sync with spec command results.
|
| credentials: Optional[Union[OAuthCredentials, ServiceAccountCredentials]] = Field( | ||
| credentials: Union[OAuthCredentials, ServiceAccountCredentials] = Field( | ||
| title="Authentication", | ||
| description="Credentials for connecting to the Facebook Marketing API", | ||
| discriminator="auth_type", |
There was a problem hiding this comment.
Cristina Mariscal (@cmm-airbyte) I'm just curious about why this used to be optional, it seems credentials are something we always wanted to be required(?). You can look at the spec command results I left in the conversation tab. cc Baz (@bazarnov)
|
Service authentication and Oauth worked fine, I set this workspace for my testing if you wish to take a look
|
|
/approve-regression-tests
|










What
It appears that the registry was updated, and Facebook Marketing’s spec now contains a credentials block that references definitions that are not found anywhere.
That’s causing issues with generating the terraform provider.
Here is the conversation related if you want to make a deep dive.
How
Let's remove unused discriminator
Review guide
integration_tests/spec.json: discrimintor being removedUser Impact
Terraform provider can be generated now
Can this PR be safely reverted and rolled back?