-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: when resolving dependencies the branch attribute should be preferred #310
fix: when resolving dependencies the branch attribute should be preferred #310
Conversation
Thanks for the contribution! Before we can merge this, we need @David-Polehonski to sign the Salesforce Inc. Contributor License Agreement. |
CLA has now been signed. |
@David-Polehonski - Thank you for the PR! I'll get this merged in but we should have a unit test for it. Should be pretty simple. I'd just copy the |
…rred when resolving package version dependencies the branch attribute of the dependency should be used to select the package version, not the branch name in parameter unless dependency doesn't specify a branch.
d950f3c
to
e94e753
Compare
@shetzel Thank you for the feedback; I have updated my initial commit to be signed/verified as I saw this was a missing requirement. I have also added a unit test; which I believe is as close to proving the feature works as I think I can get. Let me know what you think. |
Thanks @David-Polehonski - very much appreciate your contribution! 🎉 |
@David-Polehonski @shetzel @cristiand391 Our suggestion: Current fix by @David-Polehonski : Our concern is that current fix introduce a wrong behaviour if branch is specified for dependency explicitly as empty, e.g.:
In such case, if we create a package version from command line specifying branch key explicitly (e.g. |
When resolving package version dependencies the branch attribute of the dependency should be used to select the package version, not the branch name in the parameter unless the dependency doesn't specify a branch.
For example, my dependency below failed to resolve when building a package version because an equivalent build number (0.2.4.1) doesn't exist on branch
dev
when running the command:sf package version create -p myPackage -b dev -k redacted -w 30 --code-coverage
"dependencies": [ { "package": "myPackageDependency", "versionNumber": "0.2.4.1", "branch": "build" },
I have built and linked packages locally and can verify this patch resolved the issue.