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

Validate relationship field names in config as backing columns #2175

Merged
merged 28 commits into from Apr 30, 2024

Conversation

aaronburtle
Copy link
Contributor

@aaronburtle aaronburtle commented Apr 18, 2024

Why make this change?

Closes #2166
Related to #2139

What is this change?

When we validate the relationship fields in the config, ie: source fields and target fields, we use the backing column names to validate against. Previously we were using aliases if one existed, but instead we will validate only against the actual names of the backing columns. So, for example, if someone had an alias for the column "id", so that it would display as "identifier" when using this alias, we would validate that the relationship defined with that field was defined in the config using the name "id", and would throw a validation error if the config instead used, "identifier."

How was this tested?

Current test suite passing, along with a regression test for DwSql, MsSql, MySql, and PostreSql.

Sample Request(s)

Please see this issue for details on samples to reproduce.

#2166

@aaronburtle
Copy link
Contributor Author

/azp run

@aaronburtle
Copy link
Contributor Author

/azp run

@aaronburtle
Copy link
Contributor Author

/azp run

@aaronburtle
Copy link
Contributor Author

/azp run

@aaronburtle
Copy link
Contributor Author

/azp run

@aaronburtle
Copy link
Contributor Author

/azp run

@aaronburtle
Copy link
Contributor Author

/azp run

@aaronburtle
Copy link
Contributor Author

/azp run

@aaronburtle
Copy link
Contributor Author

/azp run

Copy link
Contributor

@seantleonard seantleonard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

questions about how tests are validating config validation.

@aaronburtle
Copy link
Contributor Author

/azp run

@aaronburtle
Copy link
Contributor Author

/azp run

@aaronburtle
Copy link
Contributor Author

/azp run

Copy link
Contributor

@ayush3797 ayush3797 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@ayush3797
Copy link
Contributor

/azp run

@ayush3797 ayush3797 enabled auto-merge (squash) April 30, 2024 05:18
@ayush3797 ayush3797 disabled auto-merge April 30, 2024 05:26
@ayush3797 ayush3797 enabled auto-merge (squash) April 30, 2024 05:26
@ayush3797 ayush3797 merged commit d2aa5aa into main Apr 30, 2024
7 checks passed
@ayush3797 ayush3797 deleted the dev/aaronburtle/RelationshipValidationOnBackingColumns branch April 30, 2024 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: GraphQL Query failure when mappings exist for relationship fields
3 participants