Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(publisher): add fileserver worker #189

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

wuhuizuo
Copy link
Contributor

@wuhuizuo wuhuizuo commented Nov 1, 2024

upload to KS3 buckect.

Signed-off-by: wuhuizuo [email protected]

upload to KS3 buckect.

Signed-off-by: wuhuizuo <[email protected]>
@ti-chi-bot ti-chi-bot bot requested a review from purelind November 1, 2024 11:35
Copy link

ti-chi-bot bot commented Nov 1, 2024

I have already done a preliminary review for you, and I hope to help you do a better job.

Summary:
The pull request adds a new fileserver worker to upload to the KS3 bucket. It also renames the worker-example.yaml file to worker-example.tiup.yaml and adds a new worker-example.fileserver.yaml file.

Potential problems:

  1. The initTiupWorkerFromConfig function has only 2 return values but the return statement in the function has 3 values, which may cause a compilation error.
  2. In the NewFsWorker function, the defaultMaxKS3Retries constant is defined but not used.
  3. In the NewFsWorker function, the LogLevel of s3Client is set only when the logger's level is lower than or equal to DebugLevel, which may cause the log level to be inconsistent.

Fixing suggestions:

  1. Remove the error return value from the initTiupWorkerFromConfig function's return statement since the error is already logged and the function can return nil.
  2. Use the defaultMaxKS3Retries constant in the NewFsWorker function to set the MaxRetries of s3Client.
  3. Set the LogLevel of s3Client unconditionally in the NewFsWorker function.

Overall, the changes look good but it would be helpful to have more context on why the fileserver worker was added and how it will be used.

@ti-chi-bot ti-chi-bot bot added the size/L label Nov 1, 2024
Copy link
Contributor Author

@wuhuizuo wuhuizuo left a comment

Choose a reason for hiding this comment

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

/approve

Copy link

ti-chi-bot bot commented Nov 1, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wuhuizuo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Nov 1, 2024
@ti-chi-bot ti-chi-bot bot merged commit 7263851 into main Nov 1, 2024
3 checks passed
@ti-chi-bot ti-chi-bot bot deleted the feature/implement-fs-upload-ks3 branch November 1, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant