Skip to content

feat: blue/green support#244

Open
JuanLeee wants to merge 1 commit intoaws:mainfrom
JuanLeee:feat/bg
Open

feat: blue/green support#244
JuanLeee wants to merge 1 commit intoaws:mainfrom
JuanLeee:feat/bg

Conversation

@JuanLeee
Copy link
Copy Markdown
Contributor

Summary

Description

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@JuanLeee JuanLeee force-pushed the feat/bg branch 2 times, most recently from af690c3 to ecc5807 Compare February 27, 2026 18:08
@kenrickyap
Copy link
Copy Markdown
Contributor

I think the csproj file is missing for BlueGreenConnection and BlueGreenConnection.Tests projects.

Copy link
Copy Markdown
Contributor

@kenrickyap kenrickyap left a comment

Choose a reason for hiding this comment

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

NOICE WORK :):) added some comments

this.pluginService = pluginService;
this.props = props;
this.providerSupplier = providerSupplier;
this.bgdId = PropertyDefinition.BgdId.GetString(this.props);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we normalize this like jdbc? Require it to be non null, trim, and also lowercase?

And curious, can users ever pass in null through the properties? This may blow up and we will get a NPE if we pass this in to routing.apply. Perhaps we should make bgId string instead of string? if possible

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.

I think it will use default value of property

@JuanLeee JuanLeee force-pushed the feat/bg branch 6 times, most recently from 0473cd6 to 3df503d Compare March 18, 2026 18:51
@karenc-bq karenc-bq self-requested a review March 20, 2026 08:52
@karenc-bq karenc-bq dismissed their stale review March 20, 2026 08:53

Misclick

@JuanLeee JuanLeee force-pushed the feat/bg branch 2 times, most recently from d7c156a to 0035588 Compare March 25, 2026 17:49
@JuanLeee JuanLeee force-pushed the feat/bg branch 2 times, most recently from 82f3958 to 74b80bd Compare March 26, 2026 22:43
@JuanLeee JuanLeee force-pushed the feat/bg branch 2 times, most recently from 9dcd290 to 0ff9f2e Compare March 26, 2026 23:37

while (bgStatus is { CurrentPhase: BlueGreenPhaseType.IN_PROGRESS })
{
await this.Delay(this.sleepTimeMs, bgStatus, this.BgdId, cts.Token);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like we are using cts.Token to interrupt this.Delay, curious if that will also interrupt this while loop while (bgStatus is { CurrentPhase: BlueGreenPhaseType.IN_PROGRESS }) or if you would still need stopwatch.ElapsedMilliseconds < timeoutMs

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.

It should interrupt the loop but I think putting in the time check would align better with the JDBC implementation.

@JuanLeee JuanLeee force-pushed the feat/bg branch 2 times, most recently from 09d7ee2 to 6a74abd Compare March 27, 2026 18:20

private static readonly string TopologyQuery =
$"SELECT id, endpoint, port FROM rds_tools.show_topology('aws_dotnet_driver-{DriverVersion}')";
$"SELECT id, endpoint, port FROM rds_tools.show_topology('aws_advanced_dotnet_data_provider_wrapper-{DriverVersion}')";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could we grab the version dynamically here 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.

Going to change in future PR

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.

5 participants