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

Fixes attempt to scaffold triggers on synapse re: issue #30998 #31001

Closed

Conversation

memory-thrasher
Copy link
Contributor

No description provided.

@memory-thrasher
Copy link
Contributor Author

@dotnet-policy-service agree

@memory-thrasher
Copy link
Contributor Author

I can't make a reasonable test case as testing this would require an accessible and queryable synapse instance. Afaik no such publicly accessible test instance exists.

Copy link
Contributor

@ErikEJ ErikEJ left a comment

Choose a reason for hiding this comment

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

I will smoke test my similar implementation

@@ -1343,6 +1347,9 @@ private bool SupportsMemoryOptimizedTable()
private bool SupportsSequences()
=> _compatibilityLevel >= 110 && _engineEdition != 6;

private bool SupportsTriggers()
Copy link
Contributor

Choose a reason for hiding this comment

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

You should add 11 and 1000 as well.

Copy link
Member

Choose a reason for hiding this comment

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

Looking at the other Supports methods, is it correct to say that Synapse can be detected by checking if _engineEdition is 6, 11 or 1000? If so, we should extract an IsSynapse private property that does that and reuse that everywhere...

Copy link
Contributor

Choose a reason for hiding this comment

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

11 and 1000 are not Synapse Serverless Pool, on 6 is. 11 is Data Warehouse, and 1000 is Dynamics CRM TDS endpoint

Copy link
Member

Choose a reason for hiding this comment

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

OK - I still think it would make the code more readable to have at least constants for this to make the code more readable.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree that constants would improved readability/understanding

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Great, we should probably just have an EngineEdition enum...

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@memory-thrasher memory-thrasher May 31, 2023

Choose a reason for hiding this comment

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

I see in the docs that 11 is synapse serverless pool, but what is 1000?

Copy link
Contributor

Choose a reason for hiding this comment

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

1000 is the second link: Dynamics CRM TDS Endpoint

Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

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

@memory-thrasher can you please target the main branch? We'll discuss whether to backport the fix later.

@@ -1343,6 +1347,9 @@ private bool SupportsMemoryOptimizedTable()
private bool SupportsSequences()
=> _compatibilityLevel >= 110 && _engineEdition != 6;

private bool SupportsTriggers()
Copy link
Member

Choose a reason for hiding this comment

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

Looking at the other Supports methods, is it correct to say that Synapse can be detected by checking if _engineEdition is 6, 11 or 1000? If so, we should extract an IsSynapse private property that does that and reuse that everywhere...

Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

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

@memory-thrasher can you please target the main branch? We'll discuss whether to backport the fix later.

@memory-thrasher
Copy link
Contributor Author

I can't retarget this PR so I'll make a new one to target main once the test cases finish.

@memory-thrasher
Copy link
Contributor Author

@roji @ErikEJ replacement PR here #31011

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.

3 participants