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

Feature/schemacompare scmp save #824

Merged
merged 8 commits into from
Jun 14, 2019
Merged

Conversation

udeeshagautam
Copy link
Contributor

@udeeshagautam udeeshagautam commented Jun 10, 2019

Adding changes to add save scmp operation in tools service side along with some generic minimal refactoring. Will add more end to end tests once we have scmp load changes as well (Kim will send a PR for scmp load).

@coveralls
Copy link

coveralls commented Jun 11, 2019

Coverage Status

Coverage increased (+0.02%) to 76.216% when pulling 9024941 on feature/schemacompare-scmpSave into 3566471 on master.

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 that I don't need to re-review.

return null;
}

connInfo.ConnectionDetails.DatabaseName = databaseName;
Copy link
Member

Choose a reason for hiding this comment

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

we're mutating the connInfo. Can't the caller do this? Or, make a copy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not new code but as I understand copy is done because connInfo created from ownerURI doesnt have db information... and i think it was not done in caller here just to avoid duplicating this line...


internal static string FormatScript(string script)
{
script = RemoveExcessWhitespace(script);
Copy link
Member

Choose a reason for hiding this comment

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

Need to be careful since some whitespace may be part of a string literal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not new code, just moved to utils since it was used by multiple classes. from what I understand it only removes two or more consecutive ones... @kisantia can you please correct my explanation :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes it removes multiple consecutive spaces so that the diff in ADS doesn't display it as a difference. Having different whitespace was a problem because spaces are used to align columns, so a table with a new column with a longer name would the whole table as being different instead of just the new column.

try
{
operation = new SchemaCompareSaveScmpOperation(parameters, sourceConnInfo, targetConnInfo);
operation.Execute(parameters.TaskExecutionMode);
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 this method async if we're just going to block the thread? Should this be async?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Execute is sync... CurrentSchemaCompareTask = Task.Run(async () => {} in line 243 starts a thread which is async and we dont wait on that thread (other than in test)
Am I understanding the question correctly?

@udeeshagautam udeeshagautam merged commit 432e054 into master Jun 14, 2019
@udeeshagautam udeeshagautam deleted the feature/schemacompare-scmpSave branch June 14, 2019 00:29
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