Renovate: all "PR has been edited" incorrectly (bitbucket-cloud)

Created on 25 Jul 2019  路  21Comments  路  Source: renovatebot/renovate

What Renovate type are you using?
Renovate CLI
Describe the bug
each and every PR that is created by renovate-bot is subsequently marked as having been edited on the next run of renovate.
This happens regardless of if we had commits/merges to the master branch, if we even had a look at the PR or changed anything on the PR itself.

Did you see anything helpful in debug logs?

 INFO: Using default Bitbucket Cloud endpoint: https://api.bitbucket.org/
 INFO: Using configured gitAuthor (Jenkins <***>)
 INFO: Autodiscovering Bitbucket Cloud repositories
 INFO: Discovered 1 repositories
 INFO: Renovating repository (repository=teamname/reponame)
 INFO: Initialising git repository into /tmp/renovate/repos/bitbucket/teamname/reponame (repository=teamname/reponame)
 INFO: git clone completed (repository=teamname/reponame)
       "cloneSeconds": 2.3
 INFO: Setting git author (repository=teamname/reponame)
       "gitAuthor": {"name": "Jenkins", "email": "***"}
 INFO: Retrieved Pull Requests (repository=teamname/reponame)
       "length": 31
 INFO: Repository config (repository=teamname/reponame)
       "configFile": "renovate.json",
       "config": {
         "extends": ["config:base"],
         "reviewers": ["***", "***"],
         "packageRules": [{"packagePatterns": [".*"], "groupName": "all deps"}],
         "prConcurrentLimit": 5,
         "prHourlyLimit": 2
       }
 INFO: Found dockerfile package files (repository=teamname/reponame)
 INFO: Extracting dependencies from all gradle files (repository=teamname/reponame)
 INFO: Gradle report complete (repository=teamname/reponame)
 INFO: Found gradle package files (repository=teamname/reponame)
 INFO: Gradle Wrapper (repository=teamname/reponame, depType=gradle-wrapper)
       "datasource": "gradleVersion",
       "depName": "gradle",
       "currentValue": "5.5.1",
       "lineNumber": 5,
       "versionScheme": "semver",
       "gradleWrapperType": "bin"
 INFO: Found gradle-wrapper package files (repository=teamname/reponame)
 INFO: Processing 2 branches: renovate/all-deps, renovate/major-all-deps (repository=teamname/reponame)
 INFO: Comment added (repository=teamname/reponame, dependencies=com.google.code.gson:gson,commons-codec:commons-codec,ma.glasnost.orika:orika-core,org.apache.commons:commons-lang3, branch=renovate/all-deps)
       "prNo": 30
 INFO: Comment added (repository=teamname/reponame, dependencies=net.logstash.logback:logstash-logback-encoder, branch=renovate/major-all-deps)
       "prNo": 31
 INFO: Ensuring master issue (repository=teamname/reponame, dependencies=net.logstash.logback:logstash-logback-encoder, branch=renovate/major-all-deps)
 INFO: Issue updated (repository=teamname/reponame, dependencies=net.logstash.logback:logstash-logback-encoder, branch=renovate/major-all-deps)
 INFO: Finished repository (repository=teamname/reponame)
 INFO: Renovate finished

To Reproduce
I'm unsure about how to reproduce this.

Expected behavior
I would expect renovate to mark PRs only as having been modified if actually something had been changed on it.
Additionally it would be great to get a note about what was changed.

Additional context

  • using current renovate/renovate docker image
  • bitbucket cloud
  • jenkins is the executor
  • this problem started sometime in the last 7 days (I think) and renovate worked great before that
bitbucket priority-2-important bug

All 21 comments

Did you set the gitAuthor after the PRs were created? Or does it happen for new PRs too?

Also please capture with LOG_LEVEL=debug as it hopefully prints something helpful

It happens for new PRs, too.
I'll enable the debug level and get back to you.

I'd say something must be wrong with our logic here: https://github.com/renovatebot/renovate/blob/6f99118f7cfb9a646148455938793c8894d10a01/lib/platform/bitbucket/index.ts#L600-L629

The debug logs should tell us which one.

Cc @ViceIce

https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/

Maybe we don't get the required data. I can add the found author to the debug message.
We really need the debug log.

This is the debug log, I just had to anonymize some things - hope this is helping with the issue anyway.

https://paste.ubuntu.com/p/JxBFrnprcC/

DEBUG: undefined commits so cannot rebase (repository=teamname/reponame, dependencies=net.logstash.logback:logstash-logback-encoder, branch=renovate/major-all-deps)

@ViceIce FWIW it's been on my todo list to use gitFs to determine "canRebase" anyway

if body is defined but body.size is not then it's neither an array or a string so perhaps it's an object?

馃 strange, we schould add some debug if size is missing and log body. maybe we got a wrong response.

@rarkins should i send a pr?

Sure, maybe we fall back to canRebase=true in such cases too?

ok, hopefully we do not destroy user work

I'll log a warning then because size shouldn't be undefined.

let's log the the url we query too

I appreciate your continuous commitment and will continue to follow along tomorrow. Thanks!

@ZyanKLee Please retest with renovate v19.15.2 or greater.

@ZyanKLee Are you sure, you have used the latest renovate? you should get an other message.

No, I didn't - that's why I removed my comment. Sorry for that.
I'm currently rebuilding the docker image and will re-run renovate after that.

Now, with version 19.15.5 : http://paste.ubuntu.com/p/DggkrsyRD3/

Response looks good, but size is missing, maybe i have to change pagelen=2 and check that alternatively.

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

The release is available on:

Your semantic-release bot :package::rocket:

@ZyanKLee Can you please test it again

Hello @ViceIce, sorry for the long phase of silence. I got sidetracked by my main job tasks ;-)
The most recent PRs were "old" ones, so I have to wait for the next updates to happen.

Was this page helpful?
0 / 5 - 0 ratings