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.47k stars 2.3k forks source link

Some issues after upgrade #1076

Closed Phyks closed 6 years ago

Phyks commented 6 years ago

Hi,

I've just done a git pull origin master; git push heroku master to upgrade my Heroku app of Renovate and ran into some issues. Not sure if they are actual issues or just me doing stupid things :/

  1. First, renovate is not a bash command (not sure if this is intended or not and I don't think this is something new anyways) in Heroku. So, running heroku run renovate works, but not running heroku run "if [ "$(date +%u)" = 3 ]; then renovate -- …". Using yarn run start is a good workaround.

  2. Running heroku run renovate gives an error about start-raw not existing. I guess this is because start-raw is not defined, but used in Procfile.

  3. When running renovate on a repo where it used to work before my upgrade, I now get:

$ node lib/renovate "--platform" "gitlab" "--endpoint" "https://framagit.org/api/v4" "bnjbvr/kresus"
 INFO: Renovating repository (repository=bnjbvr/kresus)
 INFO: renovateRepository loop 1 (repository=bnjbvr/kresus)
 INFO: Found package.json files (repository=bnjbvr/kresus)
       "packageJsonFiles": ["package.json"]
 INFO: Detected package files (repository=bnjbvr/kresus)
       "packageFiles": ["package.json"],
       "count": 1
 INFO: Cannot find package.json (repository=bnjbvr/kresus, packageFile=package.json)
 INFO: No package files found
 INFO: Finished determining repo upgrades
       "seconds": 0.00021814
 INFO: Processing 0 dependency upgrade(s) (repository=bnjbvr/kresus)
 INFO: Processing 0 branch(es) (repository=bnjbvr/kresus)
 INFO: Finished updating branches (repository=bnjbvr/kresus)
       "seconds": 0.000011531
 INFO: Finished repository (repository=bnjbvr/kresus)
 INFO: Renovate finished

I don't get why it does match a package.json but then err with Cannot find package.json. :/

Thanks!

rarkins commented 6 years ago

Hi @Phyks, sorry for the inconvenience. Actually, master branch is not currently the stable 'latest' release on npm, so you probably want to use the 9.x release stream instead of master. Can you change your Heroku setup so that you push branch 9x to Heroku instead of master?

In v10 we have deprecated Node 6 support, which is why things are now "start" and not "start-raw". I've applied a fix to master immediately here: https://github.com/singapore/renovate/commit/f18679e7bfbb8616f039516763b4a3ed3bfea845

In v10 we have also deprecated GitLab APIv3 support, but I see you have a custom v4 endpoint anyway.

  1. Yes, aware that renovate is not a bash command when installed for Heroku's git interface. I don't think that's easy to change
  2. Fixed, as per above
  3. Probably related to the v4 changes, I will see if I can guess at what's happening from a code inspection, but a DEBUG log is always helpful if you can provide it via pastbin or email to me directly (rhys@arkins DOT net).
rarkins commented 6 years ago

So in short, please try something like git pull; git checkout 9x; git push heroku 9x:master to get back to the stable release track.

Phyks commented 6 years ago

Thanks so much!!! Ok, I got it about the releases and I tracked tag v9.99.0 which should be the latest one from npm and everything works great again.

The issue with package.json only appears on master branch with the specified command, it does not appear on other forks I tested it with. I sent you a debug log by email.

Phyks commented 6 years ago

By the way, not sure what is the best way for doing it, but I think https://github.com/singapore/renovate/blob/master/docs/deployment.md#installation-1 should have some hints about git tag and the correct way to push an up to date release version rather than master :)

rarkins commented 6 years ago

Yeah, I'm actually thinking of publishing a separate renovate-heroku repository for people like yourself to clone. That way you can be in more control of which versions of renovate you're using. I will then update the docs accordingly.

Phyks commented 6 years ago

Awesome, thanks so much for the quick fix!