Skip to content

Conversation

lingdie
Copy link
Collaborator

@lingdie lingdie commented Aug 1, 2025

This pull request makes significant changes to the Devbox controller API by removing the DevBoxRelease and OperationRequest CRDs, refactoring the commit history structure, and updating several fields and annotations in the main Devbox API. It also updates tool versions and cleans up unused fields, which streamlines the codebase and improves maintainability.

API Resource Removal

  • Removed the DevBoxRelease and OperationRequest custom resource definitions (CRDs) from the API, including all related type definitions and generated deepcopy methods. This simplifies the API and reduces maintenance overhead. [1] [2] [3] [4]

Commit History Refactor

  • Replaced the CommitHistory struct with a new CommitRecord struct and CommitRecordMap, updating all related fields and generated deepcopy logic to support a more flexible commit tracking model. [1] [2] [3] [4]

DevboxSpec and DevboxStatus Updates

  • Added new fields and annotations to DevboxSpec, such as StorageLimit and improved defaulting and validation for state. Updated DevboxStatus to include contentID, a default state, and the new commitRecords field. [1] [2] [3] [4]
  • Removed unused or commented fields such as Ports, AppPorts, and ExtraPorts from the API and deepcopy logic. [1] [2] [3] [4]

Tooling and Version Updates

  • Updated the CONTROLLER_TOOLS_VERSION in the Makefile from v0.14.0 to v0.16.0 to use the latest code generation tools.

These changes modernize and simplify the Devbox API, making it easier to maintain and extend in the future.

Copy link

Whoa! Easy there, Partner!

This PR is too big. Please break it up into smaller PRs.

Copy link

cla-assistant bot commented Aug 6, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 4 committers have signed the CLA.

✅ lingdie
✅ dinoallo
❌ Zllinc
❌ luanshaotong
You have signed the CLA already but the status is still pending? Let us recheck it.

@labring labring deleted a comment from cla-assistant bot Aug 6, 2025
Copy link

codecov bot commented Aug 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.97%. Comparing base (caeddca) to head (461842e).
⚠️ Report is 41 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5781   +/-   ##
=======================================
  Coverage   61.97%   61.97%           
=======================================
  Files           8        8           
  Lines         647      647           
=======================================
  Hits          401      401           
  Misses        200      200           
  Partials       46       46           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lingdie lingdie requested a review from a team as a code owner August 21, 2025 07:27
Copy link
Contributor

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "Devbox daemon v2". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat
 - fix
 - docs
 - style
 - refactor
 - perf
 - test
 - build
 - ci
 - chore
 - revert

lingdie and others added 20 commits September 5, 2025 16:07
* Commit

* fix conflict

* commit container

* delete container

* stdout

* Gc Handler

* ctx

* unit test

* pull i

* unit test

* go mod

* fix err

* gc unit test

* delete useless

* rename

* rename

* import order

---------

Co-authored-by: Cunzili <[email protected]>
* Add acceptance scoring for devbox scheduling and implement filesystem stats provider

* Fix typo in ContainerFsStats method name

* Add CPU request and limit ratio fields to AcceptanceConsideration struct

* Add memory request and limit ratio fields to AcceptanceConsideration struct

* Add annotations and default values for container resource ratios in Devbox

* Rename container filesystem threshold annotation and update related logic to use available threshold

* Change acceptanceThreshold type from uint to int and update related logic
* Increase example values for available and capacity bytes in ContainerFsStats

* Refactor resource ratio types to use float64 in acceptance consideration calculations

* Change error logging to info level for parsing failures in acceptance consideration
* Modify acceptance score calculation by using storage limit consideration instead and refactor related methods

* Rename ratio functions and add up cpu by Value() instead of MilliValue()

* Increase example values for available and capacity bytes to 100G/200G
Co-authored-by: Cunzili <[email protected]>
* add push image func

---------

Co-authored-by: Cunzili <[email protected]>
* force gc

* force gc

update snapshot (#52)

fix registry

update snapshot (#52)

delete pod when pod failed

---------

Co-authored-by: Cunzili <[email protected]>
dinoallo and others added 10 commits September 5, 2025 16:34
Co-authored-by: Cunzili <[email protected]>
* remove lv after delete devbox

remove lv during delete devbox

remove lv during delete devbox

* extend event handler

---------

Co-authored-by: Cunzili <[email protected]>
* improve controller and state change handler

* add validation
* close merge

* add flag to merge

---------

Co-authored-by: Cunzili <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants