uber / cadence

Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.
https://cadenceworkflow.io
MIT License
7.97k stars 773 forks source link

Adopt Go toolchains for language-version-control #6063

Closed Groxx closed 1 month ago

Groxx commented 1 month ago

Go 1.21 brought us "toolchains": We can now describe the version we want, and the Go CLI will automagically download, install, and use that version, with no extra effort. It should give us a MUCH more reliable way to ensure identical builds and formats and whatnot, and all us devs will auto-switch as we jump between git SHAs.

So let's use that!

This does a few things:


For future upgrades, upgrading the toolchain should be very simple:

And temporarily trying a different version to check a bug / performance / try the new version is:

Groxx commented 1 month ago
❯ GOTOOLCHAIN=auto make
Makefile:46: warning: your Go toolchain is explicitly set to GOTOOLCHAIN=auto, ignoring go.work version go1.22.3...

which seems pretty good.

CI has a bunch of lines like

Makefile:46: warning: your Go toolchain is explicitly set to GOTOOLCHAIN=local, ignoring go.work version go1.22.3...

which could be handled more quietly by querying go version... but that'd potentially force a download before it responds, which could cause a big surprising lag if it happened on a dev's machine.

but maybe. or maybe there's a different, better option somewhere. not sure at the moment.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.01%. Comparing base (2f08de5) to head (aedc290).

Additional details and impacted files [see 8 files with indirect coverage changes](https://app.codecov.io/gh/uber/cadence/pull/6063/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/uber/cadence/pull/6063?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/uber/cadence/pull/6063?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). Last update [2f08de5...aedc290](https://app.codecov.io/gh/uber/cadence/pull/6063?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber).
coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 018fb74e-8f78-4b91-acc2-561eb11fc052

Details


Files with Coverage Reduction New Missed Lines %
service/history/queue/timer_queue_processor_base.go 1 77.66%
common/cache/lru.go 2 92.89%
service/history/replication/task_processor.go 2 81.25%
common/archiver/filestore/historyArchiver.go 4 80.95%
service/matching/tasklist/task_list_manager.go 4 76.09%
service/frontend/api/handler.go 6 62.2%
service/history/task/transfer_standby_task_executor.go 9 85.8%
service/history/engine/engineimpl/poll_mutable_state.go 9 74.16%
service/frontend/wrappers/metered/metered.go 9 63.18%
<!-- Total: 46 -->
Totals Coverage Status
Change from base Build 018facb4-1556-4d0a-a60a-2fec545c95e9: -0.02%
Covered Lines: 102502
Relevant Lines: 147479

💛 - Coveralls