Skip to content
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

Incorrect PR cache skipping after branch update #22270

Closed
rarkins opened this issue May 16, 2023 · 2 comments · Fixed by #22271
Closed

Incorrect PR cache skipping after branch update #22270

rarkins opened this issue May 16, 2023 · 2 comments · Fixed by #22271
Assignees
Labels
priority-2-high Bugs impacting wide number of users or very important features status:in-progress Someone is working on implementation type:bug Bug fix of existing functionality

Comments

@rarkins
Copy link
Collaborator

rarkins commented May 16, 2023

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

If you're self-hosting Renovate, select which platform you are using.

None

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

It used to work, and then stopped

Describe the bug

Renovate's PR cache caused a PR body update to be skipped when it needed to be updated.

The message DEBUG: PR cache matches and no PR changes in last 24hrs, so skipping PR body check was printed but the cache should not have matched, because the update went from 2.7.0 to 2.8.0.

Relevant debug logs

Logs
DEBUG: syncBranchState() (branch="renovate/major-apache-tika")
DEBUG: branch.isUpToDate(): needs recalculation (branch="renovate/major-apache-tika")
DEBUG: getBranchPr(renovate/major-apache-tika) (branch="renovate/major-apache-tika")
DEBUG: findPr(renovate/major-apache-tika, undefined, open) (branch="renovate/major-apache-tika")
DEBUG: Found PR #148 (branch="renovate/major-apache-tika")
DEBUG: branchExists=true (branch="renovate/major-apache-tika")
DEBUG: dependencyDashboardCheck=undefined (branch="renovate/major-apache-tika")
DEBUG: PR rebase requested=false (branch="renovate/major-apache-tika")
DEBUG: Checking if PR has been edited (branch="renovate/major-apache-tika")
DEBUG: branch.isModified(): using cached result "false" (branch="renovate/major-apache-tika")
DEBUG: Found existing branch PR (branch="renovate/major-apache-tika")
DEBUG: Checking schedule(at any time, null) (branch="renovate/major-apache-tika")
DEBUG: No schedule defined (branch="renovate/major-apache-tika")
DEBUG: Branch already exists (branch="renovate/major-apache-tika")
DEBUG: getBranchPr(renovate/major-apache-tika) (branch="renovate/major-apache-tika")
DEBUG: findPr(renovate/major-apache-tika, undefined, open) (branch="renovate/major-apache-tika")
DEBUG: Found PR #148 (branch="renovate/major-apache-tika")
DEBUG: Skipping behind base branch check due to rebaseWhen=auto (branch="renovate/major-apache-tika")
DEBUG: isBranchConflicted(master, renovate/major-apache-tika) (branch="renovate/major-apache-tika")
DEBUG: branch.isConflicted(): using cached result "false" (branch="renovate/major-apache-tika")
DEBUG: Branch does not need rebasing (branch="renovate/major-apache-tika")
DEBUG: Using reuseExistingBranch: true (branch="renovate/major-apache-tika")
DEBUG: Setting current branch to master (branch="renovate/major-apache-tika")
DEBUG: latest commit (branch="renovate/major-apache-tika")
{
  "branchName": "master"
  "latestCommitDate": "2023-04-28T15:14:07+02:00"
}

DEBUG: manager.getUpdatedPackageFiles() reuseExistingBranch=true (branch="renovate/major-apache-tika")
DEBUG: Value is not updated (branch="renovate/major-apache-tika")
{
  "manager": "osgi"
  "packageFile": "src/main/features/base.json"
  "expectedValue": "2.8.0"
  "foundValue": "2.7.0"
}

DEBUG: Rebasing after outdated branch dep found (branch="renovate/major-apache-tika")
{
  "packageFile": "src/main/features/base.json"
  "depName": "org.apache.tika:tika-core"
}

DEBUG: manager.getUpdatedPackageFiles() reuseExistingBranch=false (branch="renovate/major-apache-tika")
DEBUG: Starting search at index 6410 (branch="renovate/major-apache-tika")
{
  "packageFile": "src/main/features/base.json"
  "depName": "org.apache.tika:tika-core"
}

DEBUG: Found match at index 6410 (branch="renovate/major-apache-tika")
{
  "packageFile": "src/main/features/base.json"
  "depName": "org.apache.tika:tika-core"
}

DEBUG: Contents updated (branch="renovate/major-apache-tika")
{
  "packageFile": "src/main/features/base.json"
  "depName": "org.apache.tika:tika-core"
}

DEBUG: Value is not updated (branch="renovate/major-apache-tika")
{
  "manager": "osgi"
  "packageFile": "src/main/features/base.json"
  "expectedValue": "2.8.0"
  "foundValue": "1.28.5"
}

DEBUG: Starting search at index 6517 (branch="renovate/major-apache-tika")
{
  "packageFile": "src/main/features/base.json"
  "depName": "org.apache.tika:tika-parsers"
}

DEBUG: Found match at index 6517 (branch="renovate/major-apache-tika")
{
  "packageFile": "src/main/features/base.json"
  "depName": "org.apache.tika:tika-parsers"
}

DEBUG: Contents updated (branch="renovate/major-apache-tika")
{
  "packageFile": "src/main/features/base.json"
  "depName": "org.apache.tika:tika-parsers"
}

