Enhance benchmark workflow and download#2340
Merged
cb-github-robot merged 1 commit intocloud-barista:mainfrom Mar 4, 2026
Merged
Enhance benchmark workflow and download#2340cb-github-robot merged 1 commit intocloud-barista:mainfrom
cb-github-robot merged 1 commit intocloud-barista:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances benchmark automation outputs and adds an API to download files from an MCI VM via bastion/SCP, alongside related REST route + swagger updates.
Changes:
- Add
POST /ns/{nsId}/downloadFile/mci/{mciId}/vm/{vmId}endpoint and core SCP-via-bastion implementation to download a remote file. - Increase MCI file upload size limit from 10MB to 50MB.
- Improve
run_guidellm.shto better report generated outputs, run multiple targets in parallel, and archive results.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/interface/rest/server/server.go | Registers the new download-file REST route. |
| src/interface/rest/server/infra/remoteCommand.go | Implements REST handler; raises upload limit; adds swagger annotations for download. |
| src/core/infra/remoteCommand.go | Adds SCP download implementation via bastion to return file bytes + name. |
| src/core/model/mci.go | Adds model.FileDownloadReq request schema. |
| src/interface/rest/docs/swagger.yaml | Documents the new download endpoint and request model. |
| src/interface/rest/docs/docs.go | Updates generated swagger docs for the new endpoint/model. |
| scripts/usecases/llm/telemetry/run_guidellm.sh | Parallelizes multi-target runs and produces a tar.gz archive of outputs. |
Comments suppressed due to low confidence (1)
src/interface/rest/server/infra/remoteCommand.go:200
RestPostFileToMcinow allows 50MB uploads, but the swagger annotations above still state “less than 10MB” and thefileparam says “Max 10MB”. Please update the endpoint description/param docs (and regenerated swagger) to match the actual limit (or keep the limit at 10MB if that was intentional).
// RestPostFileToMci godoc
// @ID PostFileToMci
// @Summary Transfer a file to specified MCI
// @Description Transfer a file to specified MCI to the specified path.
// @Description The file size should be less than 10MB.
// @Description Not for gerneral file transfer but for specific purpose (small configuration files).
// @Tags [MC-Infra] MCI Remote Command
// @Accept multipart/form-data
// @Produce json
// @Param nsId path string true "Namespace ID" default(default)
// @Param mciId path string true "MCI ID" default(mci01)
// @Param subGroupId query string false "subGroupId to apply the file transfer only for VMs in subGroup of MCI" default(g1)
// @Param vmId query string false "vmId to apply the file transfer only for a VM in MCI" default(g1-1)
// @Param path formData string true "Target path where the file will be stored" default(/home/cb-user/)
// @Param file formData file true "The file to be uploaded (Max 10MB)"
// @Param x-request-id header string false "Custom request ID"
// @Success 200 {object} model.MciSshCmdResultForAPI
// @Failure 400 {object} model.SimpleMsg "Invalid request"
// @Failure 500 {object} model.SimpleMsg "Internal Server Error"
// @Router /ns/{nsId}/transferFile/mci/{mciId} [post]
func RestPostFileToMci(c echo.Context) error {
nsId := c.Param("nsId")
mciId := c.Param("mciId")
subGroupId := c.QueryParam("subGroupId")
vmId := c.QueryParam("vmId")
targetPath := c.FormValue("path")
if targetPath == "" {
err := fmt.Errorf("target path is required")
return clientManager.EndRequestWithLog(c, err, nil)
}
// Validate the file
file, err := c.FormFile("file")
if err != nil {
err = fmt.Errorf("failed to read the file %v", err)
return clientManager.EndRequestWithLog(c, err, nil)
}
// File size validation
fileSizeLimit := int64(50 * 1024 * 1024) // (50MB limit)
if file.Size > fileSizeLimit {
err := fmt.Errorf("file too large, max size is %v", fileSizeLimit)
return clientManager.EndRequestWithLog(c, err, nil)
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Seokho Son <shsongist@gmail.com>
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.
Enhance benchmark workflow and download