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.89k stars 2.37k forks source link

New package manager: earthfile #28362

Open rarkins opened 7 months ago

rarkins commented 7 months ago

New package manager questionnaire

Did you read our documentation on adding a package manager?

Basics

What's the name of the package manager?

earthfile

What language(s) does this package manager support?

Earthly

How popular is this package manager?

Earthly is an OS tool with close to 11,000 Github stars

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

What are the big selling points for this package manager?

It will help support many users to keep their dependencies up to date in Earthly build files.

Explain how this package manager is different from existing ones. The Earthfile syntax is similar to a Dockerfile but is different in a few ways. Creating a dedicated manager to support those differences will provide better support for Earthly users.

Detecting package files

What kind of package files, and names, does this package manager use?

Earthfile

Which fileMatch pattern(s) should Renovate use?

fileMatch: ['(^|/)Earthfile$', '(^|/|).+?\\.earth$']

Do many users need to extend the fileMatch pattern for custom file names?

Is the fileMatch pattern going 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?

Package file parsing method

The package files should be:

Which format/syntax does the package file use?

The Earthfile syntax is similar to that of a Dockerfile

How should we parse the package files?

Does the package file have different "types" of dependencies?

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

The package manager will rely on the docker datasource. It's possible it will rely on a custom datasource to maintain the version of the Earthfile

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

docker is already implemented. To support the Earthfile version we might need to implement a new datasource to retrieve the supported versions (This can currently be done with a regex manager)

Versioning

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

Any versioning scheme that are supported by docker

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

Lookup

Is a new datasource required?

Will users want (or need to) set a custom host or custom registry for Renovate's lookup?

Where can Renovate find the custom host/registry?

Same configuration as done today to access docker images from a private registry.

Are there any constraints in the package files that Renovate should use in the lookup procedure?

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

Artifacts

Does the package manager use a lock file or checksum file?

Is the locksum or checksum mandatory?

If lockfiles or checksums are used: what tool and exact commands should Renovate use to update one (or more) package versions in a dependency file?

Package manager cache

Does the package manager use a cache?

If the package manager uses a cache, how can Renovate control the cache?

Should Renovate keep a cache?

Generating a lockfile from scratch

Renovate can perform "lock file maintenance" by getting the package manager to generate a lockfile from scratch. Can the package manager generate a lockfile from scratch?

Other

What else should we know about this package manager?

I think it should be straightforward to implement by using the same implementation as the dockerfile manager but make some changes based on the syntax differences, and I'll be happy to submit a PR for it.

Originally posted by @idodod in https://github.com/renovatebot/renovate/discussions/28359#discussioncomment-9091642

idodod commented 7 months ago

Thank you @rarkins. Does this mean I can submit a PR for this manager once it's ready?

secustor commented 7 months ago

Yes, this means we will accept PRs for this feature.

HonkingGoose commented 7 months ago

@idodod I'll assign you to the issue so we know you're going to work on this. If you don't want to work on this, let us know, and we'll remove your assignment. :smile:

aslafy-z commented 1 month ago

Is there any news on this new manager impl?

HonkingGoose commented 1 month ago

Hi @idodod, do you still want to work on this issue?