fix: set type metadata on search attribute payloads in test server#2677
Conversation
|
Hi Aditya, thank you for your contribution! Before we can merge your PR, you must sign our Contributor License Agreement. Please refer to @CLAassistant's automatic comment above. Features Integration Tests CI job has failed. It looks like you haven't copied tags from our repository into your fork - without that, this job will not work. Please run the following commands inside your repository clone: Please leave a comment when you've run the commands so we can re-run CI. |
|
Hi @maciejdudko, I have fetched and pushed tags using steps you mentioned.
I have already signed Contributor License Agreement, not sure why it is still stating that it hasn't been signed yet.
|
|
The features tests passed, thank you. It looks like Github didn't recognize you as the author of the commit. This can be because your Git is configured to use a different email address than the one you used for Github account. Please see this guide to add additional emails: https://docs.github.com/en/account-and-profile/how-tos/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/adding-an-email-address-to-your-github-account Alternatively, you can recommit the changes under a different email. First change your email address in Git config to match your Github account, then inside your branch, run |
bb824d3 to
9dc2cc8
Compare
|
@maciejdudko license check is passing now. Can you please review the PR? |
maciejdudko
left a comment
There was a problem hiding this comment.
Everything looks good, thank you for your contribution!

Today, Temporal server sets
typemetadata on search attribute payloads even if user doesn't set it, test server should do the same.What was changed
TestVisibilityStoreImpl.upsertSearchAttributesForExecution()to automatically add type metadata to search attribute payloads when missingMETADATA_TYPE_KEYconstant matching the standard used throughout the codebaseTestVisibilityStoreImplTestto verify the fix works correctlyWhy?
The test server was not setting
typemetadata on search attribute payloads, while the real Temporal server does this automatically. This inconsistency could cause problems when testing search attribute functionality, as tests might behave differently between test and production environments. The fix ensures consistent behavior and improves reliability of tests that depend on search attribute functionality.Checklist
Closes Test server needs to set metadata
typefor search attribute payloads #2666How was this tested:
TestVisibilityStoreImplTestwith two test methods:testTypeMetadataIsAddedToPayloads()- verifies missing type metadata is automatically addedtestExistingTypeMetadataIsPreserved()- verifies existing metadata is preservedSearchAttributePayloadConverterAny docs updates needed?