Enhance assets directory path configurations#2215
Merged
cb-github-robot merged 2 commits intocloud-barista:mainfrom Nov 19, 2025
Merged
Enhance assets directory path configurations#2215cb-github-robot merged 2 commits intocloud-barista:mainfrom
cb-github-robot merged 2 commits intocloud-barista:mainfrom
Conversation
Signed-off-by: Seokho Son <shsongist@gmail.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the assets directory path configuration by introducing centralized helper functions to manage asset file paths and Viper configuration paths, replacing hard-coded path strings throughout the codebase. The changes also add a Docker volume mount for the assets directory to ensure proper file access in containerized environments.
- Introduced
GetAssetsFilePath()andSetupViperPaths()helper functions to centralize path resolution logic with support for theTB_ROOT_PATHenvironment variable - Replaced hard-coded asset paths in configuration loading and CSV file operations with the new helper functions
- Added Docker volume mount for the assets directory to ensure proper file access
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/core/common/utility.go | Added GetAssetsFilePath() and SetupViperPaths() helper functions for centralized asset path management with TB_ROOT_PATH support |
| src/main.go | Replaced hard-coded Viper config paths with SetupViperPaths() and updated CSV file access to use GetAssetsFilePath() with improved error messages |
| src/core/resource/spec.go | Updated cloudspec.csv file access to use GetAssetsFilePath() and replaced hard-coded Viper paths with SetupViperPaths() |
| src/core/resource/image.go | Updated cloudimage.csv file access to use GetAssetsFilePath() with enhanced error reporting |
| docker-compose.yaml | Added assets directory volume mount and updated cb-mapui image version to 0.11.20 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
Author
|
/approve |
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.
assets/path to GetAssetsFilePathassets/directory in docker compose