Skip to content

Conversation

@dandavison
Copy link
Contributor

@dandavison dandavison commented Dec 19, 2025

What changed?

If the group by key is returned as []byte, convert it to string in CountWorkflowExecutions and CountCHASMExecutions.

Why?

The Go driver for MySQL returns VARCHAR columns as []byte. This is apparently not true of our other persistence backends.

How did you test it?

  • built
  • added new functional test(s)

Potential risks

Could break workflow visibility queries if this change is not correct.


Note

Handle MySQL driver returning VARCHAR as []byte for group-by keys and add tests decoding/validating group values.

  • SQL Visibility:
    • Update parseCountGroupByGroupValue in common/persistence/sql/sqlplugin/visibility.go to convert []byte to string for non-ExecutionStatus group-by values (MySQL VARCHAR scan behavior).
  • Tests:
    • In tests/chasm_test.go (TestCountExecutions_GroupBy), decode group.Values[0] and assert it is one of "Running" or "Completed"; keep error case for unsupported GROUP BY.

Written by Cursor Bugbot for commit a837b5b. This will update automatically on new commits. Configure here.

@dandavison dandavison requested review from a team as code owners December 19, 2025 18:00
@dandavison dandavison merged commit ca184ac into standalone-activity Dec 19, 2025
59 checks passed
@dandavison dandavison deleted the mysql-visibility-bug branch December 19, 2025 18:24
dandavison added a commit that referenced this pull request Dec 19, 2025
## What changed?
If the group by key is returned as `[]byte`, convert it to string in
`CountWorkflowExecutions` and `CountCHASMExecutions`.

## Why?
The Go driver for MySQL returns `VARCHAR` columns as `[]byte`. This is
apparently not true of our other persistence backends.

## How did you test it?
- [x] built
- [x] added new functional test(s)

## Potential risks
Could break workflow visibility queries if this change is not correct.
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