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

PR merged before CI could kick in #10326

Closed
1 of 2 tasks
bodinsamuel opened this issue Jun 6, 2021 · 26 comments
Closed
1 of 2 tasks

PR merged before CI could kick in #10326

bodinsamuel opened this issue Jun 6, 2021 · 26 comments
Labels
core:automerge Relating to Renovate's automerge capabilities duplicate This issue is closed as a duplicate of another issue priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality

Comments

@bodinsamuel
Copy link
Contributor

bodinsamuel commented Jun 6, 2021

How are you running Renovate?

  • WhiteSource Renovate hosted app on github.com
  • Self hosted

Describe the bug

A PR for prettier v2.3.1 was created and merged in the same minute, the CI did not trigger and the merge was done in a branch without protection, resulting in a failing branch.
I guess it's not "a bug" as it work as intended, but maybe it should be safer to wait just a bit before merging.

Solutions

For those reading,

  • adding a branch protection with required CI should probably do the trick (but prevent automerge).
  • removing the statibility-days from your config
@bodinsamuel bodinsamuel added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality labels Jun 6, 2021
@HonkingGoose
Copy link
Collaborator

Please use the full bug report template, don't delete things from the template.

I think we'll need Renovate and GitHub configuration and log output to pinpoint the cause of the "too-quick-merge".

@HonkingGoose HonkingGoose added auto:logs Issue or Discussion is needs logs/more logs auto:reproduction A minimal reproduction is necessary to proceed labels Jun 6, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2021

Hi there,

We have found that there's a problem with the logs. Depending on which situation applies follow one, some or all of these instructions.

No logs at all

If there's no log posted yet, we need you to find and copy/paste the log into the issue template.

Finding logs on hosted app

Click me to read instructions

If you use the Renovate app (GitHub):

  1. Go to the affected PR, and search for "View repository job log here"
  2. Click on the link to go to the "WhiteSource Renovate Dashboard" and log in
  3. You are now in the correct repository log overview screen
  4. Copy/paste the correct log
  5. Follow the steps in the formatting your logs section

Finding logs when self-hosting

Click me to read instructions

If you're running self-hosted, run with LOG_LEVEL=debug in your environment variables and search for whatever dependency/branch/PR that is causing the problem.

Insufficient logs

Click me to read instructions

If you already provided logs, and the Renovate team said they are not enough, follow the instructions from the No logs at all section.

Formatting your logs

Click me to read instructions

Please put your logs in a <details> and <summary> element like this:

<details><summary>Click me to see logs</summary>

```
Copy/paste any log here, between the starting and ending backticks
```

</details>

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2021

Hi there,

Help us by making a minimal reproduction repository.

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 creating a minimal reproduction to understand what is needed.

We may close the issue if you (or someone else) 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

@rarkins
Copy link
Collaborator

rarkins commented Jun 6, 2021

Renovate doesn't automerge unless there's at least one passed status check and no pending or failed checks.

The proposal to "just wait a bit before merging" as a general rule is not feasible because 90% of users would like automerges to happen faster and it's only a problem because of GitHub misconfiguration anyway.

If Renovate merged in either of these situations then it should be treated as a bug:

  • In the same run as the branch was created, or
  • With no status checks being made at all, other than Renovate's own

A reproduction is best, but failing that then we need the logs for the run when the automerge happened so we can see if there's any hint as to why Renovate thought it safe to merge. Without that, we should close it.

@bodinsamuel
Copy link
Contributor Author

Not sure how to find back the logs because there are hundreds of jobs. (would be great to post a comment or update PR with job ids)
Basically it was merged I suppose because of the stability days check was green right away.

Screen Shot 2021-06-07 at 18 24 55

@rarkins
Copy link
Collaborator

rarkins commented Jun 7, 2021

You can find the exact timestamp of the merge commit and then find the job which occurred at that time.

@bodinsamuel
Copy link
Contributor Author

bodinsamuel commented Jun 7, 2021

Click me to see logs ``` DEBUG: Setting current branch to chore/renovateBaseBranch(branch="renovate/prettier-2.x") DEBUG: latest commit(branch="renovate/prettier-2.x") { "branchName": "chore/renovateBaseBranch", "latestCommitDate": "2021-06-06T14:14:44+02:00" } DEBUG: branchExists=true(branch="renovate/prettier-2.x") DEBUG: dependencyDashboardCheck=unschedule(branch="renovate/prettier-2.x") DEBUG: PR rebase requested=false(branch="renovate/prettier-2.x") DEBUG: Checking if PR has been edited(branch="renovate/prettier-2.x") DEBUG: Found existing branch PR(branch="renovate/prettier-2.x") DEBUG: Checking schedule(on the first week of the month on saturday, sunday, Europe/Paris)(branch="renovate/prettier-2.x") DEBUG: Found timezone(branch="renovate/prettier-2.x") { "timezone": "Europe/Paris" } DEBUG: Adjusting now for timezone(branch="renovate/prettier-2.x") DEBUG: Checking 1 schedule(s)(branch="renovate/prettier-2.x") DEBUG: Checking schedule "on the first week of the month on saturday, sunday"(branch="renovate/prettier-2.x") { "parsedSchedule": { "schedules": [ { "wm": [ 1 ], "d": [ 7, 1 ] } ], "exceptions": [], "error": -1 } } DEBUG: Package not scheduled(branch="renovate/prettier-2.x") DEBUG: Branch already exists(branch="renovate/prettier-2.x") DEBUG: IsBranchStale=true(branch="renovate/prettier-2.x") { "isStale": true, "branches": { "all": [ "origin/chore/renovateBaseBranch", "origin/renovate/dd-trace-0.x", "origin/renovate/eslint-7.x", "origin/renovate/helmet-4.x" ], "branches": { "origin/chore/renovateBaseBranch": { "current": false, "name": "origin/chore/renovateBaseBranch", "commit": "8d9c7ba", "label": "chore(deps): update dependency mocha to v8.4.0 (#7567)" }, "origin/renovate/dd-trace-0.x": { "current": false, "name": "origin/renovate/dd-trace-0.x", "commit": "4a3c523", "label": "fix(deps): update dependency dd-trace to v0.34.0" }, "origin/renovate/eslint-7.x": { "current": false, "name": "origin/renovate/eslint-7.x", "commit": "412596b", "label": "fix(deps): update dependency eslint to v7.28.0" }, "origin/renovate/helmet-4.x": { "current": false, "name": "origin/renovate/helmet-4.x", "commit": "76139e0", "label": "fix(deps): update dependency helmet to v4.6.0" } }, "current": "", "detached": false }, "currentBranch": "chore/renovateBaseBranch", "currentBranchSha": "8d9c7ba1c1c28c0c40e357567cdbbd098b91d9d1" } DEBUG: Branch is stale and needs rebasing(branch="renovate/prettier-2.x") DEBUG: Using reuseExistingBranch: false(branch="renovate/prettier-2.x") DEBUG: manager.getUpdatedPackageFiles() reuseExistinbranch=false(branch="renovate/prettier-2.x") DEBUG: npm.updateDependency(): dependencies.prettier = 2.3.1(branch="renovate/prettier-2.x") DEBUG: Updating prettier in src/-isolated/package.json(branch="renovate/prettier-2.x") DEBUG: npm.updateDependency(): devDependencies.prettier = 2.3.1(branch="renovate/prettier-2.x") DEBUG: Updating prettier in src/-admin/package.json(branch="renovate/prettier-2.x") DEBUG: npm.updateDependency(): devDependencies.prettier = 2.3.1(branch="renovate/prettier-2.x") DEBUG: Updating prettier in package.json(branch="renovate/prettier-2.x") DEBUG: Updated 3 package files(branch="renovate/prettier-2.x") DEBUG: Getting updated lock files(branch="renovate/prettier-2.x") DEBUG: Writing package.json files(branch="renovate/prettier-2.x") { "packageFiles": [ "cypress/package.json", "package.json", "scripts/package.json", [...] ] } DEBUG: Writing any updated package files(branch="renovate/prettier-2.x") DEBUG: Writing src/-isolated/package.json(branch="renovate/prettier-2.x") DEBUG: Writing src/-admin/package.json(branch="renovate/prettier-2.x") DEBUG: Writing package.json(branch="renovate/prettier-2.x") DEBUG: npmrc file found in repository(branch="renovate/prettier-2.x") DEBUG: Generating yarn.lock for .(branch="renovate/prettier-2.x") DEBUG: Spawning yarn install to create /mnt/renovate/gh//yarn.lock(branch="renovate/prettier-2.x") DEBUG: Using node constraint "14.17.0" from package.json(branch="renovate/prettier-2.x") DEBUG: Using docker to execute(branch="renovate/prettier-2.x") DEBUG: Found version constraint - checking for a compatible image to use(branch="renovate/prettier-2.x") { "depName": "docker.io/renovate/node", "scheme": "npm", "constraint": "14.17.0" } DEBUG: Found compatible image version(branch="renovate/prettier-2.x") { "depName": "docker.io/renovate/node", "scheme": "npm", "constraint": "14.17.0", "version": "14.17.0" } DEBUG: Resolved tag constraint(branch="renovate/prettier-2.x") { "image": "docker.io/renovate/node", "tagConstraint": "14.17.0", "tagVersioning": "npm", "tag": "14.17.0" } DEBUG: Docker image is already prefetched: docker.io/renovate/node:14.17.0(branch="renovate/prettier-2.x") DEBUG: Executing command(branch="renovate/prettier-2.x") { "command": "docker run --rm --name=renovate_node --label=renovate_child -v \"/mnt/renovate/gh/\":\"/mnt/renovate/gh/\" -v \"/tmp/renovate-cache\":\"/tmp/renovate-cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e CI -e YARN_ENABLE_IMMUTABLE_INSTALLS -e YARN_HTTP_TIMEOUT -e YARN_ENABLE_SCRIPTS -w \"/mnt/renovate/gh/\" docker.io/renovate/node:14.17.0 bash -l -c \"npm i -g yarn && yarn install\"" } DEBUG: exec completed(branch="renovate/prettier-2.x") { "cmd": "docker run --rm --name=renovate_node --label=renovate_child -v \"/mnt/renovate/gh/\":\"/mnt/renovate/gh/\" -v \"/tmp/renovate-cache\":\"/tmp/renovate-cache\" -e NPM_CONFIG_CACHE -e npm_config_store -e CI -e YARN_ENABLE_IMMUTABLE_INSTALLS -e YARN_HTTP_TIMEOUT -e YARN_ENABLE_SCRIPTS -w \"/mnt/renovate/gh/\" docker.io/renovate/node:14.17.0 bash -l -c \"npm i -g yarn && yarn install\"", "durationMs": 40219, "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.327s\n➤ YN0000: ┌ Resolution step\n➤ YN0002: │ @-admin@workspace:src/-admin doesn't provide @popperjs/core (p74662), requested by react-popper\n➤ YN0002: │ @-admin@workspace:src/-admin doesn't provide jest (p2bf8f), requested by ts-jest\n➤ YN0002: │ [...], "stderr": "" } DEBUG: yarn.lock needs updating(branch="renovate/prettier-2.x") DEBUG: updateYarnOffline resolvedPaths(branch="renovate/prettier-2.x") { "resolvedPaths": [ ".yarn/cache", ".pnp" ] } DEBUG: Updated 1 lock files(branch="renovate/prettier-2.x") { "updatedArtifacts": [ "yarn.lock" ] } DEBUG: Retrieved closed PR list with graphql(branch="renovate/prettier-2.x") { "prNumbers": [ [...] 7570 ] } DEBUG: Getting comments for #7571(branch="renovate/prettier-2.x") DEBUG: Found 0 comments(branch="renovate/prettier-2.x") DEBUG: 4 file(s) to commit(branch="renovate/prettier-2.x") DEBUG: Committing files to branch renovate/prettier-2.x(branch="renovate/prettier-2.x") DEBUG: git commit(branch="renovate/prettier-2.x") { "result": { "author": null, "branch": "renovate/prettier-2.x", "commit": "aca6f7d", "root": false, "summary": { "changes": 4, "insertions": 16, "deletions": 7 } } } DEBUG: git push(branch="renovate/prettier-2.x") { "result": { "pushed": [], "branch": { "local": "renovate/prettier-2.x", "remote": "renovate/prettier-2.x", "remoteName": "origin" }, "remoteMessages": { "all": [] } } } INFO: Branch updated(branch="renovate/prettier-2.x") { "commitSha": "aca6f7d" } DEBUG: Updating renovate/stability-days status check state to green(branch="renovate/prettier-2.x") DEBUG: Setting branch status(branch="renovate/prettier-2.x") { "context": "renovate/stability-days", "state": "green" } DEBUG: Checking if we can automerge branch(branch="renovate/prettier-2.x") DEBUG: mergeStatus=no automerge(branch="renovate/prettier-2.x") DEBUG: Ensuring PR(branch="renovate/prettier-2.x") DEBUG: There are 0 errors and 0 warnings(branch="renovate/prettier-2.x") DEBUG: Found existing PR(branch="renovate/prettier-2.x") DEBUG: Removing duplicate release notes(branch="renovate/prettier-2.x") { "depName": "prettier" } DEBUG: getBranchStatus(renovate/prettier-2.x)(branch="renovate/prettier-2.x") DEBUG: branch status check result(branch="renovate/prettier-2.x") { "state": "success", "statuses": [ { "url": "https://api.github.com/repos//statuses/", "avatar_url": "https://avatars.githubusercontent.com/in/2740?v=4", "id": 13344228507, "node_id": "MDEzOlN0YXR1c0NvbnRleHQxMzM0NDIyODUwNw==", "state": "success", "description": "Updates have met stability days requirement", "target_url": "https://docs.renovatebot.com/", "context": "renovate/stability-days", "created_at": "2021-06-06T12:39:48Z", "updated_at": "2021-06-06T12:39:48Z" } ] } DEBUG: No check runs found(branch="renovate/prettier-2.x") { "result": { "total_count": 0, "check_runs": [] } } DEBUG: Processing existing PR(branch="renovate/prettier-2.x") DEBUG: getBranchStatus(renovate/prettier-2.x)(branch="renovate/prettier-2.x") DEBUG: branch status check result(branch="renovate/prettier-2.x") { "state": "success", "statuses": [ { "url": "https://api.github.com/repos//statuses/", "avatar_url": "https://avatars.githubusercontent.com/in/2740?v=4", "id": 13344228507, "node_id": "MDEzOlN0YXR1c0NvbnRleHQxMzM0NDIyODUwNw==", "state": "success", "description": "Updates have met stability days requirement", "target_url": "https://docs.renovatebot.com/", "context": "renovate/stability-days", "created_at": "2021-06-06T12:39:48Z", "updated_at": "2021-06-06T12:39:48Z" } ] } DEBUG: No check runs found(branch="renovate/prettier-2.x") { "result": { "total_count": 0, "check_runs": [] } } DEBUG: getBranchStatus() result(branch="renovate/prettier-2.x") { "branchStatus": "green", "branchName": "renovate/prettier-2.x" } DEBUG: Pull Request #7571 does not need updating(branch="renovate/prettier-2.x") DEBUG: PR is configured for automerge(branch="renovate/prettier-2.x") DEBUG: getBranchStatus(renovate/prettier-2.x)(branch="renovate/prettier-2.x") DEBUG: branch status check result(branch="renovate/prettier-2.x") { "state": "success", "statuses": [ { "url": "https://api.github.com/repos//statuses/", "avatar_url": "https://avatars.githubusercontent.com/in/2740?v=4", "id": 13344228507, "node_id": "MDEzOlN0YXR1c0NvbnRleHQxMzM0NDIyODUwNw==", "state": "success", "description": "Updates have met stability days requirement", "target_url": "https://docs.renovatebot.com/", "context": "renovate/stability-days", "created_at": "2021-06-06T12:39:48Z", "updated_at": "2021-06-06T12:39:48Z" } ] } DEBUG: No check runs found(branch="renovate/prettier-2.x") { "result": { "total_count": 0, "check_runs": [] } } DEBUG: Automerging #7571(branch="renovate/prettier-2.x") DEBUG: mergePr(7571, renovate/prettier-2.x)(branch="renovate/prettier-2.x") DEBUG: mergePr(branch="renovate/prettier-2.x") { "options": { "body": { "merge_method": "squash" } }, "url": "repos//pulls/7571/merge" } DEBUG: PR merged(branch="renovate/prettier-2.x") { "pr": 7571 } DEBUG: No remote branch to delete(branch="renovate/prettier-2.x") { "branchName": "renovate/prettier-2.x" } DEBUG: No local branch to delete(branch="renovate/prettier-2.x") { "branchName": "renovate/prettier-2.x" } INFO: PR automerged(branch="renovate/prettier-2.x") { "pr": 7571, "prTitle": "fix(deps): update dependency prettier to v2.3.1" } DEBUG: No remote branch to delete(branch="renovate/prettier-2.x") { "branchName": "renovate/prettier-2.x" } DEBUG: No local branch to delete(branch="renovate/prettier-2.x") { "branchName": "renovate/prettier-2.x" } DEBUG: getBranchPr(renovate/core-js-3.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/core-js-3.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/core-js-3.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/cypress-multi-reporters-1.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/cypress-multi-reporters-1.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/cypress-multi-reporters-1.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/nock-13.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/nock-13.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/nock-13.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/postcss-8.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/postcss-8.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/postcss-8.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: Found PR #7299(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/postcss-loader-4.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/postcss-loader-4.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/postcss-loader-4.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/stylelint-13.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/stylelint-13.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/stylelint-13.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/docker.elastic.co-kibana-kibana-7.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/docker.elastic.co-kibana-kibana-7.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/docker.elastic.co-kibana-kibana-7.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/elastic-elasticsearch-7.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/elastic-elasticsearch-7.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/elastic-elasticsearch-7.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/slack-web-api-6.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/slack-web-api-6.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/slack-web-api-6.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/ajv-8.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/ajv-8.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/ajv-8.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/connect-redis-5.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/connect-redis-5.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/connect-redis-5.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/dd-trace-0.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/dd-trace-0.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: Found PR #7573(branch="renovate/prettier-2.x") DEBUG: PR not found in open or closed PRs list - trying to fetch it directly(branch="renovate/prettier-2.x") { "prNo": 7573 } DEBUG: getBranchPr(renovate/eslint-7.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/eslint-7.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: Found PR #7574(branch="renovate/prettier-2.x") DEBUG: PR not found in open or closed PRs list - trying to fetch it directly(branch="renovate/prettier-2.x") { "prNo": 7574 } DEBUG: getBranchPr(renovate/helmet-4.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/helmet-4.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: Found PR #7575(branch="renovate/prettier-2.x") DEBUG: PR not found in open or closed PRs list - trying to fetch it directly(branch="renovate/prettier-2.x") { "prNo": 7575 } DEBUG: getBranchPr(renovate/postcss-normalize-10.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/postcss-normalize-10.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/postcss-normalize-10.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/sass-loader-12.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/sass-loader-12.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/sass-loader-12.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/ts-node-10.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/ts-node-10.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/ts-node-10.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/major-27-jest-monorepo)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/major-27-jest-monorepo, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/major-27-jest-monorepo, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/cimg-node-15.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/cimg-node-15.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/cimg-node-15.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/node-15.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/node-15.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/node-15.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/cimg-node-16.x)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/cimg-node-16.x, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/cimg-node-16.x, undefined, closed)(branch="renovate/prettier-2.x") DEBUG: getBranchPr(renovate/lock-file-maintenance)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/lock-file-maintenance, undefined, open)(branch="renovate/prettier-2.x") DEBUG: findPr(renovate/lock-file-maintenance, undefined, closed)(branch="renovate/prettier-2.x") INFO: Renovating repository again after automerge result(branch="renovate/prettier-2.x") DEBUG: No dangling containers to remove(branch="renovate/prettier-2.x") ```

