Skip to content

Conversation

Shivs11
Copy link
Member

@Shivs11 Shivs11 commented May 8, 2025

What changed?

  • Added two new timestamps to signify when a version first/last receives traffic in the WorkerDeploymentVersionInfo and WorkerDeploymentInfo.
  • Added routing_update_time, current_since_time, ramping_since_time, DrainageInfo as part of VersionSummary.

Why?

  • Adding the two new timestamps shall allow operators to have more visibility into when a version gets activated/deactivated.
  • The reason fields from VersionLocalState were added to the VersionSummary is because the UI, right now, is querying a bunch of different places to get information about a specific version. This might be annoying and the aim of this PR is to make VersionSummary the source of truth for information related to a specific version. A nice cherry on top is that this shall also reduce the number of API calls to get information about a version.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

go.mod Outdated
@@ -177,3 +177,5 @@ require (
modernc.org/strutil v1.2.1 // indirect
modernc.org/token v1.1.0 // indirect
)

replace go.temporal.io/api => github.com/temporalio/api-go v1.48.1-0.20250508163833-6d907c430e54
Copy link
Contributor

Choose a reason for hiding this comment

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

revert before merging


// Preserve create_time and first_activation_time if they exist in current summary. This is to ensure that if the version
// had already been activated before, we don't override the first activation time by setting it to a wrong value.
if existingSummary := d.State.Versions[summary.GetVersion()]; existingSummary != nil && existingSummary.GetCreateTime() != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if existingSummary := d.State.Versions[summary.GetVersion()]; existingSummary != nil && existingSummary.GetCreateTime() != nil {
if existingSummary := d.State.Versions[summary.GetVersion()]; existingSummary.GetCreateTime() != nil {

Shivs11 added a commit to temporalio/api that referenced this pull request May 14, 2025
…on timestamps (#585)

_**READ BEFORE MERGING:** All PRs require approval by both Server AND
SDK teams before merging! This is why the number of required approvals
is "2" and not "1"--two reviewers from the same team is NOT sufficient.
If your PR is not approved by someone in BOTH teams, it may be summarily
reverted._

<!-- Describe what has changed in this PR -->
**What changed?**
- Added two new timestamps to signify when a version first/last receives
traffic in the `WorkerDeploymentVersionInfo` and `WorkerDeploymentInfo`.
Added missing fields from VersionLocalState that were not present in
VersionSummary.


<!-- Tell your future self why have you made these changes -->
**Why?**
- Adding the two new timestamps shall allow operators to have more
visibility into when a version gets activated/deactivated.
- The reason fields from `VersionLocalState` were added to the
`VersionSummary` is because the UI, right now, is querying a bunch of
different places to get information about a specific version. This might
be annoying and the aim of this PR is to make VersionSummary the source
of truth for information related to a specific version. A nice cherry on
top is that this shall also reduce the number of API calls to get
information about a version.


<!-- Are there any breaking changes on binary or code level? -->
**Breaking changes**
- None


<!-- If this breaks the Server, please provide the Server PR to merge
right after this PR was merged. -->
**Server PR**
- temporalio/temporal#7736)
@Shivs11 Shivs11 enabled auto-merge (squash) May 14, 2025 20:42
temporal-cicd bot pushed a commit to temporalio/api-go that referenced this pull request May 14, 2025
…on timestamps (#585)

_**READ BEFORE MERGING:** All PRs require approval by both Server AND
SDK teams before merging! This is why the number of required approvals
is "2" and not "1"--two reviewers from the same team is NOT sufficient.
If your PR is not approved by someone in BOTH teams, it may be summarily
reverted._

<!-- Describe what has changed in this PR -->
**What changed?**
- Added two new timestamps to signify when a version first/last receives
traffic in the `WorkerDeploymentVersionInfo` and `WorkerDeploymentInfo`.
Added missing fields from VersionLocalState that were not present in
VersionSummary.

<!-- Tell your future self why have you made these changes -->
**Why?**
- Adding the two new timestamps shall allow operators to have more
visibility into when a version gets activated/deactivated.
- The reason fields from `VersionLocalState` were added to the
`VersionSummary` is because the UI, right now, is querying a bunch of
different places to get information about a specific version. This might
be annoying and the aim of this PR is to make VersionSummary the source
of truth for information related to a specific version. A nice cherry on
top is that this shall also reduce the number of API calls to get
information about a version.

<!-- Are there any breaking changes on binary or code level? -->
**Breaking changes**
- None

<!-- If this breaks the Server, please provide the Server PR to merge
right after this PR was merged. -->
**Server PR**
- temporalio/temporal#7736)
@Shivs11 Shivs11 merged commit 91618c2 into main May 14, 2025
56 checks passed
@Shivs11 Shivs11 deleted the ss/new-timestamps-and-sync-with-version-local-state branch May 14, 2025 21:31
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.

2 participants