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

Minor splitting of mutable state builder file #5990

Conversation

davidporter-id-au
Copy link
Member

@davidporter-id-au davidporter-id-au commented May 8, 2024

What changed?

This takes the methods of the MutableState implementation and subdevides them along conceptually thematic subfiles. For example all DecisionTask methods are put into one file, with ActivityTask ones in another. This isn't a complete splitting, the MutableState impl file still has a lot of smaller helper methods which I haven't bothered to refine further.

Why?

This is a minor refactor simply splitting the mutable-state-builder file into a few smaller files simply for tractability. It's not the desired end-state refactor I'd like to do, but unblocks other engineers from being able to pick up testing for this builder with less friction.

How did you test it?

Unit tests should cover this refactor. I've been careful to not do anything other than just move content between files.

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented May 8, 2024

Codecov Report

Attention: Patch coverage is 39.19098% with 917 lines in your changes are missing coverage. Please review.

Project coverage is 65.81%. Comparing base (0b71cd9) to head (117c0b1).
Report is 1 commits behind head on master.

❗ Current head 117c0b1 differs from pull request most recent head de51b67. Consider uploading reports for the commit de51b67 to get more accurate results

Additional details and impacted files
Files Coverage Δ
service/history/execution/mutable_state_builder.go 58.63% <81.25%> (+11.53%) ⬆️
...xecution/mutable_state_builder_methods_timedout.go 66.66% <66.66%> (ø)
...ecution/mutable_state_builder_methods_completed.go 69.23% <69.23%> (ø)
...tion/mutable_state_builder_methods_cancellation.go 56.48% <56.48%> (ø)
...execution/mutable_state_builder_methods_started.go 71.25% <71.25%> (ø)
...y/execution/mutable_state_builder_methods_timer.go 49.64% <49.64%> (ø)
...xecution/mutable_state_builder_methods_decision.go 43.24% <43.24%> (ø)
.../execution/mutable_state_builder_methods_signal.go 12.96% <12.96%> (ø)
...xecution/mutable_state_builder_methods_activity.go 37.12% <37.12%> (ø)
...on/mutable_state_builder_methods_child_workflow.go 10.39% <10.39%> (ø)

... and 7 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 94b8305...de51b67. Read the comment docs.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 018f5bb1-52fc-4158-a768-31c2b1a1a69e

Details

  • 1337 of 1979 (67.56%) changed or added relevant lines in 10 files are covered.
  • 294 unchanged lines in 15 files lost coverage.
  • Overall coverage decreased (-0.01%) to 68.518%

Changes Missing Coverage Covered Lines Changed/Added Lines %
service/history/execution/mutable_state_builder_methods_timedout.go 18 24 75.0%
service/history/execution/mutable_state_builder_methods_started.go 196 214 91.59%
service/history/execution/mutable_state_builder_methods_completed.go 68 89 76.4%
service/history/execution/mutable_state_builder_methods_signal.go 112 151 74.17%
service/history/execution/mutable_state_builder_methods_decision.go 153 195 78.46%
service/history/execution/mutable_state_builder_methods_cancellation.go 102 145 70.34%
service/history/execution/mutable_state_builder_methods_timer.go 124 185 67.03%
service/history/execution/mutable_state_builder_methods_child_workflow.go 227 430 52.79%
service/history/execution/mutable_state_builder_methods_activity.go 301 510 59.02%
Files with Coverage Reduction New Missed Lines %
service/history/queue/timer_queue_processor_base.go 1 78.28%
common/task/weighted_round_robin_task_scheduler.go 2 88.06%
common/task/fifo_task_scheduler.go 2 87.63%
common/util.go 2 91.78%
service/matching/taskListManager.go 2 81.16%
service/history/execution/mutable_state_util.go 2 78.52%
service/history/task/task.go 3 84.81%
service/history/task/timer_standby_task_executor.go 3 85.63%
service/history/task/transfer_standby_task_executor.go 4 86.21%
service/history/execution/cache.go 6 74.61%
Totals Coverage Status
Change from base Build 018f59eb-9a95-48c7-ad8f-8dec79b24f38: -0.01%
Covered Lines: 100640
Relevant Lines: 146882

💛 - Coveralls

@davidporter-id-au davidporter-id-au enabled auto-merge (squash) May 9, 2024 05:31
@davidporter-id-au davidporter-id-au merged commit 2dae5cc into cadence-workflow:master May 9, 2024
17 of 18 checks passed
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