Skip to content
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

Move namespace handler to service/frontend #3855

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

rodrigozhou
Copy link
Collaborator

What changed?
Moved namespace/handler.go to service/frontend/namespace_handler.go.
Renamed namespace.ArchivalState to namespace.ArchivalConfigState.
Renamed namespace.ArchivalEvent to namespace.ArchivalConfigEvent.

Why?
namespace module is depending on archiver module, which will cause potential circular dependencies (eg: searchattribute module cannot import namespace).

Since the namespace handler is only used by frontend, I'm moving it there.
As for the renaming, there's another type name ArchivalState already defined in archiver, so I'm changing the one in namespace to better distinguish them.

How did you test it?
Existing tests.

Potential risks
No.

Is hotfix candidate?
No.

@rodrigozhou rodrigozhou requested a review from a team as a code owner January 26, 2023 22:32
if s.State == enumspb.ARCHIVAL_STATE_ENABLED && len(s.URI) == 0 {
return errInvalidState
}
return nil
}

func (s *ArchivalState) getNextState(
e *ArchivalEvent,
func (s *ArchivalConfigState) GetNextState(
Copy link
Member

Choose a reason for hiding this comment

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

OMG, 58!

service/frontend/adminHandler.go Show resolved Hide resolved
@rodrigozhou rodrigozhou merged commit 3b3498a into temporalio:master Jan 27, 2023
@rodrigozhou rodrigozhou deleted the move-namespace-handler branch January 27, 2023 08:47
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