Skip to content

Conversation

@fretz12
Copy link
Contributor

@fretz12 fretz12 commented Dec 11, 2025

What changed?

Add dynamic config to toggle standalone activity functionality. Refactored frontend dynamic config into activity config. Removed standalone activity dc prefix chasm

Why?

We need the ability to toggle standalone activity functionality as we go to prod. We also agreed to remove the chasm prefix from any chasm originated dynamic config keys

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)

@fretz12 fretz12 marked this pull request as ready for review December 11, 2025 05:48
@fretz12 fretz12 requested review from a team as code owners December 11, 2025 05:48
@fretz12 fretz12 marked this pull request as draft December 11, 2025 19:29
@fretz12 fretz12 marked this pull request as ready for review December 11, 2025 19:42
Copy link
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.

You need to integrate with the frontend's workflow_handler.go too for all of the poll and complete APIs.

@@ -71,6 +70,10 @@ func NewFrontendHandler(
// before mutation to preserve the original for retries.
// 3. Sends the request to the history activity service.
func (h *frontendHandler) StartActivityExecution(ctx context.Context, req *workflowservice.StartActivityExecutionRequest) (*workflowservice.StartActivityExecutionResponse, error) {
if !h.config.Enabled(req.GetNamespace()) {
return nil, serviceerror.NewUnavailable("Standalone activity is disabled.")
Copy link
Member

Choose a reason for hiding this comment

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

We are very inconsistent on use of punctuation in error messages across the codebase. I tend to omit punctuation for single sentence messages. Not blocking. @dandavison, thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm ok with no period at the end... but any sentence that needs proper punctuation within (i.e. commas), we should use.

@fretz12
Copy link
Contributor Author

fretz12 commented Dec 11, 2025

You need to integrate with the frontend's workflow_handler.go too for all of the poll and complete APIs.

@bergundy good call, I've added checks there too. I've not added one for PollActivityTaskQueue as we won't be able to distinguish a standalone activity until we get a response back from the matching service. Currently the enabled DC is kept by chasm activity and we don't have any dependencies in matching yet. Hopefully this is not a big deal since we have the check in all other APIs and should be impossible for a user to start any SAA when the other APIs are guarded.

@fretz12 fretz12 requested a review from bergundy December 11, 2025 22:41
"go.temporal.io/server/common/log"
"go.temporal.io/server/common/metrics"
"go.temporal.io/server/common/namespace"
"go.temporal.io/server/common/searchattribute"
"google.golang.org/protobuf/types/known/durationpb"
)

const StandaloneActivityDisabledError = "Standalone activity is disabled"
Copy link
Member

Choose a reason for hiding this comment

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

nit: I would just repeat the string instead of adding a layer of indirection. You're not getting much from this constant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should just keep the message in one place to keep it consistent.

Base automatically changed from saa-metrics to standalone-activity December 12, 2025 04:59
@fretz12 fretz12 merged commit 34d64ee into standalone-activity Dec 12, 2025
54 of 56 checks passed
@fretz12 fretz12 deleted the saa-dc-enable branch December 12, 2025 17:15
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.

3 participants