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

Support Renovate Preset Config Manager #13308

Open
suzuki-shunsuke opened this issue Dec 30, 2021 · 9 comments · May be fixed by #32688
Open

Support Renovate Preset Config Manager #13308

suzuki-shunsuke opened this issue Dec 30, 2021 · 9 comments · May be fixed by #32688
Labels
new package manager New package manager support priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)

Comments

@suzuki-shunsuke
Copy link
Contributor

suzuki-shunsuke commented Dec 30, 2021

What would you like Renovate to be able to do?

Update Renovate Preset Config.

e.g. https://github.com/aquaproj/aqua-renovate-config

AS IS

{
  "extends": [
    "github>aquaproj/aqua-renovate-config#0.1.1"
  ]
}

TO BE

{
  "extends": [
    "github>aquaproj/aqua-renovate-config#0.1.2"
  ]
}

https://docs.renovatebot.com/modules/manager/

There is no manager for Preset Config yet.

If you have any ideas on how this should be implemented, please tell us here.

I think Renovate supports parsing Renovate Config, so it is possible to support this Manager.

Is this a feature you are interested in implementing yourself?

Maybe

@suzuki-shunsuke suzuki-shunsuke added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality) labels Dec 30, 2021
@viceice
Copy link
Member

viceice commented Dec 30, 2021

You can use a Regex manager for it

@rarkins rarkins added priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:ready new package manager New package manager support and removed priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started labels Dec 30, 2021
@github-actions
Copy link
Contributor

Hi there,

You're requesting support for a new package manager. We need to know some basic information about this package manager first. Please copy/paste the new package manager questionnaire, and fill it out in full.

Once the questionnaire is filled out we will evaluate if adding support for this manager is something we want to do.

Good luck,

The Renovate team

@rarkins
Copy link
Collaborator

rarkins commented Dec 30, 2021

I think we can have a dedicated package manager for this.

Should match all our supported file names except package.json.

@suzuki-shunsuke
Copy link
Contributor Author

suzuki-shunsuke commented Dec 30, 2021

New package manager questionnaire

Did you read our documentation on adding a package manager?

Basics

Name of package manager

renovate-preset or renovate-preset-config or renovate-config-preset.

I think renovate-preset is good.

What language does this support?

How popular is this package manager?

I'm not sure.

Does this language have other (competing?) package managers?

  • Yes (give names)
  • No

Package File Detection

What type of package files and names does it use?

#13308 (comment)

https://docs.renovatebot.com/configuration-options/

  • .github/renovate.json
  • .github/renovate.json5
  • .gitlab/renovate.json
  • .gitlab/renovate.json5
  • .renovaterc.json
  • renovate.json
  • renovate.json5
  • .renovaterc

What fileMatch pattern(s) should be used?

Is it likely that many users would need to extend this pattern for custom file names?

  • Yes
  • No

Is the fileMatch pattern likely to get many "false hits" for files that have nothing to do with package management?

No.


Parsing and Extraction

Can package files have "local" links to each other that need to be resolved?

No.

Is there a reason why package files need to be parsed together (in serial) instead of independently?

No reason.

What format/syntax is the package file in?

  • JSON
  • TOML
  • YAML
  • Custom (explain below)

JSON5 is also supported.

How do you suggest parsing the file?

  • Off the shelf parser
  • Using regex
  • Custom-parsed line by line
  • Other

Does the package file structure distinguish between different "types" of dependencies? e.g. production dependencies, dev dependencies, etc?

  • Yes, production and development dependencies
  • No, all dependencies are treated the same

List all the sources/syntaxes of dependencies that can be extracted

Describe which types of dependencies above are supported and which will be implemented in future


Versioning

What versioning scheme does the package file(s) use?

Does this versioning scheme support range constraints, e.g. ^1.0.0 or 1.x?

  • Supports range constraints (e.g ^1.0.0 or 1.x)
  • No

Is this package manager used for applications, libraries, or both? If both, is there a way to tell which is which?

  • Applications
  • Libraries
  • Both (explain how to tell which is which)

If ranges are supported, are there any cases when Renovate should pin ranges to exact versions if rangeStrategy=auto?


Lookup

Is a new datasource required? Provide details

  • Yes, provide details.
  • No.

Will users need the capability to specify a custom host/registry to look up? Can it be found within the package files, or within other files inside the repository, or would it require Renovate configuration?

Do the package files contain any "constraints" on the parent language (e.g. supports only v3.x of Python) or platform (Linux, Windows, etc) that should be used in the lookup procedure?

Will users need the ability to configure language or other constraints using Renovate config?


Artifacts

Are lock files or checksum files used? Are they mandatory?

No.

If so, what tool and exact commands should be used if updating one or more package versions in a dependency file?

If applicable, describe how the tool maintains a cache and if it can be controlled via CLI or env? Do you recommend the cache be kept or disabled/ignored?

If applicable, what command should be used to generate a lock file from scratch if you already have a package file? This will be used for "lock file maintenance"

Other

Is there anything else to know about this package manager?

@suzuki-shunsuke
Copy link
Contributor Author

suzuki-shunsuke commented Dec 30, 2021

#13308 (comment)

You can use a Regex manager for it

I agree, but I think the regular expression is a little complicated and the test and debug is difficult,
so it is ideal that Renovate supports this Manager and Preset Config is updated without configuration by default.

@suzuki-shunsuke
Copy link
Contributor Author

@suzuki-shunsuke
Copy link
Contributor Author

suzuki-shunsuke commented Dec 30, 2021

The other approach is to create a default preset for Renovate Preset Config and add it to config:base.

This is not bad, but Manager for Preset is better.

@reitzig
Copy link

reitzig commented Jan 24, 2023

Came across this today and found it a little amusing that Renovate can not handle itself out of the box. 😉

I would like to add that default.json should also be in the list of files to check as presets can extend other presets (see also #19796).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new package manager New package manager support priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants