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 client wrappers with new async APIs #1327

Conversation

taylanisikdemir
Copy link
Member

What changed?
Updating client wrappers to expose new async methods.

  • SignalWithStartWorkflowExecutionAsync
  • StartWorkflowExecutionAsync

These changes were missed in #1321.

How did you test it?
Unit test

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Merging #1327 (2a5e110) into master (68afcb9) will increase coverage by 0.31%.
The diff coverage is 87.87%.

Additional details and impacted files
Files Coverage Δ
internal/client.go 61.38% <ø> (ø)
internal/workflow.go 77.44% <ø> (ø)
internal/internal_workflow_client.go 63.62% <87.87%> (+4.80%) ⬆️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68afcb9...2a5e110. Read the comment docs.

Groxx added a commit that referenced this pull request Apr 1, 2024
Seems like this has been left un-pinned and un-documented for a long time.
Might as well fix that, so we can address the new async APIs in e.g. #1327 in a standardized way.
@taylanisikdemir taylanisikdemir force-pushed the taylan/update_clients_with_async_apis branch from 5740ef6 to 701e780 Compare April 1, 2024 21:38
@coveralls
Copy link

coveralls commented Apr 1, 2024

Pull Request Test Coverage Report for Build 018e9ca6-a094-49e0-99cd-bf58edb8502c

Details

  • 182 of 242 (75.21%) changed or added relevant lines in 2 files are covered.
  • 16 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.02%) to 64.687%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/internal_workflow_client.go 182 202 90.1%
mocks/Client.go 0 40 0.0%
Files with Coverage Reduction New Missed Lines %
internal/internal_workflow_client.go 1 79.68%
internal/common/util/util.go 2 53.85%
internal/compatibility/thrift/enum.go 4 21.2%
internal/compatibility/thrift/types.go 9 48.42%
Totals Coverage Status
Change from base Build 018e9b74-9b30-4551-ad2c-6499bdf01cbf: 0.02%
Covered Lines: 13376
Relevant Lines: 20678

💛 - Coveralls

internal/workflow.go Outdated Show resolved Hide resolved
Copy link
Contributor

@Groxx Groxx left a comment

Choose a reason for hiding this comment

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

gonna request some relatively minor things, as there's some odd inconsistencies / unrelated checks / tests that don't really test anything.
generally: tackle what you want / what you agree with, since a moderate amount of the comments are fuzzy.

overall looks good though, should be an easy re-review. and I'm curious if you have any reasons for/against adding another metrics tag for async APIs.

internal/internal_workflow_client.go Outdated Show resolved Hide resolved
internal/internal_workflow_client.go Outdated Show resolved Hide resolved
internal/internal_workflow_client.go Outdated Show resolved Hide resolved
internal/internal_workflow_client_test.go Outdated Show resolved Hide resolved
internal/internal_workflow_client_test.go Show resolved Hide resolved
internal/internal_workflow_client_test.go Outdated Show resolved Hide resolved
internal/internal_workflow_client_test.go Outdated Show resolved Hide resolved
internal/internal_workflow_client_test.go Outdated Show resolved Hide resolved
internal/internal_workflow_client_test.go Show resolved Hide resolved
internal/internal_workflow_client_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@Groxx Groxx left a comment

Choose a reason for hiding this comment

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

I'll make a task or something for the followups 👍 I might just tackle that today.

@taylanisikdemir taylanisikdemir merged commit 08b284a into cadence-workflow:master Apr 2, 2024
13 checks passed
@taylanisikdemir taylanisikdemir deleted the taylan/update_clients_with_async_apis branch April 2, 2024 20:11
Groxx added a commit that referenced this pull request Apr 5, 2024
Followups from #1327:

1. simplifying the memo/search-attr encoding tests
2. making sure the dataconverter tests can detect correct vs incorrect encoder use 

1 is pretty simple: memos and search attrs are ALWAYS JSON because the server must interpret them, so the exact bytes should not change in the future.  A hardcoded string is easy to verify, and strengthens the guarantee that "this should not change even if other encoding changes".

2 is more interesting: as originally written, the test would still pass if the custom dataconverter was *not* saved and used.
The type-assertion to check the internal field somewhat prevents that, but it's unnecessary and a disjointed check.
So it has been rewritten: now the serialized request bytes must clearly come from the test encoder, not the default encoder, and they must be detectably different.
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