eng/common/testproxy/scripts/resolve-asset-conflict/README.md
This script is intended to allow easy resolution of a conflicting assets.json file.
In most cases where two branches X and Y have progressed alongside each other, a simple
git checkout X && git merge Y can successfully merge other than the assets.json file.
That often will end up looking like this:
{
"AssetsRepo": "Azure/azure-sdk-assets-integration",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/storage/azure-storage-blob",
<<<<<<< HEAD
"Tag": "integration/example/storage_feature_addition2"
=======
"Tag": "integration/example/storage_feature_addition1"
>>>>>>> test-storage-tag-combination
}
This script uses git to tease out the source and target tags, then merge the incoming tag into the recordings of the base tag.
This script should only be used on an already conflicted assets.json file. Otherwise, no action will be executed.
pshell 6+](https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-windows)git available on your PATHtest-proxy available on your PATH
test-proxy is honored when the proxy is installed as a dotnet toolAzure.Sdk.Tools.TestProxy is honored when the standalone executable is on your PATHdotnet tool if both are present on the PATH.For simplicity when resolving merge-conflicts, invoke the script from the root of the repo. The help instructions from merge-asset-tags use paths relative from repo root.
# including context to get into a merge conflict
cd "path/to/language/repo/root"
git checkout base-branch
git merge target-branch
# auto resolve / merge conflicting tag values
./eng/common/testproxy/scripts/resolve-asset-conflict/resolve-asset-conflict.ps1 sdk/storage/azure-storage-blob/assets.json
# user pushes
test-proxy push -a sdk/storage/azure-storage-blob/assets.json
When an assets.json merge has conflicts on the test recordings side, the merge-proxy-tags script will exit with an error describing how to re-invoke the merge-proxy-tags script AFTER you resolve the conflicts.
cd into the assets location output by the scriptgit cherry-pick --continueAfterwards, re-invoke the merge-proxy-tags script with arguments given to you in original error. This will leave the assets in a touched state that can be test-proxy push-ed.