Saturday, May 18, 2024
HomeRuby On RailsConfigure Depfu with config information

Configure Depfu with config information


tldr: Now you can configure the conduct of Depfu by including a config file to your repo, the docs are right here. Lastly!

Listening to characteristic requests from customers is a tough factor. Certain, if lots of people ask for assist of their favourite package deal supervisor, ultimately it is going to make sense for us to construct it. However because the product administration trope goes, individuals usually ask for particular options whereas really, they wish to remedy a selected downside, which isn’t the identical factor. Perhaps the characteristic they requested for is the perfect resolution, however that’s undoubtedly not at all times the case.

Over time, individuals have requested us to assist config information as different instruments do. For a really very long time we’ve been tremendous reluctant so as to add them, as a result of we felt like a) a properly structured UI can clarify your choices significantly better and thus scale back misconfiguration and b) having totally different configs for various branches (in distinction to CI, for instance) doesn’t make a ton of sense for Depfu.

Okay then

At this level we predict that we would have been flawed about this, or, put in another way, it was in all probability not one thing we must always have resisted for therefore lengthy. So, sure, now you can add a file to your repos that may configure all of the settings (aside from privateness delicate settings like tokens and so forth.) the second you push it into the repo or the second you activate the repo on Depfu.

We’ve determined to make this comparatively easy, hopefully not too easy. So as to add a configuration to a repo, merely create a file known as .depfu.yml . Sure, we selected yaml because the configuration language. Our thought right here was that though many individuals hate yaml for its quirks and its ambiguities, you in all probability have already got a few yaml config information in your repo and so that you in all probability have syntax highlighting in your editor, perhaps even a linter in place.

The config syntax may be very flat, in an try to hold each the syntax to be taught (or search for) easy but in addition our parsers. Right here’s an instance from the documentation:

update_strategy: safety

yarn:
  update_strategy: grouped
  grouped_update_schedule: weekly
  grouped_update_start_date: "2022-01-01"
  grouped_update_time: "6:00"

As you may see, you may override settings for particular package deal managers. Moreover, when you have a couple of folder activated out of your repo, you may have a world config file after which have particular overrides within the sub folder. This offers you a considerable amount of flexibility however we implore you to maintain this so simple as potential to not confuse your self (and us).

What occurs with the settings UI

We’ve been a bit lazy with this, for now. You possibly can nonetheless change settings by way of the UI (However it is going to warn you if a config file is current) and it’s merely “final change wins”. So just be sure you and your group agree on a technique of doing it after which sticking to it to stop enjoying a sport of settings ping pong the place group members change settings in each locations to search out out who wins. It’s a enjoyable sport, however in all probability not very productive, all issues thought-about.

The settings web page can be the place to search for error messages. When you’ve got a sense that your config file adjustments haven’t been picked up, there shall be error messages with hopefully helpful error descriptions on that web page.

Why use one or the opposite methodology

Individuals who have requested us for config information usually ask for them as a result of Depfu doesn’t have an idea of group huge defaults (aside from a number of settings).

If you wish to make it possible for all of the initiatives you’re activating in Depfu begin off with the identical set of defaults, then you definitely now can merely drop one file into every of your repos, which is a a lot less complicated factor (and will be dealt with by way of template repos in GitHub) than having to instruct groups to go to the settings web page, and checklist what sort of adjustments they should make to every setting. In that sense, it’s nice for groups that merely have a ton of repos, usually create new ones and that may wish to implement a sure set of normal settings for Depfu.

Alternatively, in case you simply added your first repo to Depfu, the settings web page is far simpler to know, we predict, and doesn’t want further documentation, so we really feel like there’s no want to make use of config information simply because they’re obtainable. The settings UI won’t go away.

You could find the complete documentation right here. Please tell us in case you run into any points or in case you miss one thing.

We hope to ease the ache for larger groups fairly considerably with this modification. Generally the characteristic you need is the characteristic you want.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments