-
Notifications
You must be signed in to change notification settings - Fork 0
ポータル側でベンチマークの終了を実装 #102
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
ポータル側でベンチマークの終了を実装 #102
Conversation
ikura-hamu
commented
May 6, 2025
- 🩹 ベンチマーカーのエラーメッセージをoptionalにする
- 🏭 protobufのコード生成
- 🩹 runnerでエラーメッセージをポインターで扱う
- 🩹 benchmarksテーブルにerror_messageカラムを追加
- 🏭 bobのコード生成
- 🩹 domainにErrorMesを追加
- 🩹 ErrorMesの変換を追加
- 🏭 モックの生成
- ✨ usecaseのFinalizeBenchmark実装
- ✨ PostJobFinishedを実装
There was a problem hiding this 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 implements the completion of benchmarks on the portal side by updating error message parameters from a string to a pointer, adjusting use case signatures, repository mappings, protobuf definitions, and tests accordingly.
- Updates FinalizeBenchmark signatures and mocks (errorMessage from string to *string)
- Modifies database models and code generators (bob) to include the new error_message field
- Adjusts gRPC service methods and tests as well as proto definitions to handle optional runner_error
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| server/usecase/mock/usecase.go | Updated FinalizeBenchmark and its mock methods to accept a pointer for errorMessage |
| server/usecase/benchmark_test.go | Updated tests to reflect the new pointer type for errorMes |
| server/usecase/benchmark.go | Implemented FinalizeBenchmark with pointer handling for errorMes in transaction and repo update |
| server/server/benchmark_test.go | Adjusted test cases for PostJobFinished to work with the new error message pointer |
| server/server/benchmark.go | Revised PostJobFinished to parse and forward error messages as pointers |
| server/repository/db/models/factory/benchmarks.bob.go | Added ErrorMessage field to the benchmark template for factory code generation |
| server/repository/db/models/bob_main.bob.go | Included the error_message column in the schema column definitions |
| server/repository/db/models/benchmarks.bob.go | Extended benchmark model and setter methods to include the error_message field |
| server/repository/db/benchmark.go | Adjusted mapping to and from the new error_message field for domain conversion |
| server/domain/benchmark.go | Added ErrorMes field (as a pointer) in the Benchmark domain struct |
| runner/portal/grpc/portal_test.go | Updated test logic and variable types to handle pointer-based runner errors |
| runner/portal/grpc/portal.go | Modified PostJobFinished to convert runner error strings into pointers correctly |
| proto/portal/v1/benchmark.proto | Changed runner_error field to optional string to support pointer semantics in Go |
| gen/portal/v1/benchmark.pb.go | Generated proto file now reflects runner_error as a pointer field |
Files not reviewed (1)
- server/schema.sql: Language not supported
|
The latest Buf updates on your PR. Results from workflow Protobuf CI / buf (pull_request).
|
pirosiki197
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
よさそうです