Refactor mci dynamic field name commonImage to imageId and commonSpec to specId#2101
Merged
cb-github-robot merged 2 commits intocloud-barista:mainfrom Aug 19, 2025
Merged
Refactor mci dynamic field name commonImage to imageId and commonSpec to specId#2101cb-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>
Signed-off-by: Seokho Son <shsongist@gmail.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the MCI (Multi-Cloud Infrastructure) dynamic field names to improve API consistency and clarity by renaming commonImage to imageId and commonSpec to specId throughout the codebase.
- Systematic field name changes across configuration files, API endpoints, and documentation
- Breaking API changes requiring client updates
- Comprehensive updates to Swagger documentation and comments
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/testclient/test-clis/vpn-tunnel/gcp-aws/mciDynamic.json | Updates JSON configuration to use new field names in test scenarios |
| src/testclient/scripts/sequentialFullTest/test-mci-dynamic-all.sh | Updates shell script to use new field names in MCI dynamic provisioning tests |
| src/testclient/scripts/sequentialFullTest/test-mci-dynamic-all-for-one.sh | Updates script with new field names and fixes syntax error in jq command |
| src/testclient/scripts/misc/gen-mci-config.sh | Updates configuration generator script to use new field names |
| src/testclient/scripts/conf.env | Mass replacement of Common* variable names with new ImageId* and SpecId* naming convention |
| src/interface/rest/server/server.go | Changes HTTP method from POST to GET for fetchImagesResult endpoint |
| src/interface/rest/server/resource/k8scluster.go | Updates API documentation comments to reference new field names |
| src/interface/rest/server/infra/provisioning.go | Updates API documentation and comments to use new field names |
| src/interface/rest/docs/swagger.yaml | Comprehensive Swagger documentation updates with new field names and schema changes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| # Properly append to the JSON array | ||
| vmArray=$(echo "$vmArray" | jq --arg commonImage "$commonImage" --arg specId "$specId" --arg subGroupSizeInput "$subGroupSizeInput" '. + [{"commonImage": $commonImage, "commonSpec": $specId, "subGroupSize": $subGroupSizeInput}]') | ||
| vmArray=$(echo "$vmArray" | jq --arg imageId "$imageId" --arg specId "$specId" --arg subGroupSizeInput "$subGroupSizeInput" '. + [{"imageId": $imageId, "specIdspecId, "subGroupSize": $subGroupSizeInput}]') |
There was a problem hiding this comment.
There is a syntax error in the jq command. The field name is incorrectly written as "specIdspecId" instead of "specId": $specId. This will cause the JSON construction to fail.
Suggested change
| vmArray=$(echo "$vmArray" | jq --arg imageId "$imageId" --arg specId "$specId" --arg subGroupSizeInput "$subGroupSizeInput" '. + [{"imageId": $imageId, "specIdspecId, "subGroupSize": $subGroupSizeInput}]') | |
| vmArray=$(echo "$vmArray" | jq --arg imageId "$imageId" --arg specId "$specId" --arg subGroupSizeInput "$subGroupSizeInput" '. + [{"imageId": $imageId, "specId": $specId, "subGroupSize": $subGroupSizeInput}]') |
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.
Refactor mci dynamic field name commonImage to imageId and commonSpec to specId
so, it is a breaking change.