Skip to content

Refactor mci dynamic field name commonImage to imageId and commonSpec to specId#2101

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

Refactor mci dynamic field name commonImage to imageId and commonSpec to specId#2101
cb-github-robot merged 2 commits intocloud-barista:mainfrom
seokho-son:main

Conversation

@seokho-son
Copy link
Copy Markdown
Member

Refactor mci dynamic field name commonImage to imageId and commonSpec to specId

so, it is a breaking change.

Signed-off-by: Seokho Son <shsongist@gmail.com>
Signed-off-by: Seokho Son <shsongist@gmail.com>
Copilot AI review requested due to automatic review settings August 19, 2025 23:44
@seokho-son seokho-son requested a review from yunkon-kim as a code owner August 19, 2025 23:44
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 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}]')
Copy link

Copilot AI Aug 19, 2025

Choose a reason for hiding this comment

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

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}]')

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 19, 2025
@cb-github-robot cb-github-robot merged commit a7b1dee into cloud-barista:main Aug 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants