-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add runtime size configuration feature #5805
Conversation
- Keep runtime size configuration feature - Update settings to use API instead of localStorage - Update tests to work with API-based settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me now, @amanape it'd be great if you could do a second review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the backend already set to recognize these new setting keys?
@amanape : yes it is
UPDATE: but now that I think about it, I didn't carefully check the backend code that receives the changes from the frontend, I will check that. |
OK, I think this is ready now @amanape ! This is what it looks like for now, and we'll enable the menu in a future PR once we have a way to pipe in info about which users should have access to this feature. ![]() |
Actually, sorry, let me take another look at this. Please cancel that. |
…s migration logic
…plicated getSettings
- Revert settings-up-to-date-context.tsx back to base branch version - Move getCurrentSettingsVersion back to its original position in settings.ts - Fix import path in use-maybe-migrate-settings.ts
- Add REMOTE_RUNTIME_RESOURCE_FACTOR to Settings and ApiSettings types - Add getSettings function - Update getLocalStorageSettings to include new field
OK @amanape , I believe this is ready for review, thanks for the patience! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've simplified FE tests and removed the services/settings test since it doesn't actually test relevant logic properly and also includes always passing tests e.g.,
vi.mocked(OpenHands.saveSettings).mockResolvedValueOnce(false);
const result = await OpenHands.saveSettings(apiSettings);
expect(result).toBe(false);
Makes it more confusing too
The rest LGTM!
This PR adds a new feature to configure the runtime size in the settings modal. Users can now choose between 1x (2 core, 8G) and 2x (4 core, 16G) options.
Changes include:
REMOTE_RUNTIME_RESOURCE_FACTOR
field to theSettings
typeRuntimeSizeSelector
componentSettingsForm
component to include the new selectorgetSettings
andsaveSettings
functions to handle the new settingPlease review and let me know if any changes are needed.
Notes:
To run this PR locally, use the following command: