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

Make internal execution info consistent with public API #6860

Merged
merged 4 commits into from
Nov 21, 2024

Conversation

ShahabT
Copy link
Collaborator

@ShahabT ShahabT commented Nov 21, 2024

What changed?

Update internal MS versioning info to be consistent with what is defined in the public API.

Why?

How did you test it?

Potential risks

Documentation

Is hotfix candidate?

@ShahabT ShahabT requested review from alexshtin and carlydf November 21, 2024 08:00
@ShahabT ShahabT requested a review from a team as a code owner November 21, 2024 08:00
@ShahabT ShahabT changed the title Make internal execution info consistent with public Make internal execution info consistent with public API Nov 21, 2024
// completes and the workflow's deployment (or versioning override) is updated.
DeploymentTransition deployment_transition = 4;

message DeploymentTransition {
Copy link
Member

Choose a reason for hiding this comment

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

Just to double check: all these embedded messages are not use outside of persistence layer, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah but they were also copied in the public API. Now I made the public ones flat and reusing them in here.

// GetEffectiveVersioningBehavior returns the effective versioning behavior.
// VersioningOverride.Behavior, if set, takes precedence over Behavior.
GetEffectiveVersioningBehavior() enumspb.VersioningBehavior
GetOngoingDeploymentTransition() *persistencespb.WorkflowExecutionInfo_VersioningInfo_DeploymentTransition
Copy link
Member

Choose a reason for hiding this comment

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

Previously I tried very hard to avoid types like this and never used nested messages. I don't have strong opinion on it now, but this long path doesn't look nice.

Copy link
Member

Choose a reason for hiding this comment

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

Transition is always ongoing. I think you can remove word "Ongoing" without loosing the meaning.

Copy link
Contributor

Choose a reason for hiding this comment

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

agree with this. also, having both GetDeploymentTransition and GetOngoingDeploymentTransition makes the reader wonder "is there a difference between the two" when there is really not?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Made the messages flat.

Comment on lines 407 to 409
// DeploymentTransition.Deployment takes precedence over VersioningOverride.Deployment,
// over Deployment. VersioningOverride.Deployment is only considered if the override
// behavior is PINNED.
Copy link
Member

Choose a reason for hiding this comment

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

As a person who have less context, I don't understand what is precedence what. I can guess where DeploymentTransition.Deployment is coming from (because there are methods below), but other two don't clarify anything. Just saying.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

improved the comments

@@ -3165,7 +3165,7 @@ func (wh *WorkflowHandler) GetCurrentDeployment(ctx context.Context, request *wo

describeDeploymentResponse, err := wh.deploymentStoreClient.GetCurrentDeployment(ctx, namespaceEntry, request.SeriesName)
Copy link
Contributor

Choose a reason for hiding this comment

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

should this function be called GetEffectiveDeployment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No this does not have to do with workflow execution, it's for current deployment within a deployment series.

@ShahabT ShahabT merged commit 00745c6 into versioning-3 Nov 21, 2024
7 of 8 checks passed
@ShahabT ShahabT deleted the shahab/ms-versioning-info branch November 21, 2024 22:43
dnr pushed a commit that referenced this pull request Nov 26, 2024
## What changed?
<!-- Describe what has changed in this PR -->
Update internal MS versioning info to be consistent with what is defined
in [the public API](https://github.com/temporalio/api/pull/487/files).

## Why?
<!-- Tell your future self why have you made these changes -->

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
dnr pushed a commit that referenced this pull request Nov 26, 2024
## What changed?
<!-- Describe what has changed in this PR -->
Update internal MS versioning info to be consistent with what is defined
in [the public API](https://github.com/temporalio/api/pull/487/files).

## Why?
<!-- Tell your future self why have you made these changes -->

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
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