@HonkingGoose HonkingGoose removed the auto:logs Issue or Discussion is needs logs/more logs label Jun 8, 2021
@HonkingGoose
Copy link
Collaborator

Thank you @bodinsamuel for providing the log! 😄 I've removed the logs:problem label as we now have logs! 🎉

Please put your log behind a toggle. See the "formatting your logs" section of this post: #10326 (comment) to learn how you can do this. This way the logs take up less visual space.

@rarkins
Copy link
Collaborator

rarkins commented Jun 8, 2021

OK, I agree that this is undesirable behavior and we should treat it as a bug. I think this is what the logs show:

  • The branch and PR existed
  • Branch was stale, so needed rebasing
  • stabilityDays check was met
  • PR automerge check was run
  • stabilityDays check was green, no other tests were pending
  • PR was automerged

Two different approaches to solving this:

@rarkins rarkins added priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others core:automerge Relating to Renovate's automerge capabilities and removed priority-5-triage auto:reproduction A minimal reproduction is necessary to proceed labels Jun 8, 2021
@travi
Copy link
Contributor

travi commented Jun 10, 2021

it looks like you already have a plan for this, but i just had a case of what appears to be this behavior, so providing it in case another example is helpful: travi-org/presentations.travi.org#384. it looks like the WIP app reported back quickly, but CI failed after the merge.

are there other details that would be helpful beyond what was already provided by the OP?

@yangm97
Copy link

yangm97 commented Aug 30, 2021

This reproduces randomly for me on gitlab.com. Unlike the others I don't use an external CI, just plain GitLab CI pipelines.

It sure looks like a bug on their end as I have checked "pipelines must succeed" and status checks keeps flapping between gitlab ci + renovate, renovate only and gitlab ci only. Still it would be nice if Renovate could workaround it, if possible.

@bodinsamuel
Copy link
Contributor Author

hey,

Just pinging back, it seems to happen quite a lot lately (maybe because something is even faster on your end ahah).
Another "solution" would be have a minimum lifespan for a PR before merging.

@viceice
Copy link
Member

viceice commented Feb 18, 2022

@bodinsamuel please open a new discussion and provide your config. Maybe we can identify a config issue, as I've never seen this issue on my self hosted renovate's nor on GitHub app.

@travi
Copy link
Contributor

travi commented Feb 18, 2022

i would second that i've seen more of this happening lately. when it does happen, i often don't notice it for a bit on projects that i'm not actively working on, so sometimes the logs for the run that resulted in the merge are already unavailable.

for example, i just reverted this one this morning and only noticed it because another update PR that I would have expected to auto-merge cleanly didnt. you can see that this one had been open for a while already, but prevented from merging because of failed CI runs. CI did still fail, but only after the merge had already happened.

