Skip to content

Interface fix + fixing ns change#9706

Merged
michaely520 merged 5 commits intomainfrom
interface-bump
Apr 6, 2026
Merged

Interface fix + fixing ns change#9706
michaely520 merged 5 commits intomainfrom
interface-bump

Conversation

@michaely520
Copy link
Copy Markdown
Contributor

@michaely520 michaely520 commented Mar 26, 2026

What changed?

Modifying replication state to optionally take wfid + fixing ns state change to use activeInCluster

Why?

adherence to interface goals

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

@michaely520 michaely520 changed the title WIP Interface fix + fixing ns change Mar 27, 2026
@michaely520 michaely520 marked this pull request as ready for review March 30, 2026 17:28
@michaely520 michaely520 requested review from a team as code owners March 30, 2026 17:28
isHandoverNamespace := ns.IsGlobalNamespace() &&
ns.ActiveInCluster(s.GetClusterMetadata().GetCurrentClusterName()) &&
ns.ReplicationState() == enumspb.REPLICATION_STATE_HANDOVER
ns.ReplicationState("") == enumspb.REPLICATION_STATE_HANDOVER
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.

are we special handling the empty value?

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.

same Q.

Comment thread common/namespace/replication_resolver.go Outdated
Comment thread service/frontend/fx.go Outdated
isHandoverNamespace := ns.IsGlobalNamespace() &&
ns.ActiveInCluster(s.GetClusterMetadata().GetCurrentClusterName()) &&
ns.ReplicationState() == enumspb.REPLICATION_STATE_HANDOVER
ns.ReplicationState("") == enumspb.REPLICATION_STATE_HANDOVER
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.

same Q.

oldNS.Name() != newNS.Name() ||
oldNS.IsGlobalNamespace() != newNS.IsGlobalNamespace() ||
oldNS.ActiveInCluster(r.currentClusterName) != newNS.ActiveInCluster(r.currentClusterName) ||
oldNS.ReplicationState("") != newNS.ReplicationState("")
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.

hmm if different businessID can have different replication state, checking the state of only one businessID won't be enough? Or maybe there's something special about the "" businessID?

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.

Synced offline.

oldNS.Name() != newNS.Name() ||
oldNS.IsGlobalNamespace() != newNS.IsGlobalNamespace() ||
oldNS.ActiveInCluster(r.currentClusterName) != newNS.ActiveInCluster(r.currentClusterName) ||
oldNS.ReplicationState("") != newNS.ReplicationState("")
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.

Synced offline.

@michaely520 michaely520 enabled auto-merge (squash) April 3, 2026 17:22
Copy link
Copy Markdown
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

Approved but please add the comment I requested.

}

if err := c.namespaceValidationInterceptor.ValidateState(c.namespace, c.apiName); err != nil {
if err := c.namespaceValidationInterceptor.ValidateState(c.namespace, c.apiName, ""); err != nil {
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.

Suggested change
if err := c.namespaceValidationInterceptor.ValidateState(c.namespace, c.apiName, ""); err != nil {
// Nexus requests are not tied to a business ID, hence the empty string.
if err := c.namespaceValidationInterceptor.ValidateState(c.namespace, c.apiName, ""); err != nil {

@michaely520 michaely520 merged commit f87611a into main Apr 6, 2026
46 checks passed
@michaely520 michaely520 deleted the interface-bump branch April 6, 2026 17:44
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.

4 participants