Add support for Whisper updates, upload directory configuration, and dynamic instance resource values#139
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request introduces the following changes:
updateWSPstep during the feed instance resource info process to handle updates to Whisper files. Introduced utility functions and error management for resource info value processing.UploadDirin worker job execution. This includes changes to the worker configuration, Viper integration, and a newUploadDirSetterinterface.InstanceResourceInfologic to support dynamic value types, resolving 400 errors when instance status value pushed is 0. Updated the API schema accordingly.Changes
updateWSP) for Whisper file updates during job processes.UploadDirconfiguration for worker uploads, enabling custom paths.InstanceResourceInfo.Keys.Valueto accept dynamic types (interface{}), with handling for strings and float64 values.