chore: use branch lock files - #2178
Conversation
SummaryThe following content is AI-generated and provides a summary of the pull request: ContextWhat this PR does and why it is neededEnables pnpm branch lockfiles to reduce merge conflicts in the lockfile. Two settings are added to
This is an experimental change to evaluate whether it improves the developer experience by reducing frequent lockfile merge conflicts. Category: Chore
PR Bot InformationVersion:
|
|
@marikaner I also made a PR for this at some point I cannot find right now, but I think we would also need a workflow on main that actively merges the branch lockfiles. |
Co-authored-by: David Knaack <david.knaack@sap.com>
I expected that you already tried it 😊 |
We still definitely need a workflow that updates the lockfile on main, if there are branch lockfiles, right? without that it is possible that we have multiple branch lockfiles on main at the time of a release. |
|
@marikaner This could also be handled along the changelog updates. |
InjunPark-sap
left a comment
There was a problem hiding this comment.
LGTM. Two follow-ups before this settles:
- Merge workflow on main — as discussed, branch lockfiles will accumulate without it. Suggest tracking this as a follow-up PR (reference:SAP/cloud-sdk-js@48f453f87).
- CI --frozen-lockfile compat — worth verifying main CI doesn't fail after first branch lockfile is merged in.
There was a problem hiding this comment.
I looked into this now, and we have a workflow that also updates pnpm lock files pnpm-update.yml.
Since it also creates a branch, the lock file updates might be done in the branch specific lock file, and right now it is not staged.
Either that or we add bot/monthly-transitive-dependency-update* pattern to mergeGitBranchLockfilesBranchPattern.
As configured right now every renovate PR including lockfile updates should merge the lockfiles. |
I don't understand, only branches created by renovate merges the lockfile correct? I am talking about the workflow which updates transitive dependencies in lock files, that creates branches of style |
|
Ok I never removed |
Just read upon this, very cool, so we can remove the workflow. |
|
|
||
| gitBranchLockfile: true | ||
| mergeGitBranchLockfilesBranchPattern: | ||
| - main |
There was a problem hiding this comment.
[pp] I would prefer leaving out main, as any merged lockfile would not be committed back.
| - main |
Frozen Lockfiles do not appear to cause any issues on investigation.
While researching solutions to the pnpm merge conflicts we have, I found this: https://pnpm.io/git_branch_lockfiles
I would like to propose trying it out for a while and keep this setting if it doesn't cause problems.