Skip to content

Commit

Permalink
Remove Concerns::Payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
antstorm committed Aug 19, 2024
1 parent 2eaeffd commit 12c5fee
Show file tree
Hide file tree
Showing 23 changed files with 5 additions and 111 deletions.
1 change: 0 additions & 1 deletion lib/temporal/activity/task_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
require 'temporal/error_handler'
require 'temporal/errors'
require 'temporal/activity/context'
require 'temporal/concerns/payloads'
require 'temporal/connection/retryer'
require 'temporal/connection'
require 'temporal/metric_keys'
Expand Down
87 changes: 0 additions & 87 deletions lib/temporal/concerns/payloads.rb

This file was deleted.

1 change: 0 additions & 1 deletion lib/temporal/connection/grpc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
require 'temporal/connection/serializer/backfill'
require 'temporal/connection/serializer/schedule'
require 'temporal/connection/serializer/workflow_id_reuse_policy'
require 'temporal/concerns/payloads'

module Temporal
module Connection
Expand Down
1 change: 0 additions & 1 deletion lib/temporal/connection/serializer/complete_workflow.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'temporal/connection/serializer/base'
require 'temporal/concerns/payloads'

module Temporal
module Connection
Expand Down
1 change: 0 additions & 1 deletion lib/temporal/connection/serializer/continue_as_new.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'temporal/connection/serializer/base'
require 'temporal/connection/serializer/retry_policy'
require 'temporal/concerns/payloads'

module Temporal
module Connection
Expand Down
1 change: 0 additions & 1 deletion lib/temporal/connection/serializer/failure.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'temporal/connection/serializer/base'
require 'temporal/concerns/payloads'

module Temporal
module Connection
Expand Down
1 change: 0 additions & 1 deletion lib/temporal/connection/serializer/query_answer.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'temporal/connection/serializer/base'
require 'temporal/concerns/payloads'

module Temporal
module Connection
Expand Down
1 change: 0 additions & 1 deletion lib/temporal/connection/serializer/record_marker.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'temporal/connection/serializer/base'
require 'temporal/concerns/payloads'

module Temporal
module Connection
Expand Down
1 change: 0 additions & 1 deletion lib/temporal/connection/serializer/schedule_action.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require "temporal/connection/serializer/base"
require "temporal/concerns/payloads"

module Temporal
module Connection
Expand Down
1 change: 0 additions & 1 deletion lib/temporal/connection/serializer/schedule_activity.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'temporal/connection/serializer/base'
require 'temporal/connection/serializer/retry_policy'
require 'temporal/concerns/payloads'

module Temporal
module Connection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'temporal/connection/serializer/base'
require 'temporal/concerns/payloads'

module Temporal
module Connection
Expand Down
1 change: 0 additions & 1 deletion lib/temporal/connection/serializer/start_child_workflow.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
require 'temporal/connection/serializer/base'
require 'temporal/connection/serializer/retry_policy'
require 'temporal/connection/serializer/workflow_id_reuse_policy'
require 'temporal/concerns/payloads'

module Temporal
module Connection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'temporal/connection/serializer/base'
require 'temporal/concerns/payloads'

module Temporal
module Connection
Expand Down
1 change: 0 additions & 1 deletion lib/temporal/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
require 'temporal/metadata/activity'
require 'temporal/metadata/workflow'
require 'temporal/metadata/workflow_task'
require 'temporal/concerns/payloads'

module Temporal
module Metadata
Expand Down
1 change: 0 additions & 1 deletion lib/temporal/workflow/execution_info.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require 'temporal/concerns/payloads'
require 'temporal/workflow/status'

module Temporal
Expand Down
1 change: 0 additions & 1 deletion lib/temporal/workflow/state_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
require 'temporal/workflow/command_state_machine'
require 'temporal/workflow/history/event_target'
require 'temporal/workflow/history/size'
require 'temporal/concerns/payloads'
require 'temporal/workflow/errors'
require 'temporal/workflow/sdk_flags'
require 'temporal/workflow/signal'
Expand Down
4 changes: 2 additions & 2 deletions spec/fabricators/grpc/activity_task_fabricator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
activity_id { SecureRandom.uuid }
task_token { |attrs| attrs[:task_token] || SecureRandom.uuid }
activity_type { Fabricate(:api_activity_type) }
input { Temporal.configuration.converter.to_payloads(nil) }
input { TEST_CONVERTER.to_payloads(nil) }
workflow_type { Fabricate(:api_workflow_type) }
workflow_execution { Fabricate(:api_workflow_execution) }
current_attempt_scheduled_time { Google::Protobuf::Timestamp.new.tap { |t| t.from_time(Time.now) } }
Expand All @@ -15,7 +15,7 @@
current_attempt_scheduled_time { Google::Protobuf::Timestamp.new.tap { |t| t.from_time(Time.now) } }
header do |attrs|
fields = (attrs[:headers] || {}).each_with_object({}) do |(field, value), h|
h[field] = Temporal.configuration.converter.to_payload(value)
h[field] = TEST_CONVERTER.to_payload(value)
end
Temporalio::Api::Common::V1::Header.new(fields: fields)
end
Expand Down
2 changes: 0 additions & 2 deletions spec/fabricators/grpc/application_failure_fabricator.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'temporal/concerns/payloads'

# Simulates Temporal::Connection::Serializer::Failure
Fabricator(:api_application_failure, from: Temporalio::Api::Failure::V1::Failure) do
transient :error_class, :backtrace
Expand Down
1 change: 0 additions & 1 deletion spec/fabricators/grpc/history_event_fabricator.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'securerandom'
require 'temporal/concerns/payloads'

Fabricator(:api_history_event, from: Temporalio::Api::History::V1::HistoryEvent) do
event_id { 1 }
Expand Down
2 changes: 1 addition & 1 deletion spec/fabricators/grpc/memo_fabricator.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Fabricator(:memo, from: Temporalio::Api::Common::V1::Memo) do
fields do
Google::Protobuf::Map.new(:string, :message, Temporalio::Api::Common::V1::Payload).tap do |m|
m['foo'] = Temporal.configuration.converter.to_payload('bar')
m['foo'] = TEST_CONVERTER.to_payload('bar')
end
end
end
2 changes: 1 addition & 1 deletion spec/fabricators/grpc/search_attributes_fabricator.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Fabricator(:search_attributes, from: Temporalio::Api::Common::V1::SearchAttributes) do
indexed_fields do
Google::Protobuf::Map.new(:string, :message, Temporalio::Api::Common::V1::Payload).tap do |m|
m['foo'] = Temporal.configuration.converter.to_payload('bar')
m['foo'] = TEST_CONVERTER.to_payload('bar')
end
end
end
2 changes: 1 addition & 1 deletion spec/fabricators/grpc/workflow_query_fabricator.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Fabricator(:api_workflow_query, from: Temporalio::Api::Query::V1::WorkflowQuery) do
query_type { 'state' }
query_args { Temporal.configuration.converter.to_payloads(['']) }
query_args { TEST_CONVERTER.to_payloads(['']) }
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'temporal/connection/serializer/query_failure'
require 'temporal/workflow/query_result'
require 'temporal/concerns/payloads'

describe Temporal::Connection::Serializer::QueryAnswer do
let(:converter) do
Expand Down

0 comments on commit 12c5fee

Please sign in to comment.