@travi
Copy link
Contributor

travi commented Feb 18, 2022

also, i've seen the recommendation to enable branch protection suggested, but i use trunk-based development in most cases, so branch protection would unfortunately prevent pushing directly to the mainline. (i really wish it was possible to enable protection when branches are used, but not enforce for direct pushes)

@bodinsamuel
Copy link
Contributor Author

bodinsamuel commented Feb 18, 2022

Here an example:
algolia/dns-filter#226

job id is one of those one 581744297, 581744283, 581744265, 581695208 (please make it available in the PR 😢 )

Another:
algolia/renderscript#549
jobid: 581723407

@viceice
Copy link
Member

viceice commented Feb 18, 2022

also, i've seen the recommendation to enable branch protection suggested, but i use trunk-based development in most cases, so branch protection would unfortunately prevent pushing directly to the mainline. (i really wish it was possible to enable protection when branches are used, but not enforce for direct pushes)

That's wrong, you can push to main branch even with protection, you just need the appropriate rights.

And if you directly push to main, you can probably Brak that branch too. You should really avoid that

@travi
Copy link
Contributor

travi commented Feb 18, 2022

you just need the appropriate rights

admin level access is the only exception, unfortunately, which doesn't cover a valid trunk-based development workflow in use for a whole team

And if you directly push to main, you can probably Brak that branch too. You should really avoid that

when doing trunk-based development, it is important to run verification before pushing (ideally before each commit), so git hooks become very valuable in such workflows. along those lines, though, it is also possible to force-push to the mainline if no protection is enabled. this is why i do add a protection rule against the mainline branch, including for admins to prevent accidents. since github only allows one branch protection rule, it is not possible to include admins for that protection but not for check requirements, even if all that needed to push to mainline were admins.

either way, i doubt this is really the place to debate the validity of trunk-based development. i was just trying to communicate the context of my common repo configuration where i've seen this case come up. i understand this type of workflow may not be the most common, but i hope it can be considered as a valid one in the context of the huge amount of value that renovate provides.

@Cubox
Copy link

Cubox commented Apr 14, 2022

Hi,

I had this issue occur as well. Renovate was automerging before the tests were done. After checking the logs (won't share because they're from a private repo), it looks like it declared all the tests were green because the stability test was green, and merged before the actual CI tests could even start.
I fixed it by removing the stability requirement in the renovate.json config.

@richardkazuomiller
Copy link

This happened to me today 🤔. I guess it's just bad luck? It would be nice if we could have some setting to make Renovate only merge if PRs are older than n minutes.

My logs:

 INFO: Branch created (repository={my-company}/{my-repo}, branch=renovate/next-babel-loader-8.x)
       "commitSha": "..."
 INFO: PR created (repository={my-company}/{my-repo}, branch=renovate/next-babel-loader-8.x)
       "pr": 1129,
       "prTitle": "chore(deps): update dependency babel-loader to v8.2.5 (next)"
 INFO: PR automerged (repository={my-company}/{my-repo}, branch=renovate/next-babel-loader-8.x)
       "pr": 1129,
       "prTitle": "chore(deps): update dependency babel-loader to v8.2.5 (next)"

@Cubox
Copy link

Cubox commented May 10, 2022

The most easy fix should just be to not consider the stability check as a green check for automerging.
This will let the actual check kick in and everything should work

@rarkins
Copy link
Collaborator

rarkins commented May 28, 2022

Agreed, so let's mark this as a duplicate of #7800

@rarkins rarkins added the duplicate This issue is closed as a duplicate of another issue label May 28, 2022
@rarkins
Copy link
Collaborator

rarkins commented May 28, 2022

Duplicate of #7800

@rarkins rarkins marked this as a duplicate of #7800 May 28, 2022
@rarkins rarkins closed this as completed May 28, 2022
@richardkazuomiller
Copy link

Wouldn't ignoring the age check still make it be zero pending checks and make the PR look to Renovate Bot like it's ready to be merged? You would know better than I, but just thought I would mention it 😅

@viceice
Copy link
Member

viceice commented May 29, 2022

nope. by default renovate required at least one successful status check

@richardkazuomiller
Copy link

Cool, thanks 😊

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core:automerge Relating to Renovate's automerge capabilities duplicate This issue is closed as a duplicate of another issue priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality
Projects
None yet
Development

No branches or pull requests

8 participants