Skip to content

Conversation

hibariya
Copy link
Collaborator

Fixes #15

As @koic suggested in the issue, I removed the fixed version parameter since it's doesn't make sense today and hard to maintain.

I also confirmed enqueue is working after the change by running the following code just in case:

# The env var GOOGLE_APPLICATION_CREDENTIALS ponts the necessary keyfile
adapter = ActiveJob::GoogleCloudTasks::HTTP::Adapter.new(
  project: 'delta-petra',
  location: 'asia-northeast1',
  url: 'https://hibariya.org/', # will get 404 tho
)

class TestJob
  def serialize = {}
  def queue_name = 'test-queue'
end

adapter.enqueue(TestJob.new)
# => <Google::Cloud::Tasks::V2::Task: name: "projects/delta-petra/locations/asia-northeast1/queues/test-queue/tasks/43981710605354104261", http_request: <Google::Cloud::Tasks::V2::HttpRequest: url: "https://hibariya.org/", http_method: :POST, headers: {"User-Agent"=>"Google-Cloud-Tasks", "Content-Type"=>"application/json"}, body: "">, schedule_time: <Google::Protobuf::Timestamp: seconds: 1744329215, nanos: 673695000>, create_time: <Google::Protobuf::Timestamp: seconds: 1744329215, nanos: 0>, dispatch_deadline: <Google::Protobuf::Duration: seconds: 600, nanos: 0>, dispatch_count: 0, response_count: 0, view: :BASIC> 

Fixes #15

As @koic suggested in the issue, I removed the fixed version parameter since it's doesn't make sense today and hard to maintain.
@hibariya hibariya requested a review from koic April 11, 2025 01:29
@hibariya
Copy link
Collaborator Author

Failing workflow jobs should be fixed by #18

@koic
Copy link
Member

koic commented Apr 11, 2025

Yep. It's fine to leave the default behavior up to the google-cloud-ruby.

@hibariya hibariya merged commit e3ae485 into master May 15, 2025
1 of 16 checks passed
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.

Don't use v2beta3 client by default
2 participants