dotnet / dotnet/arcade-services

vmr cherry-pick has poor UX when non-VMR branch of source repo is checked out

Open
#6,016 0 comments 0 reactions 0 assignees View on GitHub
Copilot suitable
Dominant language
C#
Stars
86
Forks
86
Avg merge
1d 8h
Merged PRs (30d)
35

Description

It looks like the cherry-pick command attempts to derive the repo mapping from the HEAD of the source repository. Let's say I had runtime's release/8.0 branch checked out. In this case, I get a cryptic error:

```
Cherry-pick operation failed: No mapping information found in Version.Details.xml Source section
```

This has two issues:
- It doesn't work
- The error doesn't make it clear what to do.

In this case, what appears to be going on is that the command is attempting to determine the VMR mapping from the source repo at HEAD. But since release/8.0 is checked out, it can't, and so it fails. It could use the mapping at the cherry-pick SHA instead. This might not be ideal in all cases (e.g. inter-version cherry-picks), so perhaps it should employ the following logic.
- Check at HEAD. If mapping, use that.
- Check at cherry-pick sha. If mapping available, use that.

If no mapping is found, the message needs to be more helpful. Most likely the user hasn't fetched the source commit, or has the wrong branch checked out, or is running from the wrong directory. The message should hint at proper usage.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.