Skip to content

Conversation

@davidporter-id-au
Copy link
Member

@davidporter-id-au davidporter-id-au commented Nov 15, 2025

What changed?

I missed the remaining part of implementation of writing failover and domain updates to the domain audit log (the worker component just uses the manager directly rather than going to the domain handler). So this adds those logging options for passive side so that domain updates and failovers are recorded in both active and passive sides.

Unfortunately I'd not as heavily refactored the replication component, though it's fairly simple by comparison to the domain handler, so the update is fairly large.

Why?

How did you test it?

  • Tested locally and (this time) ensured that the data is present for all clusters

Potential risks

Release notes

Documentation Changes

@davidporter-id-au davidporter-id-au force-pushed the bugfix/fix-failover-history-on-passive branch from 7133bd2 to c4b907f Compare November 15, 2025 04:23
Copy link
Member Author

Choose a reason for hiding this comment

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

refactored to EnableDomainAuditLogging


// plus, we need to check whether the config version is <= the config version set in the input
// plus, we need to check whether the failover version is <= the failover version set in the input
existingDomain, err := h.domainManager.GetDomain(ctx, &persistence.GetDomainRequest{
Copy link
Member Author

Choose a reason for hiding this comment

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

this gets mutated due to the substructs getting dereferenced and then edited, so it was necessary to deepcopy even though there's no actual editing of the existingDomain variable

@davidporter-id-au davidporter-id-au changed the title Bugfix/fix failover history on passive fix: write failover history on the passive side Nov 15, 2025
@davidporter-id-au davidporter-id-au force-pushed the bugfix/fix-failover-history-on-passive branch from c4b907f to 0df1086 Compare November 15, 2025 04:48
@davidporter-id-au davidporter-id-au marked this pull request as ready for review November 15, 2025 04:48
davidporter-id-au and others added 3 commits November 14, 2025 20:50
Signed-off-by: David Porter <[email protected]>
- Create noopDomainAuditManager to satisfy DomainAuditManager interface
- Update NewReplicationTaskExecutor calls with new signature
- Pass EnableDomainAuditLogging dynamic property

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: David Porter <[email protected]>
@davidporter-id-au davidporter-id-au force-pushed the bugfix/fix-failover-history-on-passive branch from 0df1086 to 16b6782 Compare November 15, 2025 04:50
@davidporter-id-au davidporter-id-au enabled auto-merge (squash) November 15, 2025 05:09
Signed-off-by: David Porter <[email protected]>

if existingDomain.ReplicationConfig.IsActiveActive() || task.ReplicationConfig.IsActiveActive() {
mergedActiveClusters, aaChanged := mergeActiveActiveScopes(existingDomain.ReplicationConfig.ActiveClusters, task.ReplicationConfig.ActiveClusters)
if intendedDomainState.ReplicationConfig.IsActiveActive() || task.ReplicationConfig.IsActiveActive() {
Copy link
Member

Choose a reason for hiding this comment

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

I'm confused by the places where we use intendedDomainState and other places where we use originalDomainState

Copy link
Member Author

Choose a reason for hiding this comment

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

this is fair, let me annotate

@davidporter-id-au davidporter-id-au merged commit 50ab986 into cadence-workflow:master Nov 17, 2025
57 of 58 checks passed
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.

2 participants