Closed wdbaruni closed 3 weeks ago
[!CAUTION]
Review failed
The pull request is closed.
The changes in this pull request focus on integrating a new messages
package throughout the codebase, replacing existing local types related to bidding, execution, and error handling. This refactor impacts various components, including bid requests, responses, and callback methods, ensuring consistency in data structures used across multiple files. The modifications do not introduce new functionalities but enhance code organization and clarity by centralizing message definitions.
File Path | Change Summary |
---|---|
pkg/compute/bidder.go | Updated to use messages.BidResult , messages.RoutingMetadata , messages.ExecutionMetadata , and messages.ComputeError . Refactored methods to align with new structures. |
pkg/compute/bidder_test.go | Replaced compute.AskForBidRequest with messages.AskForBidRequest in tests. Updated req type in BidResponseMatcher . |
pkg/compute/callback_chain.go | Updated ChainedCallback methods to use messages types for callbacks. |
pkg/compute/callback_mock.go | Updated CallbackMock methods to use messages types for handlers. |
pkg/compute/endpoint.go | Refactored methods to use messages types for requests and responses. |
pkg/compute/executor.go | Updated callback methods to utilize messages types. Refined error handling in Start method. |
pkg/compute/executor_buffer.go | Updated error handling to use messages.ComputeError . |
pkg/compute/management_client.go | Renamed requests package to messages and updated method signatures accordingly. |
pkg/compute/mocks.go | Updated mock methods to use messages types instead of requests . |
pkg/compute/types.go | Renamed package from requests to messages , removed local type definitions. |
pkg/models/messages/bidding.go | Introduced new types for bidding requests and responses. |
pkg/models/messages/execution.go | Added types for execution requests and results, including ComputeError . |
pkg/models/messages/logging.go | Added types for execution logs requests and responses. |
pkg/models/messages/metadata.go | Introduced RoutingMetadata and ExecutionMetadata types. |
pkg/models/messages/node.go | Changed package name from requests to messages and added Heartbeat type. |
pkg/nats/proxy/callback_proxy.go | Updated callback methods to use messages types. |
pkg/nats/proxy/compute_proxy.go | Modified methods to use messages types for requests and responses. |
pkg/nats/proxy/management_handler.go | Updated method signatures to use messages types instead of requests . |
pkg/nats/proxy/management_proxy.go | Refactored to use messages types for request and response handling. |
pkg/node/heartbeat/client.go | Updated HeartbeatClient to use messages.Heartbeat . |
pkg/node/heartbeat/heartbeat_test.go | Updated to register messages.Heartbeat instead of legacy type. |
pkg/node/heartbeat/server.go | Changed to use messages.Heartbeat in HeartbeatServer . |
pkg/node/heartbeat/types.go | Removed legacy Heartbeat struct definition. |
pkg/node/manager/node_manager.go | Updated methods to use messages types for registration and updates. |
pkg/node/ncl.go | Updated message registration to use messages.Heartbeat . |
pkg/orchestrator/callback.go | Updated callback methods to use messages types. |
pkg/orchestrator/endpoint.go | Updated to use messages.ExecutionLogsRequest and messages.RoutingMetadata . |
pkg/orchestrator/planner/compute_forwarder.go | Updated methods to use messages types for requests. |
pkg/orchestrator/planner/compute_forwarder_test.go | Updated test suite to use messages types for expected return values. |
pkg/orchestrator/planner/utils_test.go | Updated matcher logic to use messages types instead of compute types. |
pkg/test/compute/ask_for_bid_pre_approved_test.go | Updated to use messages types for requests in tests. |
pkg/test/compute/ask_for_bid_test.go | Updated to use messages.BidResult in test methods. |
pkg/test/compute/bid_accepted_test.go | Updated to use messages.BidAcceptedRequest in tests. |
pkg/test/compute/bid_rejected_test.go | Updated to use messages.BidRejectedRequest in tests. |
pkg/test/compute/cancel_test.go | Updated to use messages.BidAcceptedRequest and messages.CancelExecutionRequest in tests. |
pkg/test/compute/mocks.go | Updated mock methods to use messages types instead of requests . |
pkg/test/compute/setup_test.go | Updated channel and method types to use messages types. |
In the meadow where bids take flight,
A new message package shines so bright.
With types refined, our code's in line,
Clarity blooms, like sweet summer wine.
Hops and dreams in every test,
With messages now, we code our best! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
messages
package for standardized request and response types related to bidding and execution.AskForBidRequest
,BidAcceptedRequest
,BidRejectedRequest
,CancelExecutionRequest
,ExecutionLogsRequest
,Heartbeat
,RunResult
,CancelResult
, andComputeError
to facilitate communication.Refactor
messages
package instead of local types, enhancing consistency and maintainability.Tests
messages
package, ensuring compatibility with updated request and response structures across multiple test suites.