dsccommunity / SqlServerDsc

This module contains DSC resources for deployment and configuration of Microsoft SQL Server.
MIT License
360 stars 227 forks source link

SqlAGReplica: Run Update-AvailabilityGroupReplica Once for All AvailabilityReplica Changes #1840

Closed hollanjs closed 1 year ago

hollanjs commented 1 year ago

Pull Request (PR) description

This PR alters how the SqlAGReplica changes properties of the AvailabilityReplica. Rather than triggering an update for each individual property that is out of state, Update-AvailabilityGroupReplica now triggers only once at the end, applying all property updates at once.

To specifically resolve issues with FailoverMode and AvailabilityMode updates:

This Pull Request (PR) fixes the following issues

Task list


This change is Reviewable

codecov[bot] commented 1 year ago

Codecov Report

Merging #1840 (d59a357) into main (979800d) will increase coverage by 0%. The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff          @@
##           main   #1840   +/-   ##
====================================
  Coverage    91%     91%           
====================================
  Files        71      71           
  Lines      7310    7313    +3     
====================================
+ Hits       6661    6664    +3     
  Misses      649     649           
Flag Coverage Δ
unit 91% <100%> (+<1%) :arrow_up:
Impacted Files Coverage Δ
...SCResources/DSC_SqlAGReplica/DSC_SqlAGReplica.psm1 100% <100%> (ø)
johlju commented 1 year ago

@hollanjs awesome work! Looks great at initial glance. Will review later today.