-
Notifications
You must be signed in to change notification settings - Fork 985
Fixes issue #7631 with wrong archiver lookup #7748
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
Conversation
Calling the GetVisibilityArchiver and GetHistoryArchiver functions causes errors when the internal frontend is enabled. We should either check the current configuration or simply call these functions with the InternalFrontendService parameter if an error occurs.
|
Thanks for the contribution @PADRESH! It looks like the issue is caused by Instead of adding fallback logic, I think we should remove those hardcoded service name and plumb through the actual serviceName to those two components. Similar to what RegisterBootstrapContainer is doing. cc @dnr who has more context on internal frontend. |
Calling the GetVisibilityArchiver and GetHistoryArchiver functions causes errors when the internal frontend is enabled. Use serviceName from fx.
…ver_lookup # Conflicts: # service/frontend/namespace_handler.go # service/frontend/workflow_handler.go
@yycptt, thank you for the suggestions. I've committed the changes and tested them locally (kubernetes). |
This is okay for what it is, but the problem is really that the archival provider/bootstrap/fx stuff is kind of a mess. There's no reason that it should take a service name at all, each fx app gets its own archiverProvider so it will only ever be called with one service name. The "Bootstrap" structs should just be parameter lists or fx.In structs. If you'd like to tackle refactoring this all, that would be even better than this fix, since it would remove a lot of unnecessary code. Though I think we can accept this in the short term if it fixes the problem. I ran CI for this PR... note the failures and please fix. |
I just tried using an AI tool to do this refactoring and came up with #7766 @PADRESH Could you check to see if that one solves the problem? |
@dnr Yes. Problem solved. |
Calling the GetVisibilityArchiver and GetHistoryArchiver functions causes errors when the internal frontend is enabled. We should either check the current configuration or simply call these functions with the InternalFrontendService parameter if an error occurs.
What changed?
Added fallback logic for archiver retrieval in namespace_handler.go and workflow_handler.go to handle cases when the initial call fails.
Why?
When the internal frontend is enabled, all visibility and history containers are registered under the InternalFrontendService key. However, some calls in namespace_handler.go and workflow_handler.go still attempt to retrieve archivers using the FrontendService key.
How did you test it?
Potential risks
If the archival configuration is incorrect, the system takes additional time to fail/recognize the error.