Skip to content

v0.3.1

Compare
Choose a tag to compare
@yunkon-kim yunkon-kim released this 31 Jul 14:18
· 74 commits to main since this release
73db9dd

Integrated or tested with

  • cm-model v0.0.8 (To be integrated on the next Damselfly release)
  • CM-Honeybee v0.3.1
  • CB-Tumblebug v0.11.1

API docs

How to run and use the CM-Beetle

Breaking Changes (analyzed by Claude Sonnet 4)

Click to see the breaking changes

Beetle v0.3.0과 v0.3.1 간의 Breaking Changes 분석 결과

git diff 분석을 통해 확인된 주요 Breaking Changes는 다음과 같습니다:

🔴 Major Breaking Changes

  1. API 엔드포인트 변경
# v0.3.0 → v0.3.1 변경사항
- POST /recommendation/mci → POST /recommendation/mci (RecommendVMInfra로 함수명 변경)
+ POST /recommendation/mciWithDefaults (새로운 엔드포인트 추가)
+ POST /recommendation/containerInfra (새로운 엔드포인트 추가)

# 새로운 리소스 추천 API 추가
+ POST /recommendation/resources/vNet
+ POST /recommendation/resources/securityGroups  
+ POST /recommendation/resources/vmOsImages
+ POST /recommendation/resources/vmSpecs

# 새로운 마이그레이션 리소스 API 추가
+ POST /migration/ns/{nsId}/mciWithDefaults
+ GET/POST/DELETE /migration/ns/{nsId}/resources/vNet/{vNetId}
+ GET/POST/DELETE /migration/ns/{nsId}/resources/securityGroup/{sgId}
+ GET/POST/DELETE /migration/ns/{nsId}/resources/sshKey/{sshKeyId}
  1. 요청/응답 모델 구조 대폭 변경
// v0.3.0
type RecommendInfraRequest struct {
    DesiredProvider string `json:"desiredProvider"`
    DesiredRegion   string `json:"desiredRegion"`
    inframodel.OnpremiseInfraModel
}

// v0.3.1 - BREAKING CHANGE
type RecommendVmInfraRequest struct {
    DesiredCspAndRegionPair recommendation.CspRegionPair `json:"desiredCspAndRegionPair"`
    OnpremiseInfraModel     onpremmodel.OnpremInfra  // 패키지 변경
}

type MigrateInfraRequest struct {
    // v0.3.0: tbmodel.TbMciDynamicReq
    // v0.3.1: cloudmodel.RecommendedVmInfra - BREAKING CHANGE
    cloudmodel.RecommendedVmInfra
}
  1. 함수 시그니처 변경
// v0.3.0
func CreateVMInfra(nsId string, infraModel *tbmodel.TbMciDynamicReq) (tbmodel.TbMciInfo, error)
func RecommendInfra(c echo.Context) error

// v0.3.1 - BREAKING CHANGES
func CreateVMInfra(nsId string, targetInfraModel *cloudmodel.RecommendedVmInfra) (cloudmodel.VmInfraInfo, error)
func RecommendVMInfra(c echo.Context) error  // 함수명 변경
func CreateVMInfraWithDefaults(nsId string, infraModel *cloudmodel.TbMciDynamicReq) (cloudmodel.VmInfraInfo, error)  // 새로운 함수
  1. 패키지 의존성 변경
// v0.3.0 → v0.3.1 주요 버전 업그레이드
- github.com/cloud-barista/cb-tumblebug v0.10.3 → v0.11.1
- github.com/cloud-barista/cm-model v0.0.3 → v0.0.8
- github.com/labstack/echo/v4 v4.12.0 → v4.13.3
- github.com/mattn/go-sqlite3 v1.14.22 → v1.14.24
  1. 쿼리 파라미터 변경
# v0.3.0
?desiredProvider=aws&desiredRegion=ap-northeast-2

# v0.3.1 - BREAKING CHANGE  
?desiredCsp=aws&desiredRegion=ap-northeast-2  # Provider → Csp로 변경

⚠️ 호환성 영향도

  1. API 클라이언트: 모든 API 요청/응답 구조 변경으로 인한 완전한 재작업 필요
  2. 데이터 모델: cloudmodel 패키지로 마이그레이션 필요
  3. 함수 호출: 내부 API 사용 시 함수 시그니처 변경 대응 필요
  4. 설정: 쿼리 파라미터 이름 변경 대응 필요

📋 마이그레이션 가이드

v0.3.0에서 v0.3.1으로 업그레이드 시 다음 사항들을 필수로 수정해야 합니다:

  1. API 요청 구조체의 필드명 변경 (desiredProvider → desiredCsp)
  2. 응답 모델 타입 변경 (tbmodel.* → cloudmodel.*)
  3. 새로운 엔드포인트 활용 (/mciWithDefaults, /resources/*)
  4. 의존성 패키지 버전 업데이트

이러한 변경사항들이 Major Breaking Changes로 분류되며, 기존 클라이언트 코드의 수정이 필요합니다.

What's Changed

New Contributors

Full Changelog: v0.3.0...v0.3.1