-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add support for blue/green deployments #911
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
base: main
Are you sure you want to change the base?
Conversation
aws_advanced_python_wrapper/resources/aws_advanced_python_wrapper_messages.properties
Outdated
Show resolved
Hide resolved
logger.debug( | ||
Messages.get_formatted( | ||
"SuspendConnectRouting.SwitchoverCompleteContinueWithConnect", | ||
(time.time() - start_time_sec) // 1000)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(time.time() - start_time_sec) // 1000)) | |
(time.time() - start_time_sec) * 1000)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we track the time using ms or ns instead of seconds for more detailed time reporting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
time.time() returns a floating point that includes fractions of a second, for example if I run time.time() on my machine I get 1752773235.3210173
, so I believe we will still get ms precision
switchover_completed = (not self._rollback and self._summary_status.phase == BlueGreenPhase.COMPLETED) or \ | ||
(self._rollback and self._summary_status.phase == BlueGreenPhase.CREATED) | ||
has_active_switchover_phases = \ | ||
any(phase_info.phase is not None and phase_info.phase.is_active_switchover_completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any(phase_info.phase is not None and phase_info.phase.is_active_switchover_completed | |
any(phase_info.phase is not None and phase_info.phase.is_switchover_active_or_completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The log switchover final summary output's formatting looks off, would you be able to verify it?
----------------------------------------------------------------------------------
timestamp time offset (ms) event----------------------------------------------------------------------------------
>28s ms
----------------------------------------------------------------------------------
|
||
def _update_dns_flags(self, bg_role: BlueGreenRole, interim_status: BlueGreenInterimStatus): | ||
if bg_role == BlueGreenRole.SOURCE and not self._blue_dns_update_completed and interim_status.all_start_topology_ip_changed: | ||
logger.debug("bgd.blueDnsCompleted", self._bg_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.debug("bgd.blueDnsCompleted", self._bg_id) | |
logger.debug("BlueGreenStatusProvider.BlueDnsCompleted", self._bg_id) |
self._store_event_phase_time("Blue DNS updated") | ||
|
||
if bg_role == BlueGreenRole.TARGET and not self._green_dns_removed and interim_status.all_start_topology_endpoints_removed: | ||
logger.debug("bgd.greenDnsRemoved", self._bg_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.debug("bgd.greenDnsRemoved", self._bg_id) | |
logger.debug("BlueGreenStatusProvider.GreenDnsRemoved", self._bg_id) |
self._store_event_phase_time("Green DNS removed") | ||
|
||
if bg_role == BlueGreenRole.TARGET and not self._green_topology_changed and interim_status.all_topology_changed: | ||
logger.debug("bgd.greenTopologyChanged", self._bg_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.debug("bgd.greenTopologyChanged", self._bg_id) | |
logger.debug("BlueGreenStatusProvider.GreenTopologyChanged", self._bg_id) |
self._summary_status = self._get_status_of_completed() | ||
|
||
else: | ||
raise ValueError(Messages.get_formatted("bgd.unknownPhase", self._bg_id, self._latest_phase)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise ValueError(Messages.get_formatted("bgd.unknownPhase", self._bg_id, self._latest_phase)) | |
raise ValueError(Messages.get_formatted("BlueGreenStatusProvider.UnknownPhase", self._bg_id, self._latest_phase)) |
… inner value of the ValueContainer
execute_func: Callable, | ||
*args: Any, | ||
**kwargs: Any) -> ValueContainer[Any]: | ||
logger.debug("SuspendExecuteRouting.InProgressSuspendMethod") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.debug("SuspendExecuteRouting.InProgressSuspendMethod") | |
logger.debug("SuspendExecuteRouting.InProgressSuspendMethod", method_name) |
Description
Adds support for Blue/Green Deployments for the following DB types:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.