DEBUG: Updated 1 package files (branch="renovate/major-apache-tika")
DEBUG: No updated lock files in branch (branch="renovate/major-apache-tika")
DEBUG: 1 file(s) to commit (branch="renovate/major-apache-tika")
DEBUG: Preparing files for committing to branch renovate/major-apache-tika (branch="renovate/major-apache-tika")
DEBUG: gitPrivateKey: configuring commit signing (branch="renovate/major-apache-tika")
DEBUG: Setting CONTAINERBASE_CACHE_DIR to /tmp/worker/a8820a/c3b3f4/cache/containerbase (branch="renovate/major-apache-tika")
DEBUG: Using containerbase dynamic installs (branch="renovate/major-apache-tika")
DEBUG: Executing command (branch="renovate/major-apache-tika")
{
  "command": "git config user.signingkey A1020E7F5FFD673D"
}

DEBUG: exec completed (branch="renovate/major-apache-tika")
{
  "durationMs": 29
  "stdout": ""
  "stderr": ""
}

DEBUG: Setting CONTAINERBASE_CACHE_DIR to /tmp/worker/a8820a/c3b3f4/cache/containerbase (branch="renovate/major-apache-tika")
DEBUG: Using containerbase dynamic installs (branch="renovate/major-apache-tika")
DEBUG: Executing command (branch="renovate/major-apache-tika")
{
  "command": "git config commit.gpgsign true"
}

DEBUG: exec completed (branch="renovate/major-apache-tika")
{
  "durationMs": 23
  "stdout": ""
  "stderr": ""
}

DEBUG: git commit (branch="renovate/major-apache-tika")
{
  "deletedFiles": []
  "ignoredFiles": []
  "result": {
    "author": null,
    "branch": "renovate/major-apache-tika",
    "commit": "1cb81a4e593fb0795146b7c5f13d55495298a4eb",
    "root": false,
    "summary": {
      "changes": 1,
      "insertions": 2,
      "deletions": 0
    }
  }
}

DEBUG: Pushing refSpec renovate/major-apache-tika:renovate/major-apache-tika (branch="renovate/major-apache-tika")
DEBUG: git push (branch="renovate/major-apache-tika")
{
  "result": {
    "pushed": [],
    "ref": {
      "local": "refs/remotes/origin/renovate/major-apache-tika"
    },
    "remoteMessages": {
      "all": []
    }
  }
}

DEBUG: Setting current branch to master (branch="renovate/major-apache-tika")
DEBUG: latest commit (branch="renovate/major-apache-tika")
{
  "branchName": "master"
  "latestCommitDate": "2023-04-28T15:14:07+02:00"
}

INFO: Branch updated (branch="renovate/major-apache-tika")
{
  "commitSha": "1cb81a4e593fb0795146b7c5f13d55495298a4eb"
}

DEBUG: Ensuring PR (branch="renovate/major-apache-tika")
DEBUG: There are 0 errors and 0 warnings (branch="renovate/major-apache-tika")
DEBUG: getBranchPr(renovate/major-apache-tika) (branch="renovate/major-apache-tika")
DEBUG: findPr(renovate/major-apache-tika, undefined, open) (branch="renovate/major-apache-tika")
DEBUG: Found PR #148 (branch="renovate/major-apache-tika")
DEBUG: getPrCache() (branch="renovate/major-apache-tika")
DEBUG: Found existing PR (branch="renovate/major-apache-tika")
DEBUG: PR cache matches and no PR changes in last 24hrs, so skipping PR body check (branch="renovate/major-apache-tika")
DEBUG: PR is not configured for automerge (branch="renovate/major-apache-tika")
DEBUG: setBranchCommit() (branch="renovate/major-apache-tika")

Have you created a minimal reproduction repository?

I have explained in the description why a minimal reproduction is impossible

@rarkins rarkins added type:bug Bug fix of existing functionality priority-2-high Bugs impacting wide number of users or very important features status:ready labels May 16, 2023
@rarkins
Copy link
Collaborator Author

rarkins commented May 16, 2023

I added an extra log message and can see the root cause here:

DEBUG: Fingerprinted input (repository=renovate-reproductions/22270, branch=renovate/renovate-35.x)
       "input": {
         "automerge": false,
         "automergeSchedule": ["at any time"],
         "filteredUpgrades": [
           {
             "depName": "renovate",
             "prBodyDefinitions": {
               "Package": "{{{depNameLinked}}}",
               "Type": "{{{depType}}}",
               "Update": "{{{updateType}}}",
               "Current value": "{{{currentValue}}}",
               "New value": "{{{newValue}}}",
               "Change": "[{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}]({{#if depName}}https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{currentVersion}}}/{{{newVersion}}}{{/if}})",
               "Pending": "{{{displayPending}}}",
               "References": "{{{references}}}",
               "Package file": "{{{packageFile}}}"
             },
             "prBodyNotes": []
           }
         ],
         "prBodyTemplate": "{{{header}}}{{{table}}}{{{warnings}}}{{{notes}}}{{{changelogs}}}{{{configDescription}}}{{{controls}}}{{{footer}}}",
         "prFooter": "This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).",
         "prHeader": null,
         "prTitle": "Update dependency renovate to v35",
         "rebaseWhen": "auto",
         "recreateClosed": false,
         "schedule": ["at any time"],
         "stopUpdating": false,
         "timezone": null,
         "updateType": "major",
         "warnings": []
       },
       "fingerprint": "cebfaa6c7c647c38e84711d26a8f458af96757bd597b54578cecf5edfdc69c1313411f764bc26d06df41e76aa20ba94afcbeaa6d29b14c58352a305e1e11f92a"

You can see that the only thing related to version is "prTitle": "Update dependency renovate to v35", so this wouldn't change even if the version of Renovate changes.

@rarkins rarkins self-assigned this May 16, 2023
@rarkins rarkins added status:in-progress Someone is working on implementation and removed status:ready labels May 16, 2023
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 35.89.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority-2-high Bugs impacting wide number of users or very important features status:in-progress Someone is working on implementation type:bug Bug fix of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants