## What changed?
add the `-tags=test_dep` to the VSCode launch configuration
## Why?
Debug fails with a build error
```sh
Build Error: go test -c -o /Users/seankane/git/github.com/temporalio/temporal/tests/__debug_bin1525033192 -gcflags all=-N -l .
# go.temporal.io/server/tests/testcore
testcore/onebox.go:204:39: undefined: testhooks.NewTestHooksImpl
testcore/onebox.go:857:23: undefined: testhooks.Set (exit status 1)
```
## How did you test it?
- [ ] built
- [X] run locally and tested manually
- [ ] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)
## Potential risks
No change to production code, only configuration
## What changed?
A new config entry to allow VSCode debugger to connect to a local
running instance of server.
## Why?
Makes it easy to quickly connect and breakpoint a dev server. No need to
restart the server in debugger everytime.
## How did you test it?
Tested it manually
## Potential risks
N/A
## Documentation
N/A
## Is hotfix candidate?
No
## What changed?
<!-- Describe what has changed in this PR -->
Added a new debug option for VSCode debugger
## Why?
<!-- Tell your future self why have you made these changes -->
This makes it easy to select and debug a single functional test.
## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
Manual check.
## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
N/A
## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->
N/A
## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
No
After 2dc removal we trigger a slightly different codepath on mysql
persistence when resetting workflows.
AppendHistoryNodes when called with IsNewBranch add both
history_tree metadata and history_node. This caused the problem
because history_node is already added when fork was called so
adding it again failed with duplicate error. Updated
AppendHistoryNodes api to upsert instead.
Another issue was with create workflow execution never expected
to be called with `CreateWorkflowModeContinueAsNew` mode. With
NDC now workflow reset is implemented in similar fashion as
doing continue as new. So removed the check to disallow
`CreateWorkflowModeContinueAsNew` on create execution and added
appropriate validation.