Skip to content

Add support for Whisper updates, upload directory configuration, and dynamic instance resource values#139

Merged
cgalibern merged 3 commits into
opensvc:mainfrom
cgalibern:dev
Jun 2, 2026
Merged

Add support for Whisper updates, upload directory configuration, and dynamic instance resource values#139
cgalibern merged 3 commits into
opensvc:mainfrom
cgalibern:dev

Conversation

@cgalibern
Copy link
Copy Markdown
Contributor

Summary

This pull request introduces the following changes:

  • Whisper File Updates: Added the updateWSP step during the feed instance resource info process to handle updates to Whisper files. Introduced utility functions and error management for resource info value processing.
  • Configurable Upload Directory: Added support for configuring the UploadDir in worker job execution. This includes changes to the worker configuration, Viper integration, and a new UploadDirSetter interface.
  • Dynamic Resource Values: Enhanced the InstanceResourceInfo logic to support dynamic value types, resolving 400 errors when instance status value pushed is 0. Updated the API schema accordingly.

Changes

  • Added a non-blocking operation (updateWSP) for Whisper file updates during job processes.
  • Introduced UploadDir configuration for worker uploads, enabling custom paths.
  • Modified InstanceResourceInfo.Keys.Value to accept dynamic types (interface{}), with handling for strings and float64 values.

cgalibern added 3 commits June 2, 2026 17:06
…ypes

This fixes 400 errors when instance status value pushed is 0

- Modified `InstanceResourceInfo.Keys.Value` to accept `interface{}` for greater flexibility.
- Adjusted logic to handle string and float64 value types appropriately while truncating strings longer than 255 characters.
- Updated API schema (`api.yaml`) to reflect the new dynamic value support in `value` field.
- Introduced `UploadDir` field in worker configuration (`cmd/worker.go` and `worker/worker.go`).
- Added corresponding Viper configuration for `directories.uploads`.
- Implemented `UploadDirSetter` interface for job upload management in `base_job_uploader.go`.
…od to handle Whisper file updates

- Introduced `updateWSP` to write data points to Whisper files based on resource info.
- Added `valueToFloat64` helper for type conversion of resource info values.
- Declared `ErrResInfoValue` as an error for invalid resource info values.
- Updated job process steps to include the non-blocking `updateWSP` operation.
@cgalibern cgalibern merged commit fd6bc94 into opensvc:main Jun 2, 2026
2 checks passed
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.

1 participant