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

Use default empty configuration instead of configuration file default location #6

Closed
Djiit opened this issue Apr 8, 2020 · 15 comments · Fixed by #11
Closed

Use default empty configuration instead of configuration file default location #6

Djiit opened this issue Apr 8, 2020 · 15 comments · Fixed by #11
Assignees

Comments

@Djiit
Copy link

Djiit commented Apr 8, 2020

Following renovatebot/renovate#5881,

When a user doesn't pass the configurationFile attribute, it should use an enmpty configuration and rely only on the renovate.json configuration.

Avoiding two files configuration :)

@jdbruijn
Copy link
Collaborator

jdbruijn commented Apr 8, 2020

Hi @Djiit ,

Thanks for raising an issue. I've gone through renovatebot/renovate#5881 and have a few followup questions to understand your problem better.

  • Are you only using the self-hosted renovate (i.e. not in addition to the GitHub Renovate App)?
  • Are you only using the self-hosted renovate to update contents of the repository it is running on?

@Djiit
Copy link
Author

Djiit commented Apr 8, 2020

Hi @jdbruijn ,

Thanks for your quick answer :).

  • I'm only using Github Actions to run Renovate.
  • Yes, the Github Action only act on its repo.

You can find an example here :

More context: I have been doing this for a couple months now (https://dev.to/djiit/keep-your-dependencies-up-to-date-with-renovate-and-github-actions-3b2m), but it suddently stopped working and complaining about artifacts upload problems a few weeks ago.

@jdbruijn
Copy link
Collaborator

jdbruijn commented Apr 9, 2020

Cool, thanks for sharing those setups! We could make the configurationFile optional and default to a config file that just does module.exports = {};. That should fix this issue. I'll write something for that soon and also add an example/end-to-end test for that setup to this repository (might take a bit longer that usual since we just moved this repository to Renovate and I have to update some stuff locally). I previously hadn't considered that setup, so thanks for pointing it out!

Just out of curiosity, is there any specific reason you use self-hosted Renovate instead of e.g. the Renovate GitHub App? Doesn't look like you're doing anything specific in your setup that requires a self-hosted instance.

@Djiit
Copy link
Author

Djiit commented Apr 9, 2020

Awesome !

We've been using Renovate at work using our own instance so you we could self-host it and have more control over it than the GitHub app (and using it for private and Publix repos). So when I started using it on my side project, I think I just replicated the self-hosted scheme.

What would be the difference for me actually?

Thanks again for taking this time to discuss 🙏

@jdbruijn
Copy link
Collaborator

jdbruijn commented Apr 9, 2020

For your personal repos at least, the main difference would be that using the Renovate GitHub App will be more responsive as you're not stuck to a schedule. Especially when you run it only once a week, using the app will allow you to quickly rebase the created PR's and update the active PR's when new versions become available and the PR is not (yet) merged.
Additionally, the app will be easier to setup across a bunch of repositories and you could configure per repository access, compared to a PAT where you automatically give access to all your and your organisation's repositories if you use a personal PAT.

One downside used to be that the app couldn't update GitHub Actions workflows, but 2 days ago GitHub added that to the app permissions, so either it is already possible to use the app to update workflows or it could be soon (don't quote me on that, as I haven't tested it or confirmed it).

@viceice
Copy link
Member

viceice commented Apr 9, 2020

Github action updates are not possible, because git push access is denied for apps, even with new permissions

@jdbruijn
Copy link
Collaborator

jdbruijn commented Apr 9, 2020

@viceice Thanks for pointing that out! I had no idea as the GitHub post is not elaborate at all, but hints that the new permissions enables apps to edit the workflows. What then is the whole point of the new permission?

A new permission has been added that enables GitHub Apps to edit GitHub Actions workflow files.

@viceice
Copy link
Member

viceice commented Apr 9, 2020

Maybe this allows only updating via github api. I've tested it and git push fails 😢

https://github.com/viceice/renovate-gh-npm-test/blob/7cb0e9bd46fc8b224962486001096877a87318f6/.github/workflows/nodejs.yml#L20

@jdbruijn
Copy link
Collaborator

jdbruijn commented Apr 9, 2020

Okay too bad, would have been nice! Thanks for testing it though.

@jdbruijn
Copy link
Collaborator

Hi @Djiit,

I was just testing this and found only using the renovate.json file would only work if you also set an env variable for RENOVATE_REPOSITORIES. See that test here and here. I think that would get a little bit messy, configuration wise that is. I'm currently testing only using the config.js file, so without the renovate.json file. If that works you can still eliminate having multiple config files, only then you would keep the config.js file! Will let you know when I have those results.

@jdbruijn jdbruijn self-assigned this Apr 10, 2020
@jdbruijn
Copy link
Collaborator

Okay, so @Djiit you can run this with only the config.js file. See this build. And config.js.

These are the two important configurations that allows you to only use the one configuration file. You do however not get the onboarding PR, but when you're familiar with the process I personally think that shouldn't be an problem.

  onboarding: false,
  requireConfig: false,

Could you please let me know if this solution works for you? If so, I can update the documentation to reflect this setup and configuration requirements for this setup.

@Djiit
Copy link
Author

Djiit commented Apr 10, 2020

Hey,

Yeah I don't need the onboarding PR :). I've tested this in an Action just now and it seems to be fined. My schedule action will run tomorrow at 10am Paris time. If everything goes well, it will be good :)

@Djiit
Copy link
Author

Djiit commented Apr 11, 2020

Working like a charm wikiwarsgg/soundboard#6 :)

@Djiit
Copy link
Author

Djiit commented Apr 11, 2020

May I suggest we use renovate.config.js as a default (or suggestion) ? Having this as an official standard would enable such things as VSCode using the right icon (vscode-icons/vscode-icons#2445)

@jdbruijn
Copy link
Collaborator

Working like a charm wikiwarsgg/soundboard#6 :)

Awesome! I'll add a note about this kind of setup to the readme to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants