Skip to content

Refactor model naming for removing Tb prefix#2118

Merged
cb-github-robot merged 1 commit intocloud-barista:mainfrom
seokho-son:main
Aug 28, 2025
Merged

Refactor model naming for removing Tb prefix#2118
cb-github-robot merged 1 commit intocloud-barista:mainfrom
seokho-son:main

Conversation

@seokho-son
Copy link
Copy Markdown
Member

  • All Tb prefix in struct type to simplify naming

All, you need to clean db for upgrade since table names has been changed.

Signed-off-by: Seokho Son <shsongist@gmail.com>
Copilot AI review requested due to automatic review settings August 28, 2025 01:01
@seokho-son seokho-son requested a review from yunkon-kim as a code owner August 28, 2025 01:01
@github-actions github-actions bot added docs Improvements or additions to documentation src labels Aug 28, 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 refactors the codebase to remove the "Tb" prefix from struct types to simplify naming conventions. The change affects model type names throughout the system and requires a clean database setup due to table name changes.

  • Removes "Tb" prefix from all struct type names (e.g., TbSpecInfoSpecInfo, TbVNetInfoVNetInfo)
  • Updates function names that reference the old type names (e.g., validation functions)
  • Updates documentation and comments to reflect new naming conventions

Reviewed Changes

Copilot reviewed 59 out of 62 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main.go Updates database migration model references to remove Tb prefix
src/testclient/test-clis/vpn-tunnel/gcp-aws/app.go Updates model references in test client code
src/interface/rest/server/resource/*.go Updates API documentation and model references in REST handlers
src/interface/mcp/tb-mcp.py Updates comments referencing model types
src/core/resource/*.go Updates core resource functions and validation logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 1013 to +1014
// clear memory for specInfo
specInfo = model.TbSpecInfo{}
specInfo = model.SpecInfo{}
Copy link

Copilot AI Aug 28, 2025

Choose a reason for hiding this comment

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

Setting the struct to empty value here doesn't actually clear memory as the variable is about to go out of scope anyway. This comment and assignment are misleading and unnecessary.

Copilot uses AI. Check for mistakes.
@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 Aug 28, 2025
@cb-github-robot cb-github-robot merged commit a3ad65e into cloud-barista:main Aug 28, 2025
4 of 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. docs Improvements or additions to documentation src

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants