Skip to content

Conversation

@ZhangSetSail
Copy link
Collaborator

No description provided.

Signed-off-by: 张启航 <[email protected]>
Copilot AI review requested due to automatic review settings October 29, 2025 03:19
@ZhangSetSail ZhangSetSail merged commit f0f929c into goodrain:V6.4 Oct 29, 2025
11 checks passed
Copy link
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 fixes S3 file path handling issues in two areas: correcting the ParseDirPath parameter for downloading files and fixing the S3 path construction for event log downloads.

  • Changed DownloadFileToDir to use isFile=true parameter when parsing file paths
  • Refactored S3 path construction in downloadWithRetry to correctly build the path from event ID instead of incorrectly concatenating with local path

Reviewed Changes

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

File Description
pkg/component/storage/s3_storage.go Corrected the ParseDirPath second parameter from false to true for file path parsing
api/eventlog/db/eventFilePlugin.go Fixed S3 path construction by building it directly from event ID instead of using incorrect path concatenation

Comment on lines +207 to +209
// 构造正确的 S3 路径:从 localPath 中提取相对于 HomePath 的路径
// localPath 格式: /xxx/grdata/eventlog/eventID.log
// 需要构造成: grdata/eventlog/eventID.log
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

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

The comment on line 208 is now misleading. The localPath parameter is no longer used in the path construction logic, so describing its expected format is confusing. Consider updating the comment to reflect that the S3 path is constructed directly from the eventID parameter instead.

Suggested change
// 构造正确的 S3 路径:从 localPath 中提取相对于 HomePath 的路径
// localPath 格式: /xxx/grdata/eventlog/eventID.log
// 需要构造成: grdata/eventlog/eventID.log
// 构造正确的 S3 路径: 直接根据 eventID 构建 S3 路径
// S3 路径格式: grdata/eventlog/eventID.log

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant