renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
17.62k stars 2.32k forks source link

`automergeStrategy` `"squash"` doesn't work core:automerge platform:github #16814

Closed nicojs closed 2 years ago

nicojs commented 2 years ago

How are you running Renovate?

Mend Renovate hosted app on github.com

If you're self-hosting Renovate, tell us what version of Renovate you run.

No response

Please select which platform you are using if self-hosting.

github.com

If you're self-hosting Renovate, tell us what version of the platform you run.

No response

Was this something which used to work for you, and then stopped?

It used to work, and then stopped

Describe the bug

Setting automergeStrategy to "squash" doesn't have the expected result when platformAutomerge is enabled with the github provider.

Expected:

image

Actual:

image

Relevant debug logs

Logs ``` DEBUG: Processing 2 branches: renovate/lerna-monorepo, renovate/log4js-6.x DEBUG: Calculating hourly PRs remaining DEBUG: getPrList success { "pullsTotal": 115, "requestsTotal": 1, "apiQuotaAffected": true } DEBUG: currentHourStart=2022-07-27T14:00:00.000+00:00 DEBUG: PR hourly limit remaining: 2 DEBUG: Calculating prConcurrentLimit (10) DEBUG: getBranchPr(renovate/lerna-monorepo) DEBUG: findPr(renovate/lerna-monorepo, undefined, open) DEBUG: findPr(renovate/lerna-monorepo, undefined, closed) DEBUG: getBranchPr(renovate/log4js-6.x) DEBUG: findPr(renovate/log4js-6.x, undefined, open) DEBUG: Found PR #3628 DEBUG: 1 PRs are currently open DEBUG: PR concurrent limit remaining: 9 DEBUG: Calculated maximum PRs remaining this run { "prsRemaining": 2 } DEBUG: PullRequests limit = 2 DEBUG: Calculating hourly PRs remaining DEBUG: currentHourStart=2022-07-27T14:00:00.000+00:00 DEBUG: PR hourly limit remaining: 2 DEBUG: Calculating branchConcurrentLimit (10) DEBUG: 1 already existing branches found: renovate/log4js-6.x DEBUG: Branch concurrent limit remaining: 9 DEBUG: Calculated maximum branches remaining this run { "branchesRemaining": 2 } DEBUG: Branches limit = 2 DEBUG: getBranchPr(renovate/lerna-monorepo)(branch="renovate/lerna-monorepo") DEBUG: findPr(renovate/lerna-monorepo, undefined, open)(branch="renovate/lerna-monorepo") DEBUG: findPr(renovate/lerna-monorepo, undefined, closed)(branch="renovate/lerna-monorepo") DEBUG: branchExists=false(branch="renovate/lerna-monorepo") DEBUG: dependencyDashboardCheck=undefined(branch="renovate/lerna-monorepo") DEBUG: recreateClosed is false(branch="renovate/lerna-monorepo") DEBUG: findPr(renovate/lerna-monorepo, chore(deps): update dependency lerna to v5.3.0, !open)(branch="renovate/lerna-monorepo") DEBUG: prAlreadyExisted=false(branch="renovate/lerna-monorepo") DEBUG: Checking schedule(at any time, null)(branch="renovate/lerna-monorepo") DEBUG: No schedule defined(branch="renovate/lerna-monorepo") DEBUG: Setting current branch to master(branch="renovate/lerna-monorepo") DEBUG: Initializing git repository into /mnt/renovate/gh/stryker-mutator/stryker-js(branch="renovate/lerna-monorepo") DEBUG: Performing blobless clone(branch="renovate/lerna-monorepo") DEBUG: git clone completed(branch="renovate/lerna-monorepo") { "durationMs": 5397 } DEBUG: latest repository commit(branch="renovate/lerna-monorepo") { "latestCommit": { "hash": "0681092387a19fbc1776e7a2627ce1577cc2e2ef", "date": "2022-07-27T08:22:40+00:00", "message": "chore(deps): update typescript-eslint monorepo to v5.31.0 (#3653)", "refs": "HEAD -> master, origin/master, origin/HEAD", "body": "Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>", "author_name": "renovate[bot]", "author_email": "29139614+renovate[bot]@users.noreply.github.com" } } DEBUG: latest commit(branch="renovate/lerna-monorepo") { "branchName": "master", "latestCommitDate": "2022-07-27T08:22:40+00:00" } DEBUG: Branch needs creating(branch="renovate/lerna-monorepo") DEBUG: Using reuseExistingBranch: false(branch="renovate/lerna-monorepo") DEBUG: manager.getUpdatedPackageFiles() reuseExistinbranch=false(branch="renovate/lerna-monorepo") DEBUG: npm.updateDependency(): devDependencies.lerna = 5.3.0(branch="renovate/lerna-monorepo") DEBUG: Updating lerna in package.json(branch="renovate/lerna-monorepo") DEBUG: Updated 1 package files(branch="renovate/lerna-monorepo") DEBUG: Getting updated lock files(branch="renovate/lerna-monorepo") DEBUG: package.json has lerna lock file(branch="renovate/lerna-monorepo") DEBUG: Writing package.json files(branch="renovate/lerna-monorepo") { "packageFiles": [ "e2e/package.json", "package.json", "packages/api/package.json", "packages/core/package.json", "packages/cucumber-runner/package.json", "packages/grunt-stryker/package.json", "packages/instrumenter/package.json", "packages/jasmine-runner/package.json", "packages/jest-runner/package.json", "packages/jest-runner/testResources/exampleProjectWithDefaultJestConfig/package.json", "packages/jest-runner/testResources/exampleProjectWithExplicitJestConfig/package.json", "packages/jest-runner/testResources/jasmine2-jsdom-instrumented/package.json", "packages/jest-runner/testResources/jasmine2-jsdom/package.json", "packages/jest-runner/testResources/jasmine2-node-instrumented/package.json", "packages/jest-runner/testResources/jasmine2-node/package.json", "packages/karma-runner/package.json", "packages/mocha-runner/package.json", "packages/test-helpers/package.json", "packages/typescript-checker/package.json", "packages/util/package.json", "perf/package.json" ] } DEBUG: Writing e2e/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Massaging npm lock file before writing to disk(branch="renovate/lerna-monorepo") DEBUG: Writing packages/api/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing packages/core/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing packages/cucumber-runner/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing packages/grunt-stryker/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing packages/instrumenter/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing packages/jasmine-runner/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing packages/jest-runner/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing packages/karma-runner/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing packages/mocha-runner/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing packages/test-helpers/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing packages/typescript-checker/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing packages/util/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing perf/package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Writing any updated package files(branch="renovate/lerna-monorepo") DEBUG: Writing package.json(branch="renovate/lerna-monorepo") DEBUG: Finding package.json for lerna location "lerna.json"(branch="renovate/lerna-monorepo") DEBUG: npmrc file found in repository(branch="renovate/lerna-monorepo") DEBUG: Writing updated .npmrc file to .npmrc(branch="renovate/lerna-monorepo") DEBUG: Spawning lerna with npm to create lock files(branch="renovate/lerna-monorepo") DEBUG: Using node constraint ">=14.18.0" from package.json(branch="renovate/lerna-monorepo") DEBUG: Using lerna version 5.2.0(branch="renovate/lerna-monorepo") DEBUG: Using docker to execute(branch="renovate/lerna-monorepo") { "image": "node" } DEBUG: Found version constraint - checking for a compatible image to use(branch="renovate/lerna-monorepo") { "depName": "docker.io/renovate/node", "scheme": "node", "constraint": ">=14.18.0" } DEBUG: Filtering out unstable versions(branch="renovate/lerna-monorepo") DEBUG: Found compatible image version(branch="renovate/lerna-monorepo") { "depName": "docker.io/renovate/node", "scheme": "node", "constraint": ">=14.18.0", "version": "16.16.0" } DEBUG: Resolved tag constraint(branch="renovate/lerna-monorepo") { "image": "docker.io/renovate/node", "tagConstraint": ">=14.18.0", "tagVersioning": "node", "tag": "16.16.0" } DEBUG: Fetching Docker image: docker.io/renovate/node:16.16.0(branch="renovate/lerna-monorepo") DEBUG: Finished fetching Docker image docker.io/renovate/node:16.16.0@sha256:dfc6f5d8a32593133be29f098d53f36a49ef270b58eec97dcf10cc230ad37894(branch="renovate/lerna-monorepo") DEBUG: Executing command(branch="renovate/lerna-monorepo") { "command": "docker run --rm --name=renovate_node --label=renovate_child -v \"/mnt/renovate/gh/stryker-mutator/stryker-js\":\"/mnt/renovate/gh/stryker-mutator/stryker-js\" -v \"/tmp/renovate-cache\":\"/tmp/renovate-cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e BUILDPACK_CACHE_DIR -w \"/mnt/renovate/gh/stryker-mutator/stryker-js\" docker.io/renovate/node:16.16.0 bash -l -c \"npm i -g npm && hash -d npm 2>/dev/null || true && npm i -g lerna@5.2.0 && lerna info || echo \\\"Ignoring lerna info failure\\\" && npm install --ignore-scripts --no-audit --package-lock-only && lerna bootstrap --no-ci --ignore-scripts -- --ignore-scripts --no-audit --package-lock-only\"" } DEBUG: exec completed(branch="renovate/lerna-monorepo") { "cmd": "docker run --rm --name=renovate_node --label=renovate_child -v \"/mnt/renovate/gh/stryker-mutator/stryker-js\":\"/mnt/renovate/gh/stryker-mutator/stryker-js\" -v \"/tmp/renovate-cache\":\"/tmp/renovate-cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e BUILDPACK_CACHE_DIR -w \"/mnt/renovate/gh/stryker-mutator/stryker-js\" docker.io/renovate/node:16.16.0 bash -l -c \"npm i -g npm && hash -d npm 2>/dev/null || true && npm i -g lerna@5.2.0 && lerna info || echo \\\"Ignoring lerna info failure\\\" && npm install --ignore-scripts --no-audit --package-lock-only && lerna bootstrap --no-ci --ignore-scripts -- --ignore-scripts --no-audit --package-lock-only\"", "durationMs": 106705, "stdout": "\nadded 1 package, and audited 202 packages in 6s\n\nfound 0 vulnerabilities\n\nadded 616 packages, and audited 617 packages in 57s\n\nfound 0 vulnerabilities\n\n Environment info:\n\n System:\n OS: Linux 4.15 Ubuntu 20.04.4 LTS (Focal Fossa)\n CPU: (1) x64 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz\n Binaries:\n Node: 16.16.0 - /usr/local/bin/node\n npm: 8.15.0 - ~/.npm-global/bin/npm\n Utilities:\n Git: 2.37.1 - /usr/bin/git\n\n\nup to date in 11s\n", "stderr": "npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.\nlerna notice cli v5.2.0\nlerna notice cli v5.2.0\nlerna info Bootstrapping 12 packages\nlerna info Installing external dependencies\nlerna info Symlinking packages and binaries\nlerna success Bootstrapped 12 packages\n" } DEBUG: File is updated: package-lock.json(branch="renovate/lerna-monorepo") DEBUG: Updated 1 lock files(branch="renovate/lerna-monorepo") { "updatedArtifacts": [ "package-lock.json" ] } DEBUG: 2 file(s) to commit(branch="renovate/lerna-monorepo") DEBUG: Preparing files for committing to branch renovate/lerna-monorepo(branch="renovate/lerna-monorepo") DEBUG: Setting git author name(branch="renovate/lerna-monorepo") { "gitAuthorName": "Renovate Bot" } DEBUG: Setting git author email(branch="renovate/lerna-monorepo") { "gitAuthorEmail": "bot@renovateapp.com" } DEBUG: git commit(branch="renovate/lerna-monorepo") { "deletedFiles": [], "ignoredFiles": [], "result": { "author": null, "branch": "renovate/lerna-monorepo", "commit": "9b9fccce3b5fa23937946f2dff03ecbbe6037a3f", "root": false, "summary": { "changes": 2, "insertions": 1337, "deletions": 2448 } } } DEBUG: resetToCommit(0681092387a19fbc1776e7a2627ce1577cc2e2ef)(branch="renovate/lerna-monorepo") DEBUG: Fetching branch renovate/lerna-monorepo(branch="renovate/lerna-monorepo") INFO: Branch created(branch="renovate/lerna-monorepo") { "commitSha": "911d63161a05b5bb9a89f39df1162a5fb57b1794" } DEBUG: Ensuring PR(branch="renovate/lerna-monorepo") DEBUG: There are 0 errors and 0 warnings(branch="renovate/lerna-monorepo") DEBUG: getBranchPr(renovate/lerna-monorepo)(branch="renovate/lerna-monorepo") DEBUG: findPr(renovate/lerna-monorepo, undefined, open)(branch="renovate/lerna-monorepo") DEBUG: findPr(renovate/lerna-monorepo, undefined, closed)(branch="renovate/lerna-monorepo") DEBUG: resolveBranchStatus(branchName=renovate/lerna-monorepo, ignoreTests=false)(branch="renovate/lerna-monorepo") DEBUG: getBranchStatus(renovate/lerna-monorepo)(branch="renovate/lerna-monorepo") DEBUG: branch status check result(branch="renovate/lerna-monorepo") { "state": "pending", "statuses": [] } DEBUG: No check runs found(branch="renovate/lerna-monorepo") { "result": { "total_count": 0, "check_runs": [] } } DEBUG: Branch status yellow(branch="renovate/lerna-monorepo") DEBUG: Creating PR(branch="renovate/lerna-monorepo") { "prTitle": "chore(deps): update dependency lerna to v5.3.0" } DEBUG: Creating PR(branch="renovate/lerna-monorepo") { "title": "chore(deps): update dependency lerna to v5.3.0", "head": "stryker-mutator:renovate/lerna-monorepo", "base": "master", "draft": false } DEBUG: PR created(branch="renovate/lerna-monorepo") { "pr": 3656, "draft": false } DEBUG: Adding labels '' to #3656(branch="renovate/lerna-monorepo") DEBUG: GitHub-native automerge: success(branch="renovate/lerna-monorepo") { "prNumber": 3656 } INFO: PR created(branch="renovate/lerna-monorepo") { "pr": 3656, "prTitle": "chore(deps): update dependency lerna to v5.3.0" } DEBUG: resolveBranchStatus(branchName=renovate/lerna-monorepo, ignoreTests=false)(branch="renovate/lerna-monorepo") DEBUG: getBranchStatus(renovate/lerna-monorepo)(branch="renovate/lerna-monorepo") DEBUG: branch status check result(branch="renovate/lerna-monorepo") { "state": "pending", "statuses": [] } DEBUG: No check runs found(branch="renovate/lerna-monorepo") { "result": { "total_count": 0, "check_runs": [] } } DEBUG: Branch status yellow(branch="renovate/lerna-monorepo") DEBUG: Skipping assignees and reviewers as automerge=true(branch="renovate/lerna-monorepo") DEBUG: Created Pull Request #3656(branch="renovate/lerna-monorepo") DEBUG: PR is configured for automerge(branch="renovate/lerna-monorepo") DEBUG: Checking schedule(at any time, null)(branch="renovate/lerna-monorepo") DEBUG: No schedule defined(branch="renovate/lerna-monorepo") DEBUG: resolveBranchStatus(branchName=renovate/lerna-monorepo, ignoreTests=false)(branch="renovate/lerna-monorepo") DEBUG: getBranchStatus(renovate/lerna-monorepo)(branch="renovate/lerna-monorepo") DEBUG: branch status check result(branch="renovate/lerna-monorepo") { "state": "pending", "statuses": [] } DEBUG: No check runs found(branch="renovate/lerna-monorepo") { "result": { "total_count": 0, "check_runs": [] } } DEBUG: Branch status yellow(branch="renovate/lerna-monorepo") DEBUG: PR is not ready for merge (branch status is yellow)(branch="renovate/lerna-monorepo") ```

Have you created a minimal reproduction repository?

No reproduction, but I have linked to a public repo where it occurs

nicojs commented 2 years ago

I've answered "It used to work, and then stopped" instead of "I never saw it work", but I'm not 100% sure.

nicojs commented 2 years ago

Repository: https://github.com/stryker-mutator/stryker-js Config: https://github.com/stryker-mutator/stryker-js/blob/master/renovate.json Relevant PR (but might be merged later): https://github.com/stryker-mutator/stryker-js/pull/3656

rarkins commented 2 years ago

You have permitted merge commits on GitHub but your desire is that renovate's platform automerge always uses squash?

nicojs commented 2 years ago

Exactly. Would not allowing merge/rebase commits help?

rarkins commented 2 years ago

I think that should solve it. We use exclusively squash commits on this repo, for example

nicojs commented 2 years ago

Thanks for the help! ❤

Ok, I've changed that now. I was allowing rebases before, now not anymore. Still strange that that is needed. I would expect automerge strategy to work here.