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

feat(devbox): Add devbox manager and nixhub datasource and versioning #30002

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

burritobill
Copy link

Changes

This PR adds a devbox manager https://www.jetify.com/devbox. Devbox is a local development tool
which creates local reproducible environments without docker containers.

Devbox uses Nixhub as it's datasource for releases, nixhub datasource and versioning code has been added.

Context

I am making these changes on behalf of Culture Amp as we are using renovate internally and have recently migrated to using devbox for our local developer environments.
This PR will ensure that all of our devbox.json files stay up to date with the rest of our repos.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@CLAassistant
Copy link

CLAassistant commented Jul 3, 2024

CLA assistant check
All committers have signed the CLA.

@burritobill burritobill changed the title Add devbox feat(devbox): Add devbox manager and nixhub datasource and versioning Jul 3, 2024
@Lagoja
Copy link

Lagoja commented Jul 3, 2024

Thanks @burritobill! Our team at at Jetify is excited to see this integration that Renovate will work with Devbox. I can confirm that the Nixhub APIs used here are correct and stable.

lib/modules/versioning/nixhub/index.ts Outdated Show resolved Hide resolved
lib/modules/versioning/nixhub/index.ts Outdated Show resolved Hide resolved
lib/modules/versioning/nixhub/index.spec.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add links/URLs

enabled: true,
};

export const categories: Category[] = ['devbox', 'node'];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export const categories: Category[] = ['devbox', 'node'];
export const categories: Category[] = ['node'];

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I will just remove these categories, I'm unsure if it is even required?

lib/modules/datasource/nixhub/index.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/devbox/artifacts.ts Outdated Show resolved Hide resolved

let cmd = '';
if (updateConfig.config.isLockFileMaintenance) {
cmd += 'devbox update';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

devbox will need adding to github.com/containerbase/base first

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does devbox update fully wipe/refresh the lock file?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add devbox to the containerbase repo now.

Yes it will recreate it if it is out of sync with the devbox.json

lib/modules/manager/devbox/artifacts.ts Show resolved Hide resolved
if (updateConfig.config.isLockFileMaintenance) {
cmd += 'devbox update';
} else {
cmd += 'devbox install';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does devbox install sync the lock file to the package file if they are out of sync?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it does

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after first round of reviews this PR should be split into 3 separate PR's.

  1. refactorings (if required)
  2. versioning
  3. datasource
  4. manager

@burritobill
Copy link
Author

after first round of reviews this PR should be split into 3 separate PR's.

  1. refactorings (if required)
  2. versioning
  3. datasource
  4. manager

My plan is to add devbox to the containerbase, then should I split this PR into the datasource and versioning PRs and then once those are merged I can make the manager PR as it relies on the other 2?

@burritobill
Copy link
Author

My priorities at work are meaning that I probably won't be able to get back round to this PR for a few weeks, but I would appreciate if you can keep this one open for me until then.
Sorry for being slow at fixing this one up.

@viceice viceice marked this pull request as draft July 29, 2024 06:30
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 this pull request may close these issues.

None yet

6 participants