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.09k stars 2.22k forks source link

yarnDedupeFewer runs even if no change was made to package.json #10050

Closed onigoetz closed 3 years ago

onigoetz commented 3 years ago

What Renovate type, platform and version are you using?

Renovate type

Renovate platform

Renovate version (if self hosting)

I'm self hosting Renovate with version: 24.78.1

Describe the bug

Renovate created a PR on one of my repositories. since it's running on a schedule. on the second run it would force push a change that only contains 3 lines changed in yarn.lock On the third run it will re-apply the change to the package.json as well. On the fourth run ... you guessed it, I get only a yarn.lock

I do have a hunch on why this is happening: reuseExistingBranch: true is enabled, and on the second run it doesn't change anything (as the changes were made on the previous run, the package.json file is already up-to-date so no change is made (DEBUG: No package files need updating (repository=sq/sq-hub-web, branch=renovate/all-minor-patch)) But then it still runs Performing yarn dedupe fewer

My 2 cents would be to skip yarn dedupe fewer when no change was made to the package.json, maybe I don't have the full story and that wouldn't work.

See logs below

Relevant debug logs

Logs for a run that works properly ``` DEBUG: Found PR #132 (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Returning from graphql open PR list (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Branch is up-to-date (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Branch does not need rebasing (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Using reuseExistingBranch: true (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: manager.getUpdatedPackageFiles() reuseExistinbranch=true (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: npm.updateDependency(): dependencies.@antv/g6 = 4.3.0 (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Need to update package file so will rebase first (repository=sq/sq-hub-web, packageFile=package.json, branch=renovate/all-minor-patch) "depName": "@antv/g6" DEBUG: manager.getUpdatedPackageFiles() reuseExistinbranch=false (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: npm.updateDependency(): dependencies.@antv/g6 = 4.3.0 (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Updating @antv/g6 in package.json (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: npm.updateDependency(): dependencies.@octokit/graphql = 4.6.2 (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Updating @octokit/graphql in package.json (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: npm.updateDependency(): dependencies.@types/node = ^14.14.9 (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: npm.updateDependency(): dependencies.dotenv = 9.0.2 (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Updating dotenv in package.json (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: npm.updateDependency(): dependencies.next-transpile-modules = 7.1.0 (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Updating next-transpile-modules in package.json (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Updating com.github.eirslett:frontend-maven-plugin in pom.xml (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Updated 2 package files (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Getting updated lock files (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Writing package.json files (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "packageFiles": ["package.json"] DEBUG: Writing any updated package files (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Writing package.json (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: No npmrc file found in repository (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Writing updated .npmrc file to /tmp/renovate/repos/github/sq/sq-hub-web/.npmrc (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Generating yarn.lock for . (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Spawning yarn install to create /tmp/renovate/repos/github/sq/sq-hub-web/yarn.lock (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Updating yarn.lock only - skipping node_modules (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: No node constraint found - using latest (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Performing lockfileUpdate (yarn) (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Performing yarn dedupe fewer (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Executing command (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "command": "yarn install --ignore-engines --ignore-platform --network-timeout 100000" DEBUG: exec completed (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "cmd": "yarn install --ignore-engines --ignore-platform --network-timeout 100000", "durationMs": 138593, "stdout": "yarn install v1.22.10\n[1/4] Resolving packages...\n[2/4] Fetching packages...\n[3/4] Linking dependencies...\n[4/4] Building fresh packages...\nsuccess Saved lockfile.\nDone in 137.75s.\n", "stderr": "warning package.json: No license field\nwarning No license field\nwarning mini-css-extract-plugin@0.4.3: Invalid bin field for \"mini-css-extract-plugin\".\nwarning \"@swissquote/crafty-preset-eslint > eslint-loader@4.0.2\" has unmet peer dependency \"webpack@^4.0.0 || ^5.0.0\".\nwarning \"@swissquote/crafty-preset-eslint > @swissquote/rollup-plugin-eslint > @rollup/pluginutils@4.1.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@swissquote/crafty-preset-typescript > @rollup/plugin-babel@5.3.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@swissquote/crafty-preset-typescript > babel-loader@8.2.2\" has unmet peer dependency \"webpack@>=2\".\nwarning \"@swissquote/crafty-preset-typescript > rollup-plugin-typescript2@0.30.0\" has unmet peer dependency \"rollup@>=1.26.3\".\nwarning \"@swissquote/crafty-preset-typescript > ts-jest@26.5.3\" has unmet peer dependency \"jest@>=26 <27\".\nwarning \"@swissquote/crafty-preset-typescript > ts-loader@8.0.17\" has unmet peer dependency \"webpack@*\".\nwarning \"@swissquote/crafty-preset-typescript > @rollup/plugin-babel > @rollup/pluginutils@3.1.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@zeit/next-css > css-loader@1.0.0\" has unmet peer dependency \"webpack@^4.0.0\".\nwarning \"@zeit/next-css > mini-css-extract-plugin@0.4.3\" has unmet peer dependency \"webpack@^4.4.0\".\nwarning \"sq-web-components-core-react > create-react-context@0.3.0\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > react-swipeable@4.3.2\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0\".\nwarning \"sq-web-components-core-react > react-swipeable-views@0.13.9\" has incorrect peer dependency \"react@^15.3.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > sq-web-icons@1.1.33\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > react-swipeable-views > react-swipeable-views-utils > react-event-listener@0.6.6\" has incorrect peer dependency \"react@^16.3.0\".\n" DEBUG: Executing command (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "command": "yarn upgrade @types/node --ignore-engines --ignore-platform --network-timeout 100000" DEBUG: exec completed (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "cmd": "yarn upgrade @types/node --ignore-engines --ignore-platform --network-timeout 100000", "durationMs": 22769, "stdout": "yarn upgrade v1.22.10\n[1/4] Resolving packages...\n[2/4] Fetching packages...\n[3/4] Linking dependencies...\n[4/4] Rebuilding all packages...\nsuccess Saved lockfile.\nsuccess Saved 1 new dependency.\ninfo Direct dependencies\n└─ @types/node@14.14.45\ninfo All dependencies\n└─ @types/node@14.14.45\nDone in 22.32s.\n", "stderr": "warning package.json: No license field\nwarning No license field\nwarning No license field\nwarning No license field\nwarning \"@swissquote/crafty-preset-eslint > eslint-loader@4.0.2\" has unmet peer dependency \"webpack@^4.0.0 || ^5.0.0\".\nwarning \"@swissquote/crafty-preset-eslint > @swissquote/rollup-plugin-eslint > @rollup/pluginutils@4.1.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@swissquote/crafty-preset-typescript > @rollup/plugin-babel@5.3.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@swissquote/crafty-preset-typescript > babel-loader@8.2.2\" has unmet peer dependency \"webpack@>=2\".\nwarning \"@swissquote/crafty-preset-typescript > rollup-plugin-typescript2@0.30.0\" has unmet peer dependency \"rollup@>=1.26.3\".\nwarning \"@swissquote/crafty-preset-typescript > ts-jest@26.5.3\" has unmet peer dependency \"jest@>=26 <27\".\nwarning \"@swissquote/crafty-preset-typescript > ts-loader@8.0.17\" has unmet peer dependency \"webpack@*\".\nwarning \"@swissquote/crafty-preset-typescript > @rollup/plugin-babel > @rollup/pluginutils@3.1.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@zeit/next-css > css-loader@1.0.0\" has unmet peer dependency \"webpack@^4.0.0\".\nwarning \"@zeit/next-css > mini-css-extract-plugin@0.4.3\" has unmet peer dependency \"webpack@^4.4.0\".\nwarning \"sq-web-components-core-react > create-react-context@0.3.0\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > react-swipeable@4.3.2\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0\".\nwarning \"sq-web-components-core-react > react-swipeable-views@0.13.9\" has incorrect peer dependency \"react@^15.3.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > sq-web-icons@1.1.33\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > react-swipeable-views > react-swipeable-views-utils > react-event-listener@0.6.6\" has incorrect peer dependency \"react@^16.3.0\".\nwarning No license field\n" DEBUG: Executing command (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "command": "npx yarn-deduplicate --strategy fewer" DEBUG: exec completed (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "cmd": "npx yarn-deduplicate --strategy fewer", "durationMs": 3716, "stdout": "", "stderr": "npx: installed 6 in 2.804s\n" DEBUG: Executing command (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "command": "yarn install --ignore-engines --ignore-platform --network-timeout 100000" DEBUG: exec completed (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "cmd": "yarn install --ignore-engines --ignore-platform --network-timeout 100000", "durationMs": 11598, "stdout": "yarn install v1.22.10\n[1/4] Resolving packages...\n[2/4] Fetching packages...\n[3/4] Linking dependencies...\n[4/4] Building fresh packages...\nDone in 11.19s.\n", "stderr": "warning package.json: No license field\nwarning No license field\nwarning \"@swissquote/crafty-preset-eslint > eslint-loader@4.0.2\" has unmet peer dependency \"webpack@^4.0.0 || ^5.0.0\".\nwarning \"@swissquote/crafty-preset-eslint > @swissquote/rollup-plugin-eslint > @rollup/pluginutils@4.1.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@swissquote/crafty-preset-typescript > @rollup/plugin-babel@5.3.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@swissquote/crafty-preset-typescript > babel-loader@8.2.2\" has unmet peer dependency \"webpack@>=2\".\nwarning \"@swissquote/crafty-preset-typescript > rollup-plugin-typescript2@0.30.0\" has unmet peer dependency \"rollup@>=1.26.3\".\nwarning \"@swissquote/crafty-preset-typescript > ts-jest@26.5.3\" has unmet peer dependency \"jest@>=26 <27\".\nwarning \"@swissquote/crafty-preset-typescript > ts-loader@8.0.17\" has unmet peer dependency \"webpack@*\".\nwarning \"@swissquote/crafty-preset-typescript > @rollup/plugin-babel > @rollup/pluginutils@3.1.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@zeit/next-css > css-loader@1.0.0\" has unmet peer dependency \"webpack@^4.0.0\".\nwarning \"@zeit/next-css > mini-css-extract-plugin@0.4.3\" has unmet peer dependency \"webpack@^4.4.0\".\nwarning \"sq-web-components-core-react > create-react-context@0.3.0\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > react-swipeable@4.3.2\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0\".\nwarning \"sq-web-components-core-react > react-swipeable-views@0.13.9\" has incorrect peer dependency \"react@^15.3.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > sq-web-icons@1.1.33\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > react-swipeable-views > react-swipeable-views-utils > react-event-listener@0.6.6\" has incorrect peer dependency \"react@^16.3.0\".\n" DEBUG: yarn.lock needs updating (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) ... DEBUG: 3 file(s) to commit (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Committing files to branch renovate/all-minor-patch (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: git commit (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "result": { "author": null, "branch": "renovate/all-minor-patch", "commit": "c004264", "root": false, "summary": {"changes": 3, "insertions": 52, "deletions": 52} } ```
Git diff that worked properly ``` From c0042643c6f2f6c3be790ac1360182b41ac57fe2 Mon Sep 17 00:00:00 2001 From: Renovate Date: Tue, 18 May 2021 09:21:04 +0000 Subject: [PATCH] Update all non-major dependencies --- package.json | 8 ++--- pom.xml | 2 +- yarn.lock | 94 ++++++++++++++++++++++++++-------------------------- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index 7a9e38f..9634982 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "dependencies": { - "@antv/g6": "4.2.7", + "@antv/g6": "4.3.0", "@octokit/auth-app": "3.4.0", - "@octokit/graphql": "4.6.1", + "@octokit/graphql": "4.6.2", "@octokit/rest": "18.5.3", "@sentry/node": "5.30.0", "@swissquote/crafty": "1.14.0", @@ -16,7 +16,7 @@ "async-parallel": "1.2.3", "cache-manager": "3.4.3", "decimal.js": "10.2.1", - "dotenv": "9.0.1", + "dotenv": "9.0.2", "express": "4.17.1", "js-yaml": "4.1.0", "loud-rejection": "2.2.0", @@ -24,7 +24,7 @@ "neo4j-driver": "4.2.3", "next": "10.2.0", "next-compose-plugins": "2.2.1", - "next-transpile-modules": "7.0.0", + "next-transpile-modules": "7.1.0", "openapi-client": "1.0.5", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/pom.xml b/pom.xml index 0afc1ba..e9e6523 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ com.github.eirslett frontend-maven-plugin - 1.11.3 + 1.12.0 ${project.basedir} diff --git a/yarn.lock b/yarn.lock index dd547e4..57c03bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,10 +9,10 @@ dependencies: tinycolor2 "^1.4.1" -"@antv/algorithm@0.1.8-beta.6": - version "0.1.8-beta.6" - resolved "https://.../repository/npm/@antv/algorithm/-/algorithm-0.1.8-beta.6.tgz#2e02dcf3494afea0b470dce399d41d07305c1184" - integrity sha512-NlJt4afQBK2t6m1E71OXNrvmKfpjEqUn61sk5M60eGua5xZgmiOLT4RTCHfU22xTGd5fW2oY8p/D98+jsFCncg== +"@antv/algorithm@^0.1.8": + version "0.1.8" + resolved "https://.../repository/npm/@antv/algorithm/-/algorithm-0.1.8.tgz#ddd870f2a6a087240cebefe847b4500cbc1004ba" + integrity sha512-pR0zFfncqlNTZ2m5DjKfrrlNDcQrOCerg5G5aSpspGcls1+j+IWl8YD4IigWxGt0DQX8CzqjZpDujivSJ9UsTA== dependencies: "@antv/util" "^2.0.13" @@ -123,12 +123,12 @@ probe.gl "^3.1.1" reflect-metadata "^0.1.13" -"@antv/g6-core@0.2.7": - version "0.2.7" - resolved "https://.../repository/npm/@antv/g6-core/-/g6-core-0.2.7.tgz#08af57a20204f3e93a2698bc30a7b7ed362951de" - integrity sha512-uX6y9Zjk/ucihnLaDOMqBwlnhIFKMIgSx+8IlOwIVWs0IV8HjOGYWoqk2+Jn76lexMtcC1M94522V5mVRNX2NQ== +"@antv/g6-core@0.3.1": + version "0.3.1" + resolved "https://.../repository/npm/@antv/g6-core/-/g6-core-0.3.1.tgz#d795e1ef00e6e1f228d5125b840d782c7a353cea" + integrity sha512-Ykt0Q0yOlE9a5Tka0hU4QNqWDhYtaBetgR3V27mWuinKtdZYfXG2bX/SzphJK+oAIkKDqxvBega5qeN23g97cw== dependencies: - "@antv/algorithm" "0.1.8-beta.6" + "@antv/algorithm" "^0.1.8" "@antv/dom-util" "^2.0.1" "@antv/event-emitter" "~0.1.0" "@antv/g-base" "^0.5.1" @@ -139,31 +139,31 @@ ml-matrix "^6.5.0" tslib "^2.1.0" -"@antv/g6-element@0.2.7": - version "0.2.7" - resolved "https://.../repository/npm/@antv/g6-element/-/g6-element-0.2.7.tgz#d35690490e75d3401e7e89752b1432a4606d6e68" - integrity sha512-+jmXMNA97OF19NLRyCZ305834mp021dW2Ly1/LyLQ2YPdLWZFVAAWq2vasDJrnnpAH4krvgHa2vaVAhm5VLalA== +"@antv/g6-element@0.3.0": + version "0.3.0" + resolved "https://.../repository/npm/@antv/g6-element/-/g6-element-0.3.0.tgz#52c45bf32b324b8ed81cf5bed01ca1086e91527c" + integrity sha512-yWcXz1It3LE+cnP5o8iWEGtlWzfS9RNSbjFE+dTd3Z1Cud/O4VZAGdfBgW+p/iyjgNnuzcV0oAbQ19qU0TElTg== dependencies: "@antv/g-base" "^0.5.1" - "@antv/g6-core" "0.2.7" + "@antv/g6-core" "0.3.1" "@antv/util" "~2.0.5" -"@antv/g6-pc@0.2.7": - version "0.2.7" - resolved "https://.../repository/npm/@antv/g6-pc/-/g6-pc-0.2.7.tgz#9d58f52b5cd66d42fca5f0ce56dcf36ef27cef53" - integrity sha512-qFQM4fqs+kTWPHIs+QK+nWwEg3jdzjmIN3ILNMO1MZCrXx/dsDlHTun/VzLA2SZcdK1FeCX5uRZfX2OBSREuFA== +"@antv/g6-pc@0.3.0": + version "0.3.0" + resolved "https://.../repository/npm/@antv/g6-pc/-/g6-pc-0.3.0.tgz#a5634918621017055c3ed98f2bcd164f56193c77" + integrity sha512-3CG1JcPfuGyIBPjrRSwJEPY0rSfOm7Rvu+bCP4YmEvqjaPyWK6LmKQPEVgAvBGrVM/UrjFkwd+rf9z1lGC2cTg== dependencies: "@ant-design/colors" "^4.0.5" - "@antv/algorithm" "0.1.8-beta.6" + "@antv/algorithm" "^0.1.8" "@antv/dom-util" "^2.0.1" "@antv/event-emitter" "~0.1.0" "@antv/g-base" "^0.5.1" "@antv/g-canvas" "^0.5.2" "@antv/g-math" "^0.1.1" "@antv/g-svg" "^0.5.1" - "@antv/g6-core" "0.2.7" - "@antv/g6-element" "0.2.7" - "@antv/g6-plugin" "0.2.7" + "@antv/g6-core" "0.3.1" + "@antv/g6-element" "0.3.0" + "@antv/g6-plugin" "0.3.0" "@antv/hierarchy" "^0.6.7" "@antv/layout" "^0.1.12" "@antv/matrix-util" "^3.0.4" @@ -175,27 +175,27 @@ insert-css "^2.0.0" ml-matrix "^6.5.0" -"@antv/g6-plugin@0.2.7": - version "0.2.7" - resolved "https://.../repository/npm/@antv/g6-plugin/-/g6-plugin-0.2.7.tgz#c7350d23803560019766cfda3e2a6be5c521ef8f" - integrity sha512-CLv1zoGUzBH5JQVILACneyPVoM0YkM6dTXpj00BBOKIzJrzferFTaqeNDvtQfQWCq6AWUefztQZSmnwqWBAuuQ== +"@antv/g6-plugin@0.3.0": + version "0.3.0" + resolved "https://.../repository/npm/@antv/g6-plugin/-/g6-plugin-0.3.0.tgz#536811ed47f54a71e37175328369766def69be84" + integrity sha512-Pkw/qUn+JtV5ZVNCJwCMO3NtIALma0kjg/Lwe0ew9sQAm9zu9gKkAmXVYt1fIOn4j25+mHy/EAaJgn6rycx+rQ== dependencies: "@antv/dom-util" "^2.0.2" "@antv/g-base" "^0.5.1" "@antv/g-canvas" "^0.5.2" "@antv/g-svg" "^0.5.2" - "@antv/g6-core" "0.2.7" + "@antv/g6-core" "0.3.1" "@antv/matrix-util" "^3.0.4" "@antv/scale" "^0.3.4" "@antv/util" "^2.0.9" insert-css "^2.0.0" -"@antv/g6@4.2.7": - version "4.2.7" - resolved "https://.../repository/npm/@antv/g6/-/g6-4.2.7.tgz#e37b6029d5040b459b8f5968ef7ae3f3275ef24f" - integrity sha512-HWMXlTApzjYQJe3AfPpdXna8K7V7zndY7fZIfrxOxQs+pG5bhfzfnrhNzd4erTMP50iNYQRSpNBGAJClvaEn+w== +"@antv/g6@4.3.0": + version "4.3.0" + resolved "https://.../repository/npm/@antv/g6/-/g6-4.3.0.tgz#6ad1417cee7ba77623a54eb5cb0424fbe91ce0fe" + integrity sha512-aQQ8vfmP9I/u10lCQ551VzkXx7sK5nqT4I9iGTKJQi0qB1T0xIxQ695RRCrPGZgWZSeMTfQm83R+SHzhMWNyJg== dependencies: - "@antv/g6-pc" "0.2.7" + "@antv/g6-pc" "0.3.0" "@antv/hierarchy@^0.6.7": version "0.6.7" @@ -1398,10 +1398,10 @@ is-plain-object "^5.0.0" universal-user-agent "^6.0.0" -"@octokit/graphql@4.6.1", "@octokit/graphql@^4.5.8": - version "4.6.1" - resolved "https://.../repository/npm/@octokit/graphql/-/graphql-4.6.1.tgz#f975486a46c94b7dbe58a0ca751935edc7e32cc9" - integrity sha512-2lYlvf4YTDgZCTXTW4+OX+9WTLFtEUc6hGm4qM1nlZjzxj+arizM4aHWzBVBCxY9glh7GIs0WEuiSgbVzv8cmA== +"@octokit/graphql@4.6.2", "@octokit/graphql@^4.5.8": + version "4.6.2" + resolved "https://.../repository/npm/@octokit/graphql/-/graphql-4.6.2.tgz#ec44abdfa87f2b9233282136ae33e4ba446a04e7" + integrity sha512-WmsIR1OzOr/3IqfG9JIczI8gMJUMzzyx5j0XXQ4YihHtKlQc+u35VpVoOXhlKAlaBntvry1WpAzPl/a+s3n89Q== dependencies: "@octokit/request" "^5.3.0" "@octokit/types" "^6.0.3" @@ -1780,9 +1780,9 @@ "@types/unist" "*" "@types/node@*", "@types/node@^14.14.9": - version "14.14.44" - resolved "https://.../repository/npm/@types/node/-/node-14.14.44.tgz#df7503e6002847b834371c004b372529f3f85215" - integrity sha512-+gaugz6Oce6ZInfI/tK4Pq5wIIkJMEJUu92RB3Eu93mtj4wjjjz9EB5mLp5s1pSsLXdC/CPut/xF20ZzAQJbTA== + version "14.14.45" + resolved "https://.../repository/npm/@types/node/-/node-14.14.45.tgz#ec2dfb5566ff814d061aef7e141575aedba245cf" + integrity sha512-DssMqTV9UnnoxDWu959sDLZzfvqCF0qDNRjaWeYSui9xkFe61kKo4l1TWNTQONpuXEm+gLMRvdlzvNHBamzmEw== "@types/parse-json@^4.0.0": version "4.0.0" @@ -3383,10 +3383,10 @@ domutils@^2.4.2: domelementtype "^2.0.1" domhandler "^4.0.0" -dotenv@9.0.1: - version "9.0.1" - resolved "https://.../repository/npm/dotenv/-/dotenv-9.0.1.tgz#a889a28a3a515812dde1e7f8183ef5cdf3186b97" - integrity sha512-W8FNeNnnvJoYfgkFRKzp8kTgz0T2YY4TJ9xy1Ma0hSebPTK8iquRtpG12TUrSTX5zIN9D/wSLEEuI+Ad35tlyw== +dotenv@9.0.2: + version "9.0.2" + resolved "https://.../repository/npm/dotenv/-/dotenv-9.0.2.tgz#dacc20160935a37dea6364aa1bef819fb9b6ab05" + integrity sha512-I9OvvrHp4pIARv4+x9iuewrWycX6CcZtoAu1XrzPxc5UygMJXJZYmBsynku8IkrJwgypE5DGNjDPmPRhDCptUg== duplexify@^3.6.0: version "3.7.1" @@ -5584,10 +5584,10 @@ next-tick@~1.0.0: resolved "https://.../repository/npm/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= -next-transpile-modules@7.0.0: - version "7.0.0" - resolved "https://.../repository/npm/next-transpile-modules/-/next-transpile-modules-7.0.0.tgz#5a48988cede89bc5920defb15378093d0d8562eb" - integrity sha512-HgVczU5ajXKvE7HO3ZLmBmxXj79aq8jSZNYpCttim+MZ+b0GIsdk7AV2w7Ax/tIM1/dJA+vV/6loXCRYlbsGGA== +next-transpile-modules@7.1.0: + version "7.1.0" + resolved "https://.../repository/npm/next-transpile-modules/-/next-transpile-modules-7.1.0.tgz#f4cae86913c9f28e66926d19e1c672a33d28f653" + integrity sha512-om3XfamWztW0zAdirCoyjcMNiQg3zesUlCSWh1FS6t1LgqUT+AjH1Zc5OpLMZtj7qsbwmLIOeFN72qrnhbpefw== dependencies: enhanced-resolve "^5.7.0" escalade "^3.1.1" ```
Logs for a run that erases everything ``` DEBUG: Found PR #132 (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Returning from graphql open PR list (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Branch is up-to-date (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Branch does not need rebasing (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Using reuseExistingBranch: true (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: manager.getUpdatedPackageFiles() reuseExistinbranch=true (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: npm.updateDependency(): dependencies.@antv/g6 = 4.3.0 (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: npm.updateDependency(): dependencies.@octokit/graphql = 4.6.2 (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: npm.updateDependency(): dependencies.@types/node = ^14.14.9 (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: npm.updateDependency(): dependencies.dotenv = 9.0.2 (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: npm.updateDependency(): dependencies.next-transpile-modules = 7.1.0 (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: No package files need updating (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Getting updated lock files (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Writing package.json files (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "packageFiles": ["package.json"] DEBUG: Writing any updated package files (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: No npmrc file found in repository (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Writing updated .npmrc file to /tmp/renovate/repos/github/sq/sq-hub-web/.npmrc (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Generating yarn.lock for . (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Spawning yarn install to create /tmp/renovate/repos/github/sq/sq-hub-web/yarn.lock (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Updating yarn.lock only - skipping node_modules (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: No node constraint found - using latest (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Performing lockfileUpdate (yarn) (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Performing yarn dedupe fewer (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Executing command (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "command": "yarn install --ignore-engines --ignore-platform --network-timeout 100000" DEBUG: exec completed (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "cmd": "yarn install --ignore-engines --ignore-platform --network-timeout 100000", "durationMs": 123651, "stdout": "yarn install v1.22.10\n[1/4] Resolving packages...\n[2/4] Fetching packages...\n[3/4] Linking dependencies...\n[4/4] Building fresh packages...\nDone in 122.99s.\n", "stderr": "warning package.json: No license field\nwarning No license field\nwarning mini-css-extract-plugin@0.4.3: Invalid bin field for \"mini-css-extract-plugin\".\nwarning \"@swissquote/crafty-preset-eslint > eslint-loader@4.0.2\" has unmet peer dependency \"webpack@^4.0.0 || ^5.0.0\".\nwarning \"@swissquote/crafty-preset-eslint > @swissquote/rollup-plugin-eslint > @rollup/pluginutils@4.1.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@swissquote/crafty-preset-typescript > @rollup/plugin-babel@5.3.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@swissquote/crafty-preset-typescript > babel-loader@8.2.2\" has unmet peer dependency \"webpack@>=2\".\nwarning \"@swissquote/crafty-preset-typescript > rollup-plugin-typescript2@0.30.0\" has unmet peer dependency \"rollup@>=1.26.3\".\nwarning \"@swissquote/crafty-preset-typescript > ts-jest@26.5.3\" has unmet peer dependency \"jest@>=26 <27\".\nwarning \"@swissquote/crafty-preset-typescript > ts-loader@8.0.17\" has unmet peer dependency \"webpack@*\".\nwarning \"@swissquote/crafty-preset-typescript > @rollup/plugin-babel > @rollup/pluginutils@3.1.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@zeit/next-css > css-loader@1.0.0\" has unmet peer dependency \"webpack@^4.0.0\".\nwarning \"@zeit/next-css > mini-css-extract-plugin@0.4.3\" has unmet peer dependency \"webpack@^4.4.0\".\nwarning \"sq-web-components-core-react > create-react-context@0.3.0\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > react-swipeable@4.3.2\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0\".\nwarning \"sq-web-components-core-react > react-swipeable-views@0.13.9\" has incorrect peer dependency \"react@^15.3.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > sq-web-icons@1.1.33\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > react-swipeable-views > react-swipeable-views-utils > react-event-listener@0.6.6\" has incorrect peer dependency \"react@^16.3.0\".\n" DEBUG: Executing command (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "command": "yarn upgrade @types/node --ignore-engines --ignore-platform --network-timeout 100000" DEBUG: exec completed (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "cmd": "yarn upgrade @types/node --ignore-engines --ignore-platform --network-timeout 100000", "durationMs": 18679, "stdout": "yarn upgrade v1.22.10\n[1/4] Resolving packages...\n[2/4] Fetching packages...\n[3/4] Linking dependencies...\n[4/4] Rebuilding all packages...\nsuccess Saved lockfile.\nsuccess Saved 1 new dependency.\ninfo Direct dependencies\n└─ @types/node@14.14.45\ninfo All dependencies\n└─ @types/node@14.14.45\nDone in 18.25s.\n", "stderr": "warning package.json: No license field\nwarning No license field\nwarning No license field\nwarning No license field\nwarning \"@swissquote/crafty-preset-eslint > eslint-loader@4.0.2\" has unmet peer dependency \"webpack@^4.0.0 || ^5.0.0\".\nwarning \"@swissquote/crafty-preset-eslint > @swissquote/rollup-plugin-eslint > @rollup/pluginutils@4.1.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@swissquote/crafty-preset-typescript > @rollup/plugin-babel@5.3.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@swissquote/crafty-preset-typescript > babel-loader@8.2.2\" has unmet peer dependency \"webpack@>=2\".\nwarning \"@swissquote/crafty-preset-typescript > rollup-plugin-typescript2@0.30.0\" has unmet peer dependency \"rollup@>=1.26.3\".\nwarning \"@swissquote/crafty-preset-typescript > ts-jest@26.5.3\" has unmet peer dependency \"jest@>=26 <27\".\nwarning \"@swissquote/crafty-preset-typescript > ts-loader@8.0.17\" has unmet peer dependency \"webpack@*\".\nwarning \"@swissquote/crafty-preset-typescript > @rollup/plugin-babel > @rollup/pluginutils@3.1.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@zeit/next-css > css-loader@1.0.0\" has unmet peer dependency \"webpack@^4.0.0\".\nwarning \"@zeit/next-css > mini-css-extract-plugin@0.4.3\" has unmet peer dependency \"webpack@^4.4.0\".\nwarning \"sq-web-components-core-react > create-react-context@0.3.0\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > react-swipeable@4.3.2\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0\".\nwarning \"sq-web-components-core-react > react-swipeable-views@0.13.9\" has incorrect peer dependency \"react@^15.3.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > sq-web-icons@1.1.33\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > react-swipeable-views > react-swipeable-views-utils > react-event-listener@0.6.6\" has incorrect peer dependency \"react@^16.3.0\".\nwarning No license field\n" DEBUG: Executing command (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "command": "npx yarn-deduplicate --strategy fewer" DEBUG: exec completed (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "cmd": "npx yarn-deduplicate --strategy fewer", "durationMs": 4441, "stdout": "", "stderr": "npx: installed 6 in 3.638s\n" DEBUG: Executing command (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "command": "yarn install --ignore-engines --ignore-platform --network-timeout 100000" DEBUG: exec completed (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "cmd": "yarn install --ignore-engines --ignore-platform --network-timeout 100000", "durationMs": 14368, "stdout": "yarn install v1.22.10\n[1/4] Resolving packages...\n[2/4] Fetching packages...\n[3/4] Linking dependencies...\n[4/4] Building fresh packages...\nDone in 13.98s.\n", "stderr": "warning package.json: No license field\nwarning No license field\nwarning \"@swissquote/crafty-preset-eslint > eslint-loader@4.0.2\" has unmet peer dependency \"webpack@^4.0.0 || ^5.0.0\".\nwarning \"@swissquote/crafty-preset-eslint > @swissquote/rollup-plugin-eslint > @rollup/pluginutils@4.1.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@swissquote/crafty-preset-typescript > @rollup/plugin-babel@5.3.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@swissquote/crafty-preset-typescript > babel-loader@8.2.2\" has unmet peer dependency \"webpack@>=2\".\nwarning \"@swissquote/crafty-preset-typescript > rollup-plugin-typescript2@0.30.0\" has unmet peer dependency \"rollup@>=1.26.3\".\nwarning \"@swissquote/crafty-preset-typescript > ts-jest@26.5.3\" has unmet peer dependency \"jest@>=26 <27\".\nwarning \"@swissquote/crafty-preset-typescript > ts-loader@8.0.17\" has unmet peer dependency \"webpack@*\".\nwarning \"@swissquote/crafty-preset-typescript > @rollup/plugin-babel > @rollup/pluginutils@3.1.0\" has unmet peer dependency \"rollup@^1.20.0||^2.0.0\".\nwarning \"@zeit/next-css > css-loader@1.0.0\" has unmet peer dependency \"webpack@^4.0.0\".\nwarning \"@zeit/next-css > mini-css-extract-plugin@0.4.3\" has unmet peer dependency \"webpack@^4.4.0\".\nwarning \"sq-web-components-core-react > create-react-context@0.3.0\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > react-swipeable@4.3.2\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0\".\nwarning \"sq-web-components-core-react > react-swipeable-views@0.13.9\" has incorrect peer dependency \"react@^15.3.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > sq-web-icons@1.1.33\" has incorrect peer dependency \"react@^0.14.0 || ^15.0.0 || ^16.0.0\".\nwarning \"sq-web-components-core-react > react-swipeable-views > react-swipeable-views-utils > react-event-listener@0.6.6\" has incorrect peer dependency \"react@^16.3.0\".\n" DEBUG: yarn.lock needs updating (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) ... DEBUG: 1 file(s) to commit (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: Committing files to branch renovate/all-minor-patch (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) DEBUG: git commit (repository=sq/sq-hub-web, branch=renovate/all-minor-patch) "result": { "author": null, "branch": "renovate/all-minor-patch", "commit": "33ccbd5", "root": false, "summary": {"changes": 1, "insertions": 3, "deletions": 3} } ```
Git diff that erases everything ``` From 33ccbd550cfca57f1a52515541611d0636d24bdd Mon Sep 17 00:00:00 2001 From: Renovate Date: Tue, 18 May 2021 08:19:01 +0000 Subject: [PATCH] Update all non-major dependencies --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index dd547e4..ba6ebfe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1780,9 +1780,9 @@ "@types/unist" "*" "@types/node@*", "@types/node@^14.14.9": - version "14.14.44" - resolved "https://.../repository/npm/@types/node/-/node-14.14.44.tgz#df7503e6002847b834371c004b372529f3f85215" - integrity sha512-+gaugz6Oce6ZInfI/tK4Pq5wIIkJMEJUu92RB3Eu93mtj4wjjjz9EB5mLp5s1pSsLXdC/CPut/xF20ZzAQJbTA== + version "14.14.45" + resolved "https://.../repository/npm/@types/node/-/node-14.14.45.tgz#ec2dfb5566ff814d061aef7e141575aedba245cf" + integrity sha512-DssMqTV9UnnoxDWu959sDLZzfvqCF0qDNRjaWeYSui9xkFe61kKo4l1TWNTQONpuXEm+gLMRvdlzvNHBamzmEw== "@types/parse-json@^4.0.0": version "4.0.0" ```

Have you created a minimal reproduction repository?

Please read the minimal reproductions documentation to learn how to make a good minimal reproduction repository.

Additional context

I can provide more logs upon request, I saved everything but can't just send everything as I need to make sure there is no sensitive data in it.

viceice commented 3 years ago

Please update to latest renovate version to see if this is already fixed, your v24.x version is very outdated.

onigoetz commented 3 years ago

Will try tomorrow morning with v25, I had a look at closed issues and I didn't find anything related to my issue so I think the issue will remain.

Will keep you posted.

onigoetz commented 3 years ago

I didn't check yet with version 25 (not at work right now), but I had a look at the current main branch and found a few things

By looking at the main update part: https://github.com/renovatebot/renovate/blob/main/lib/workers/branch/index.ts#L262-L279

There are three things happening there:

  1. Check if the branch is up-to-date (in the case we're in, there is already a commit, so it will leave it as-is)
  2. getUpdatedPackageFiles applies the updates but does so only if the result differs from the original file : Need to update file(s) so will rebase first: https://github.com/renovatebot/renovate/blob/main/lib/workers/branch/get-updated.ts#L86 Basically running getUpdatedPackageFiles twice : once hoping nothing happens, the second time actually applying changes.
  3. getAdditionalFiles That's where the dedupe happens and yarn upgrade @types/node because I have a dependency that needs only a lockfile update.

And here is what I think is happening on my PRs:

  1. On the first run. A PR is created with a modified package.json and yarn.lock (Both getUpdatedPackageFiles and getAdditionalFiles made changes)
  2. On the second run, getUpdatedPackageFiles sees no changes since the branch is already up-to-date thus doesn't add anything to config.updatedPackageFiles BUT getAdditionalFiles will still run (including yarn upgrade @types/node), triggering a change and now It commits only the change to yarn.lock
  3. On the third run getUpdatedPackageFiles will see that the updates aren't done. Thus starting the branch again, applying the package.json updates. Then getAdditionalFiles does its trick.

I will still check on my side if I can check with the latest version but am 100% sure I will get the same result.

My hunch on how this could be done would be to always apply all the changes and at the end of the run do a diff between the existing branch renovate/all-minor-patch and the newly created one (renovate/all-minor-patch-new), if nothing changes; drop it if it changes, replace renovate/all-minor-patch with renovate/all-minor-patch-new and force push it. Although that would require all post-update actions to be idempotent, I don't know if that's the case for all package managers.

github-actions[bot] commented 3 years ago

Hi there,

The Renovate team needs your help! Before we can start work on your issue we first need to know exactly what's causing the current behavior. A minimal reproduction helps us with this.

To get started, please read our guide on minimal reproductions to understand what is needed.

We may close the issue if you have not provided a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment.

Good luck,

The Renovate team

onigoetz commented 3 years ago

As requested; here is a repro : https://github.com/onigoetz/renovate-loop-repro/pull/1

At the time of writing there was only one force push (the original commit that works and the second commit that contains only the lockfile changes)

Renovate Run 1 Initial PR Commit : https://github.com/onigoetz/renovate-loop-repro/commit/ad294d161bb6c1d072c293583d69e78ae801ed4d Renovate job : onigoetz/renovate-loop-repro: #359110786

Relevant Logs ``` DEBUG: Branch needs creating(branch="renovate/all-minor-patch") DEBUG: Using reuseExistingBranch: false(branch="renovate/all-minor-patch") DEBUG: manager.getUpdatedPackageFiles() reuseExistinbranch=false(branch="renovate/all-minor-patch") DEBUG: npm.updateDependency(): dependencies.@octokit/graphql = 4.6.2(branch="renovate/all-minor-patch") DEBUG: Updating @octokit/graphql in package.json(branch="renovate/all-minor-patch") DEBUG: npm.updateDependency(): dependencies.@types/node = ^14.14.9(branch="renovate/all-minor-patch") DEBUG: Updated 1 package files(branch="renovate/all-minor-patch") ... DEBUG: Performing yarn dedupe fewer(branch="renovate/all-minor-patch") DEBUG: Using docker to execute(branch="renovate/all-minor-patch") DEBUG: No tag or tagConstraint specified(branch="renovate/all-minor-patch") { "image": "docker.io/renovate/node" } DEBUG: Docker image is already prefetched: docker.io/renovate/node(branch="renovate/all-minor-patch") DEBUG: Executing command(branch="renovate/all-minor-patch") { "command": "docker run --rm --name=renovate_node --label=renovate_child -v \"/mnt/renovate/gh/onigoetz/renovate-loop-repro\":\"/mnt/renovate/gh/onigoetz/renovate-loop-repro\" -v \"/tmp/renovate-cache\":\"/tmp/renovate-cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e CI -w \"/mnt/renovate/gh/onigoetz/renovate-loop-repro\" docker.io/renovate/node bash -l -c \"npm i -g yarn && sed -i 's/ steps,/ steps.slice(0,1),/' /home/ubuntu/.npm-global/lib/node_modules/yarn/lib/cli.js && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts && yarn upgrade @types/node --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts && npx yarn-deduplicate --strategy fewer && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts\"" } DEBUG: exec completed(branch="renovate/all-minor-patch") { "cmd": "docker run --rm --name=renovate_node --label=renovate_child -v \"/mnt/renovate/gh/onigoetz/renovate-loop-repro\":\"/mnt/renovate/gh/onigoetz/renovate-loop-repro\" -v \"/tmp/renovate-cache\":\"/tmp/renovate-cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e CI -w \"/mnt/renovate/gh/onigoetz/renovate-loop-repro\" docker.io/renovate/node bash -l -c \"npm i -g yarn && sed -i 's/ steps,/ steps.slice(0,1),/' /home/ubuntu/.npm-global/lib/node_modules/yarn/lib/cli.js && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts && yarn upgrade @types/node --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts && npx yarn-deduplicate --strategy fewer && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts\"", "durationMs": 12574, "stdout": "\n> yarn@1.22.10 preinstall /home/ubuntu/.npm-global/lib/node_modules/yarn\n> :; (node ./preinstall.js > /dev/null 2>&1 || true)\n\n/home/ubuntu/.npm-global/bin/yarn -> /home/ubuntu/.npm-global/lib/node_modules/yarn/bin/yarn.js\n/home/ubuntu/.npm-global/bin/yarnpkg -> /home/ubuntu/.npm-global/lib/node_modules/yarn/bin/yarn.js\n+ yarn@1.22.10\nadded 1 package in 2.456s\nyarn install v1.22.10\n[1/4] Resolving packages...\nsuccess Saved lockfile.\nDone in 0.49s.\nyarn upgrade v1.22.10\n[1/4] Resolving packages...\nsuccess Saved lockfile.\nsuccess Saved 1 new dependency.\ninfo Direct dependencies\n└─ @types/node@14.17.0\ninfo All dependencies\n└─ @types/node@14.17.0\nDone in 1.00s.\nyarn install v1.22.10\n[1/4] Resolving packages...\nsuccess Already up-to-date.\nDone in 0.27s.\n", "stderr": "warning package.json: No license field\nwarning No license field\nwarning package.json: No license field\nwarning No license field\nwarning No license field\nwarning No license field\nwarning No license field\nnpx: installed 6 in 3.252s\nwarning package.json: No license field\nwarning No license field\n" } ... DEBUG: git commit(branch="renovate/all-minor-patch") { "result": { "author": null, "branch": "renovate/all-minor-patch", "commit": "ad294d1", "root": false, "summary": { "changes": 2, "insertions": 8, "deletions": 0 } } } ```

Renovate Run 2

Second Commit : https://github.com/onigoetz/renovate-loop-repro/commit/dd0df895d9e634bcb5b111dc503042418d158634 Renovate job : onigoetz/renovate-loop-repro: #359110805

Relevant Logs ``` DEBUG: Using reuseExistingBranch: true(branch="renovate/all-minor-patch") DEBUG: manager.getUpdatedPackageFiles() reuseExistinbranch=true(branch="renovate/all-minor-patch") DEBUG: npm.updateDependency(): dependencies.@octokit/graphql = 4.6.2(branch="renovate/all-minor-patch") DEBUG: npm.updateDependency(): dependencies.@types/node = ^14.14.9(branch="renovate/all-minor-patch") DEBUG: No package files need updating(branch="renovate/all-minor-patch") ... DEBUG: Performing yarn dedupe fewer(branch="renovate/all-minor-patch") DEBUG: Using docker to execute(branch="renovate/all-minor-patch") DEBUG: No tag or tagConstraint specified(branch="renovate/all-minor-patch") { "image": "docker.io/renovate/node" } DEBUG: Docker image is already prefetched: docker.io/renovate/node(branch="renovate/all-minor-patch") DEBUG: Executing command(branch="renovate/all-minor-patch") { "command": "docker run --rm --name=renovate_node --label=renovate_child -v \"/mnt/renovate/gh/onigoetz/renovate-loop-repro\":\"/mnt/renovate/gh/onigoetz/renovate-loop-repro\" -v \"/tmp/renovate-cache\":\"/tmp/renovate-cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e CI -w \"/mnt/renovate/gh/onigoetz/renovate-loop-repro\" docker.io/renovate/node bash -l -c \"npm i -g yarn && sed -i 's/ steps,/ steps.slice(0,1),/' /home/ubuntu/.npm-global/lib/node_modules/yarn/lib/cli.js && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts && yarn upgrade @types/node --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts && npx yarn-deduplicate --strategy fewer && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts\"" } DEBUG: exec completed(branch="renovate/all-minor-patch") { "cmd": "docker run --rm --name=renovate_node --label=renovate_child -v \"/mnt/renovate/gh/onigoetz/renovate-loop-repro\":\"/mnt/renovate/gh/onigoetz/renovate-loop-repro\" -v \"/tmp/renovate-cache\":\"/tmp/renovate-cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e CI -w \"/mnt/renovate/gh/onigoetz/renovate-loop-repro\" docker.io/renovate/node bash -l -c \"npm i -g yarn && sed -i 's/ steps,/ steps.slice(0,1),/' /home/ubuntu/.npm-global/lib/node_modules/yarn/lib/cli.js && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts && yarn upgrade @types/node --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts && npx yarn-deduplicate --strategy fewer && yarn install --ignore-engines --ignore-platform --network-timeout 100000 --ignore-scripts\"", "durationMs": 11585, "stdout": "\n> yarn@1.22.10 preinstall /home/ubuntu/.npm-global/lib/node_modules/yarn\n> :; (node ./preinstall.js > /dev/null 2>&1 || true)\n\n/home/ubuntu/.npm-global/bin/yarn -> /home/ubuntu/.npm-global/lib/node_modules/yarn/bin/yarn.js\n/home/ubuntu/.npm-global/bin/yarnpkg -> /home/ubuntu/.npm-global/lib/node_modules/yarn/bin/yarn.js\n+ yarn@1.22.10\nadded 1 package in 1.679s\nyarn install v1.22.10\n[1/4] Resolving packages...\nDone in 0.27s.\nyarn upgrade v1.22.10\n[1/4] Resolving packages...\nsuccess Saved lockfile.\nsuccess Saved 1 new dependency.\ninfo Direct dependencies\n└─ @types/node@14.17.0\ninfo All dependencies\n└─ @types/node@14.17.0\nDone in 0.98s.\nyarn install v1.22.10\n[1/4] Resolving packages...\nsuccess Already up-to-date.\nDone in 0.28s.\n", "stderr": "warning package.json: No license field\nwarning No license field\nwarning package.json: No license field\nwarning No license field\nwarning No license field\nwarning No license field\nwarning No license field\nnpx: installed 6 in 3.298s\nwarning package.json: No license field\nwarning No license field\n" } ... DEBUG: git commit(branch="renovate/all-minor-patch") { "result": { "author": null, "branch": "renovate/all-minor-patch", "commit": "dd0df89", "root": false, "summary": { "changes": 1, "insertions": 3, "deletions": 0 } } } ```

Renovate Run 3

Did not yet happen, but once it does it will re-apply the changes to package.json and yarn.lock and force push the change.

github-actions[bot] commented 3 years ago

Thank you for providing a reproduction! :tada: :rocket:

The Renovate team will take a look at the reproduction repository. Once we confirm the provided repository reproduces the problem, the label will be changed to reproduction:confirmed.

rarkins commented 3 years ago

@onigoetz I'm still trying to get my head around this problem so I can confirm that the fix is right.

First of all I think this applies due to the combination of rangeStrategy=update-lockfile and postUpdateOptions=yarnDedupeFewer. It maybe also requires there to be a package.json update too - have you checked if that's required to trigger the problem?

Currently update-lockfile is quite inefficient compared to other updating because it runs yarn upgrade x commands to achieve the change. If it runs yarn upgrade x and finds that the branch differed in any way from the existing branch, then it's pushed.

I think we understand what happens on the "correct" first step - package.json is updated, yarn is run, lock file is updated, and then dedupe is additionally run.

If the second run were run immediately after, would it trigger a push? Or does it only trigger a push when yarn upgrade x produces a diff sometimes later?

onigoetz commented 3 years ago

Yes, you're correct, it's due to update-lockfile and postUpdateOptions=yarnDedupeFewer.

I have the same understanding as you on the first run. but the bug appears only if some dependencies are updating the package.json and some are not

Let's take for example ("semver": "1.0.0" and "@types/react": "^17.0.0) In this example semver will update the package.json, but @types/react will not. So on the first run semver is updated by package.json. But on the second run

  1. package.json is not updated because shouldReuseBranch is true (since it's already correct in the branch)
  2. Which causes yarn upgrade to run only for @types/react, setting the whole thing in a different state
  3. then yarnDedupeFewer is run, and continues changing the yarn.lock.

which ends up with a yarn.lock that has only been updated by step 2 and 3, but not step 1. So as the yarn.lock differs, it will be commited and force-pushed.

I now realise that my fix only addresses the problem for 3. and only incidentally fixes 2. with it. Should I update the PR to properly address 2 (don't reuse a branch if there are both package.json updates and rangeStrategy=update-lockfile) as well ?

onigoetz commented 3 years ago

I made a change to the pull-request that also handles the case when two rangeStrategy are used, including update-lockfile. Also adding an example output with this change

renovate-release commented 3 years ago

:tada: This issue has been resolved in version 26.21.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: