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

Simplify history builder #4837

Merged

Conversation

vytautas-karpavicius
Copy link
Contributor

@vytautas-karpavicius vytautas-karpavicius commented May 19, 2022

What changed?
Simplify history builder by:

  • Removing redundant new<...> helper functions. Construct event directly in the Add<...> functions.
  • Initialize all event attributes using struct initialization syntax instead of setting them one by one.
  • Removed unused methods

Why?
Less code to maintain and easier to read.

How did you test it?
Purely refactoring. Existing tests.

Potential risks

Release notes

Documentation Changes

@vytautas-karpavicius vytautas-karpavicius marked this pull request as ready for review May 19, 2022 15:01
@vytautas-karpavicius vytautas-karpavicius requested a review from a team May 19, 2022 15:19
@coveralls
Copy link

coveralls commented May 19, 2022

Pull Request Test Coverage Report for Build 0180e038-1825-4400-983e-db88437cb661

  • 375 of 419 (89.5%) changed or added relevant lines in 1 file are covered.
  • 18 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.009%) to 56.858%

Changes Missing Coverage Covered Lines Changed/Added Lines %
service/history/execution/history_builder.go 375 419 89.5%
Files with Coverage Reduction New Missed Lines %
common/task/weightedRoundRobinTaskScheduler.go 1 88.6%
common/task/fifoTaskScheduler.go 4 83.51%
service/history/task/fetcher.go 4 86.15%
common/persistence/nosql/nosqlExecutionStore.go 9 60.03%
Totals Coverage Status
Change from base Build 0180dd57-a86d-49ac-b027-7918f6353dfa: 0.009%
Covered Lines: 83766
Relevant Lines: 147324

💛 - Coveralls

Copy link
Contributor

@mkolodezny mkolodezny left a comment

Choose a reason for hiding this comment

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

assuming you checked for "no usages found" of the removed API's

@vytautas-karpavicius vytautas-karpavicius merged commit 915a777 into uber:master May 20, 2022
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