Skip to content

Enhance assets directory path configurations#2215

Merged
cb-github-robot merged 2 commits intocloud-barista:mainfrom
seokho-son:main
Nov 19, 2025
Merged

Enhance assets directory path configurations#2215
cb-github-robot merged 2 commits intocloud-barista:mainfrom
seokho-son:main

Conversation

@seokho-son
Copy link
Copy Markdown
Member

  • modularizing hard-coded assets/ path to GetAssetsFilePath
  • setup a mount for assets/ directory in docker compose

Signed-off-by: Seokho Son <shsongist@gmail.com>
Copilot AI review requested due to automatic review settings November 19, 2025 04:44
@github-actions github-actions bot added the src label Nov 19, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() and SetupViperPaths() helper functions to centralize path resolution logic with support for the TB_ROOT_PATH environment 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>
@seokho-son
Copy link
Copy Markdown
Member Author

/approve

@github-actions github-actions bot added the approved This PR is approved and will be merged soon. label Nov 19, 2025
@cb-github-robot cb-github-robot merged commit 822676c into cloud-barista:main Nov 19, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved This PR is approved and will be merged soon. src

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants