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

Reconcile typed search attributes with schedules #1848

Merged

Conversation

Quinn-With-Two-Ns
Copy link
Contributor

Fix typed search attributes in java schedules by:

  • Adding typed search attributes to ScheduleOptions
  • Documenting old SearchAttributes do not work when creating a schedule
  • Allow for untyped search attributes in the SearchAttributes container through a special key type

closes #1847

* <p>This should only be used when the server can return untyped search attributes, for example,
* when describing a schedule workflow action.
*/
public static SearchAttributeKey<Payload> forUntyped(String name) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could also make calling valueSet and valueUnset an error since I am not aware of any valid use case

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, that would work, I think we should. We can hide this more in other langs. Arguably we could make the name of this method more unwieldy, but this is probably good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

This looks great! I am thinking how I can apply to my Python conundrum.

* <p>This should only be used when the server can return untyped search attributes, for example,
* when describing a schedule workflow action.
*/
public static SearchAttributeKey<Payload> forUntyped(String name) {
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, that would work, I think we should. We can hide this more in other langs. Arguably we could make the name of this method more unwieldy, but this is probably good.

@Quinn-With-Two-Ns Quinn-With-Two-Ns marked this pull request as ready for review August 25, 2023 16:24
@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner August 25, 2023 16:24
@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit 4298dad into temporalio:master Aug 28, 2023
4 checks passed
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.

Typed search attributes aren't consistent with schedules
2 participants