Skip to content

Conversation

@ikura-hamu
Copy link
Member

  • 🩹 ベンチマーカーのエラーメッセージをoptionalにする
  • 🏭 protobufのコード生成
  • 🩹 runnerでエラーメッセージをポインターで扱う
  • 🩹 benchmarksテーブルにerror_messageカラムを追加
  • 🏭 bobのコード生成
  • 🩹 domainにErrorMesを追加
  • 🩹 ErrorMesの変換を追加
  • 🏭 モックの生成
  • ✨ usecaseのFinalizeBenchmark実装
  • ✨ PostJobFinishedを実装

@ikura-hamu ikura-hamu requested a review from Copilot May 6, 2025 05:38
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 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

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2025

The latest Buf updates on your PR. Results from workflow Protobuf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed❌ failed (1)May 6, 2025, 5:45 AM

@ikura-hamu ikura-hamu requested a review from a team May 6, 2025 05:48
Copy link
Contributor

@pirosiki197 pirosiki197 left a comment

Choose a reason for hiding this comment

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

よさそうです

@ikura-hamu ikura-hamu merged commit 87c19bc into main May 6, 2025
13 of 14 checks passed
@ikura-hamu ikura-hamu deleted the feat/portal_finalize_bench branch May 6, 2025 11:59
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.

3 participants