uber-go / cadence-client

Framework for authoring workflows and activities running on top of the Cadence orchestration engine.
https://cadenceworkflow.io
MIT License
345 stars 131 forks source link

SDK v2 folder #1109

Closed vytautas-karpavicius closed 3 years ago

vytautas-karpavicius commented 3 years ago

What changed? This is a raw copy of current repo to v2 folder. The result was obtained with the following commands:

git checkout -b sdk-v2-folder
git checkout -b duplicate-v2
mkdir v2

git mv $(ls | grep -v v2) .gen v2
git commit -m "Duplicated all files to v2"
git checkout HEAD~ $(ls -A v2) .gen
git commit -m "Restore original v1"
git checkout -
git merge --no-ff duplicate-v2

vim .gitmodules # Fix back idls submodule after git mv
git add .gitmodules
git commit -m "Revert .gitmodules after git mv"

vim Makefile # Do not test v2 from v1
git add Makefile
git commit -m "Do not test v2 from v1"

The technique here is required to preserve git history in the copied files. As described in https://stackoverflow.com/a/46484848

Why? Preparing for the next major v2 release with breaking changes.

An alternative approach for v2 subfolder is using another branch. However it does not fit with legacy Go tooling that are not version aware. More info: https://blog.golang.org/v2-go-modules#TOC_3.

How did you test it? N/A - Only raw copy, nothing else is updated

Next steps The following is planned next:

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 3490f712-c854-430d-b4e5-7b380fbbf22b


Files with Coverage Reduction New Missed Lines %
internal/common/convert.go 3 84.62%
<!-- Total: 3 -->
Totals Coverage Status
Change from base Build 2781c5c3-8268-4759-b4e3-e01e72b502c5: -0.01%
Covered Lines: 11711
Relevant Lines: 16584

💛 - Coveralls
vytautas-karpavicius commented 3 years ago

Closing this as entire copy of a repo would be too difficult to maintain. Next plan is to do v2 with only public api surface changes and reuse internals between v1 and v2.