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

Worker versioning related updates #272

Merged

Conversation

bergundy
Copy link
Member

@bergundy bergundy commented Apr 14, 2023

Decided not to expose (the yet unused) CompatibleVersionSet.version_set_id, the set will have multiple IDs internally.

The affected projects have been updated:

Also added a use_versioning flag to RespondWorkflowTaskCompletedRequest to differentiate between the version stamp being used for versioning (matching) purposes or just as a marker.

// All the compatible versions, in insertion order.
// The last element is considered the set "default" and may not be the last inserted item in case of promoting an
// older build ID to be the set default.
repeated string build_ids = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it safe to change the id from 2 to 1?

Copy link
Member Author

Choose a reason for hiding this comment

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

This API isn't in use yet

Copy link
Member

Choose a reason for hiding this comment

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

Not in general, but this is not in use anywhere yet

// All the compatible versions, in insertion order.
// The last element is considered the set "default" and may not be the last inserted item in case of promoting an
// older build ID to be the set default.
repeated string build_ids = 1;
Copy link
Member

Choose a reason for hiding this comment

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

Not in general, but this is not in use anywhere yet

Comment on lines 93 to 95
// All the compatible versions, in insertion order.
// The last element is considered the set "default" and may not be the last inserted item in case of promoting an
// older build ID to be the set default.
Copy link
Member

Choose a reason for hiding this comment

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

this is contradictory.. it can't be both "in insertion order" and "the last element ... may not be the last inserted item"

Copy link
Member

@Sushisource Sushisource Apr 14, 2023

Choose a reason for hiding this comment

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

I think he means "need not" rather than "may not" - but yeah it's still confusing, this needs to distinguish insertion time from insertion order

Copy link
Member Author

Choose a reason for hiding this comment

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

This is what we decided though..
If we have keep the timestamps internally, we can preserve the insertion order but we also wanted the default to be the last.

Copy link
Member Author

Choose a reason for hiding this comment

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

What are you suggesting?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe just remove the first line? They're in arbitrary order except that the last one is special

Copy link
Member Author

Choose a reason for hiding this comment

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

It's nice that we can preserve the insertion order though, why take that away?
I'm almost tempted to add timestamps (wall clock) to each build ID to give users some extra bit of useful information.
Another nice bit of information would be identity and reason for each build ID but I'm hesitant to open this can of worms.


// If set, the worker is opting in to worker versioning. Otherwise, the version stamp is used as a marker for
// workflow reset points and the BuildId search attibute.
bool uses_versioning = 3;
Copy link
Member

Choose a reason for hiding this comment

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

hmm, I would think this flag should not be part of the stamp itself, but part of the requests that include a stamp

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, good point.

@bergundy bergundy changed the base branch from master to worker-versioning April 14, 2023 22:18
@bergundy
Copy link
Member Author

Changed the base branch to worker-versioning and merged.
Let's keep it all in the feature branch for now.

@bergundy
Copy link
Member Author

Comments still welcome of course.

@bergundy bergundy changed the title Remove version_set_id from CompatibleVersionSet Worker versioning related updates Apr 14, 2023
@bergundy bergundy merged commit 5df1833 into temporalio:worker-versioning Apr 14, 2023
@bergundy bergundy deleted the remove-id-from-compatible-set branch April 14, 2023 22:23
bergundy added a commit that referenced this pull request May 3, 2023
Decided not to expose (the yet unused) `CompatibleVersionSet.version_set_id`, the set will have multiple IDs internally.

The affected projects have been updated:
- [x] [Server PR](temporalio/temporal#4170)
- [x] [Go SDK PR](temporalio/sdk-go#1089)

Also added a `use_versioning` flag to `RespondWorkflowTaskCompletedRequest` to differentiate between the version stamp being used for versioning (matching) purposes or just as a marker.
Sushisource pushed a commit that referenced this pull request May 25, 2023
Decided not to expose (the yet unused) `CompatibleVersionSet.version_set_id`, the set will have multiple IDs internally.

The affected projects have been updated:
- [x] [Server PR](temporalio/temporal#4170)
- [x] [Go SDK PR](temporalio/sdk-go#1089)

Also added a `use_versioning` flag to `RespondWorkflowTaskCompletedRequest` to differentiate between the version stamp being used for versioning (matching) purposes or just as a marker.
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.

4 participants