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

Update internal timers to use NewTimerWithOptions #1618

Merged
merged 21 commits into from
Sep 10, 2024

Conversation

yuandrew
Copy link
Contributor

@yuandrew yuandrew commented Sep 3, 2024

What was changed

  • Change internal uses of NewTimer to NewTimerWithOptions
  • Created new AwaitWithTimeoutAndOption to allow specifying options for the underlying timer that's created

Why?

Because there's now a way to give a summary for internal timers, change internal code to use the new timer with summary command.

Checklist

  1. Closes Update internal timers to use NewTimerWithOptions and a summary #1602

  2. How was this tested:

  1. Any docs updates needed?

@yuandrew yuandrew requested a review from a team as a code owner September 3, 2024 21:27
internal/workflow.go Outdated Show resolved Hide resolved
internal/workflow.go Outdated Show resolved Hide resolved
internal/workflow.go Outdated Show resolved Hide resolved
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.

LGTM, may want to wait until @Quinn-With-Two-Ns's approval though

test/integration_test.go Outdated Show resolved Hide resolved
@cretz
Copy link
Member

cretz commented Sep 9, 2024

@yuandrew - Looks like you can merge if/when CI passes (I kicked it again, looks like flaky test)

@yuandrew
Copy link
Contributor Author

@cretz looks like there's a regression with the TestWorkerVersioningTestSuite/TestCommitRules test, looking to repro this locally

@yuandrew yuandrew merged commit 0fc83e9 into temporalio:master Sep 10, 2024
13 checks passed
@yuandrew yuandrew deleted the internal-timerwithoptions branch September 10, 2024 23:09
ReyOrtiz pushed a commit to ReyOrtiz/temporal-sdk-go that referenced this pull request Dec 5, 2024
* switch internal timers to use options, expose StaticSummary and StaticDetails

* plumb options through AwaitWithTimeout

* create new API, don't break existing API

* missed a spot to remove API change

* add experimental tag, fix test

* take out StaticSummary StaticDetails changes

* missed a few spots

* remove duplicate code

* cleaner code share

* AwaitOptions

* alias AwaitOptions in public package

* add unit test

* wip

* test works with prettifyString logging

* clean up

* no need for unit test now that we have better E2E test

* remove print
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.

Update internal timers to use NewTimerWithOptions and a summary
3 participants