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

Fix encoding of shadowing activities #600

Merged
merged 2 commits into from
Apr 9, 2021
Merged

Conversation

yux0
Copy link
Contributor

@yux0 yux0 commented Apr 7, 2021

  1. Fix shadower worker accessibility
  2. Fix shadowing activity encoding with golang
  3. Minor fixes in shadower worker

@yux0 yux0 requested review from yycptt and a team April 7, 2021 06:18
@coveralls
Copy link

coveralls commented Apr 7, 2021

Pull Request Test Coverage Report for Build 602

  • 95 of 106 (89.62%) changed or added relevant lines in 9 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.09%) to 71.792%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/com/uber/cadence/internal/shadowing/ReplayWorkflowActivityParams.java 7 8 87.5%
src/main/java/com/uber/cadence/internal/shadowing/ReplayWorkflowActivityResult.java 10 11 90.91%
src/main/java/com/uber/cadence/internal/shadowing/WorkflowExecution.java 16 17 94.12%
src/main/java/com/uber/cadence/worker/ShadowingWorker.java 9 10 90.0%
src/main/java/com/uber/cadence/internal/shadowing/ScanWorkflowActivityParams.java 16 18 88.89%
src/main/java/com/uber/cadence/internal/shadowing/ScanWorkflowActivityResult.java 7 9 77.78%
src/main/java/com/uber/cadence/internal/shadowing/ReplayWorkflowActivityImpl.java 17 20 85.0%
Files with Coverage Reduction New Missed Lines %
src/main/java/com/uber/cadence/internal/sync/WorkflowThreadImpl.java 1 77.2%
src/main/java/com/uber/cadence/internal/testservice/TestWorkflowMutableStateImpl.java 1 84.77%
Totals Coverage Status
Change from base Build 584: 0.09%
Covered Lines: 10636
Relevant Lines: 14815

💛 - Coveralls

.setSucceeded(successCount)
.setFailed(failedCount)
.setSkipped(skippedCount);
ReplayWorkflowActivityResult heartbeatResult = new ReplayWorkflowActivityResult();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: looks like we can reuse heartbeatResult defined above? no strong opinion on this, feel free to ignore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

.setSucceeded(successCount)
.setFailed(failedCount)
.setSkipped(skippedCount);
ReplayWorkflowActivityResult result = new ReplayWorkflowActivityResult();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: same here, looks like heartbeatResult can be reused.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@@ -34,6 +34,7 @@

public final class WorkflowShadower {
private static final long SLEEP_INTERVAL = 300L;
private static final int PAGE_SIZE = 1000;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think server has a default value to this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@@ -81,31 +88,31 @@
.build();
activityWorker =
new SyncActivityWorker(
client.getService(), client.getOptions().getDomain(), this.taskList, activityOptions);
client.getService(), shadowerConstants.LocalDomainName, this.taskList, activityOptions);
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@yux0 yux0 merged commit 6655ddc into uber:master Apr 9, 2021
@yux0 yux0 deleted the shadowing_fix branch April 9, 2021 16:42
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.

None yet

3 participants