Skip to content

[4.0] Implement cleanup defunct silo entries ado net clustering - #7928

Merged
ReubenBond merged 5 commits into
dotnet:mainfrom
ElanHasson:implement_CleanupDefunctSiloEntries_ADONetClustering
Aug 18, 2022
Merged

ReubenBond merged 5 commits into
dotnet:mainfrom
ElanHasson:implement_CleanupDefunctSiloEntries_ADONetClustering

Conversation

@ElanHasson

@ElanHasson ElanHasson commented Aug 17, 2022 •

Copy link
Copy Markdown
Contributor

Resolves #7171.

Separate PR for 3.x. is #7929.

Microsoft Reviewers: Open in CodeFlow

@ElanHasson
ElanHasson force-pushed the implement_CleanupDefunctSiloEntries_ADONetClustering branch 2 times, most recently from 8805208 to 63f8049 Compare August 17, 2022 00:48
@ElanHasson ElanHasson changed the title Implement cleanup defunct silo entries ado net clustering [4.0] Implement cleanup defunct silo entries ado net clustering Aug 17, 2022
@ElanHasson
ElanHasson marked this pull request as draft August 17, 2022 00:55
@ElanHasson
ElanHasson force-pushed the implement_CleanupDefunctSiloEntries_ADONetClustering branch 2 times, most recently from 4c5bf9e to dcd0be5 Compare August 17, 2022 01:12
@ElanHasson
ElanHasson marked this pull request as ready for review August 17, 2022 01:13
@ElanHasson
ElanHasson force-pushed the implement_CleanupDefunctSiloEntries_ADONetClustering branch from dcd0be5 to 7432d0c Compare August 17, 2022 01:18
@ElanHasson
ElanHasson force-pushed the implement_CleanupDefunctSiloEntries_ADONetClustering branch 4 times, most recently from 6300d50 to 234a3ac Compare August 17, 2022 03:27
@ElanHasson
ElanHasson marked this pull request as draft August 17, 2022 03:33
@ElanHasson
ElanHasson force-pushed the implement_CleanupDefunctSiloEntries_ADONetClustering branch 2 times, most recently from 48d4fd4 to d57a10d Compare August 17, 2022 03:56
@ElanHasson
ElanHasson force-pushed the implement_CleanupDefunctSiloEntries_ADONetClustering branch from d57a10d to 31e8fc9 Compare August 17, 2022 04:01
@ElanHasson
ElanHasson marked this pull request as ready for review August 17, 2022 04:11
// Concatenate scripts
foreach (var fileName in testStorage.SetupSqlScriptFileNames)
{
Console.WriteLine($"Processing {fileName}");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should either delete this or make it use ITestOutputHelper (an xUnit concept for logging during tests)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So I tried to do that, then I got to that method which is static and used in a few places.

The static helper class, TestContext, which exposes WriteLine was introduced via xunit/xunit@850587b which is xUnit and we are on 2.4.1.

image

If you're fine with it, I can pass ITextOutputHelper from the callers as a parameter, but that feels dirty.

Is there anything stopping us from upgrading xunit? I imagine lots of breaking changes or you'd had done it already.

If upgrading is not an option, I can make our own TestContext :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Passing it as a parameter or deleting the line are both fine options to me

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Upgrading xUnit is fine, too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: there are more than just that one Console.WriteLine in that method, sooo all or none. I'll figure it out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

xunit.v3 isn't a thing yet apparently.

Yeah, that didn't go well. you can see the commit I made with the changes to remove Console.WriteLine. I'm not familiar enough with xUnit to know how to fix this. If you know, happy to re-revert and do it.

I just removed the offending line.

{
class PostgreSqlStorageForTesting : RelationalStorageForTesting
{
protected override string ProviderMoniker => "PostgreSQL";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this the same as AdoNetInvariant?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, those are the full names of the drivers to use.

@ElanHasson
ElanHasson force-pushed the implement_CleanupDefunctSiloEntries_ADONetClustering branch from b04db39 to 3fe5fda Compare August 17, 2022 05:43
@ReubenBond
ReubenBond merged commit 4702095 into dotnet:main Aug 18, 2022
@ElanHasson
ElanHasson deleted the implement_CleanupDefunctSiloEntries_ADONetClustering branch August 18, 2022 23:39
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ADO.NET Clustering: implement CleanupDefunctSiloEntries

2 participants