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

Schema Compare open SCMP file #825

Merged
merged 6 commits into from
Jun 13, 2019
Merged

Schema Compare open SCMP file #825

merged 6 commits into from
Jun 13, 2019

Conversation

kisantia
Copy link
Contributor

@kisantia kisantia commented Jun 10, 2019

This takes a request to open an SCMP file and returns the source and target endpoint info, deployment options, and excluded elements. Some xml parsing still had to be done to get the included/excluded elements and because the source and target info of SchemaComparison are internal.

Will add deployment options checks to tests after Udeesha's changes get checked in since it has a helper to compare options.

@coveralls
Copy link

coveralls commented Jun 10, 2019

Coverage Status

Coverage decreased (-0.04%) to 76.154% when pulling f13b4e2 on kisantia/openScmp into 3566471 on master.

}
else
{
// need to parse xml to get connection string of database
Copy link
Contributor

Choose a reason for hiding this comment

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

@pensivebrian should we make the connection string getter to be public in DacFx SchemaCompareDatabaseEndpoint - so that we don't have to do parsing here? What do you think? I am worried that parsing might need constant maintenance if things around this change in DacFx.

Copy link
Member

Choose a reason for hiding this comment

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

I don't have enough context to have an opinion. I'll leave it up to you two.

Copy link
Member

@pensivebrian pensivebrian left a comment

Choose a reason for hiding this comment

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

Approved with some minor issues.

}
else
{
// need to parse xml to get connection string of database
Copy link
Member

Choose a reason for hiding this comment

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

I don't have enough context to have an opinion. I'll leave it up to you two.

try
{
operation = new SchemaCompareOpenScmpOperation(parameters);
operation.Execute(TaskExecutionMode.Execute);
Copy link
Member

Choose a reason for hiding this comment

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

Why make async methods with the operation is sync? Shouldn't this be async?

Copy link
Contributor

@udeeshagautam udeeshagautam Jun 13, 2019

Choose a reason for hiding this comment

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

Hey Brian I think I can answer this one... so from what I understood (from query editor calls) is that sync Handle*request methods keep the process channel between ADS and sqltoolsservice busy - so for any operation that can be take longer we create an async task/thread and start it but don't wat on it and resturn from Request*Handle method. The task then returns through RequestContext whenever it completes/errors out.

Copy link
Member

Choose a reason for hiding this comment

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

Hmmm. Blocking the json/rpc channel seems like a bad idea as no other request can be serviced, right? I guess the question is why makes this method async in the first place? But if this is existing pattern that's used elsewhere, then I guess it makes sense to be consistent.

@kisantia kisantia merged commit b451670 into master Jun 13, 2019
@kisantia kisantia deleted the kisantia/openScmp branch June 13, 2019 21:24
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.

None yet

4 participants