cloudtasker 0.14.rc1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Appraisals +5 -0
- data/CHANGELOG.md +2 -2
- data/README.md +6 -8
- data/app/controllers/cloudtasker/worker_controller.rb +1 -1
- data/docs/STORABLE_JOBS.md +1 -1
- data/gemfiles/rails_7.1.gemfile +18 -0
- data/lib/cloudtasker/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5574bda23d3a128aeb279e7fae03d982cce7788d407d8c627508cb387a1d4d30
|
4
|
+
data.tar.gz: 24cf8b37d065ce49221d3e118f5579ee8495a09f4ee9be05079536c5c1b497e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f502740061baf6484214dcd23531521e253bbae1194af88b49623734976fd82b0e0e2762a3f4cc5d1585fd8229f6ae4c1262eadeff82a5e3dc0f1c0154e0880f
|
7
|
+
data.tar.gz: 4b148a1b8cf1b37c02918cf0d4e442e30e34383578538821815453d53656d8f26c873a6b31914cacde63fba9afddbedb3d263fcd959bbfcd09354f2984e67382
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [v0.14.
|
3
|
+
## [v0.14.0](https://github.com/keypup-io/cloudtasker/tree/v0.14.0) (2025-02-11)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/keypup-io/cloudtasker/compare/v0.13.2...v0.14.
|
5
|
+
[Full Changelog](https://github.com/keypup-io/cloudtasker/compare/v0.13.2...v0.14.0)
|
6
6
|
|
7
7
|
**Improvements:**
|
8
8
|
- Authentication: To support OIDC and regular Cloudtasker authentication, we moved the Cloudtasker Authentication header from `Authorization` to `X-Cloudtasker-Authorization`. Backward compatibility is maintained for existing jobs.
|
data/README.md
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
 is out and it's quite big ([Changelog](https://github.com/keypup-io/cloudtasker/blob/master/CHANGELOG.md)). Any help testing this release is welcome, and feel free to open issues if you spot any regression.
|
1
|
+
 [](https://badge.fury.io/rb/cloudtasker)
|
4
2
|
|
5
3
|
# Cloudtasker
|
6
4
|
|
@@ -428,7 +426,7 @@ Cloudtasker.configure do |config|
|
|
428
426
|
# See https://cloud.google.com/tasks/docs/creating-http-target-tasks#sa for more information on
|
429
427
|
# setting up service accounts for use with Cloud Tasks.
|
430
428
|
#
|
431
|
-
# Supported since: v0.14.
|
429
|
+
# Supported since: v0.14.0
|
432
430
|
#
|
433
431
|
# Default: nil
|
434
432
|
#
|
@@ -698,7 +696,7 @@ end
|
|
698
696
|
See the [Cloudtasker::Worker class](lib/cloudtasker/worker.rb) for more information on attributes available to be logged in your `log_context_processor` proc.
|
699
697
|
|
700
698
|
### Truncating log arguments
|
701
|
-
**Supported since**: `v0.14.
|
699
|
+
**Supported since**: `v0.14.0`
|
702
700
|
|
703
701
|
By default Cloudtasker does not log job arguments as arguments can contain sensitive data and generate voluminous logs, which may lead to noticeable costs with your log provider (e.g. GCP Logging). Also some providers (e.g. GCP Logging) will automatically truncate log entries that are too big and reduce their searchability.
|
704
702
|
|
@@ -834,7 +832,7 @@ By default jobs are retried 25 times - using an exponential backoff - before bei
|
|
834
832
|
|
835
833
|
Note that the number of retries set on your Cloud Task queue should be many times higher than the number of retries configured in Cloudtasker because Cloud Task also includes failures to connect to your application. Ideally set the number of retries to `unlimited` in Cloud Tasks.
|
836
834
|
|
837
|
-
**Note**: Versions prior to `v0.14.
|
835
|
+
**Note**: Versions prior to `v0.14.0` use the `X-CloudTasks-TaskRetryCount` header for retries instead of the `X-CloudTasks-TaskExecutionCount` header to detect the number of retries, because there a previous bug on the GCP side which made the `X-CloudTasks-TaskExecutionCount` stay at zero instead of increasing on successive executions. Versions prior to `v0.14.0` count any failure as failure, including failures due to the backend being unavailable (`HTTP 503`). Versions `v0.14.0` and later only count application failure (`HTTP 4xx`) as failure for retry purpose.
|
838
836
|
|
839
837
|
E.g. Set max number of retries globally via the cloudtasker initializer.
|
840
838
|
```ruby
|
@@ -891,7 +889,7 @@ end
|
|
891
889
|
```
|
892
890
|
|
893
891
|
### Conditional reenqueues using retry errors
|
894
|
-
**Supported since**: `v0.14.
|
892
|
+
**Supported since**: `v0.14.0`
|
895
893
|
|
896
894
|
If your worker is waiting for some precondition to occur and you want to re-enqueue it until the condition has been met, you can raise a `Cloudtasker::RetryWorkerError`. This special error will fail your job **without logging an error** while still increasing the number of retries.
|
897
895
|
|
@@ -1005,7 +1003,7 @@ Each testing mode accepts a block argument to temporarily switch to it:
|
|
1005
1003
|
Cloudtasker::Testing.fake!
|
1006
1004
|
|
1007
1005
|
# Enable inline! mode temporarily for a given test
|
1008
|
-
Cloudtasker.inline! do
|
1006
|
+
Cloudtasker::Testing.inline! do
|
1009
1007
|
MyWorker.perform_async(1,2)
|
1010
1008
|
end
|
1011
1009
|
```
|
@@ -94,7 +94,7 @@ module Cloudtasker
|
|
94
94
|
# Verify content signature
|
95
95
|
Authenticator.verify_signature!(signature, json_payload)
|
96
96
|
else
|
97
|
-
# Get authorization token from custom header (since v0.14.
|
97
|
+
# Get authorization token from custom header (since v0.14.0) or fallback to
|
98
98
|
# former authorization header (jobs enqueued by v0.13 and below)
|
99
99
|
bearer_token = request.headers[Cloudtasker::Config::CT_AUTHORIZATION_HEADER].to_s.split.last ||
|
100
100
|
request.headers[Cloudtasker::Config::OIDC_AUTHORIZATION_HEADER].to_s.split.last
|
data/docs/STORABLE_JOBS.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Cloudtasker Storable Jobs
|
2
2
|
|
3
|
-
**Supported since**: `v0.14.
|
3
|
+
**Supported since**: `v0.14.0`
|
4
4
|
**Note**: this extension requires redis
|
5
5
|
|
6
6
|
The Cloudtasker storage extension allows you to park jobs in a specific garage lane and enqueue (pull) them when specific conditions have been met.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "appraisal", github: "thoughtbot/appraisal"
|
6
|
+
gem "bundler", "~> 2.0"
|
7
|
+
gem "rake", ">= 12.3.3"
|
8
|
+
gem "rspec", "~> 3.0"
|
9
|
+
gem "rspec-json_expectations", "~> 2.2"
|
10
|
+
gem "rubocop", "~> 1.64.1"
|
11
|
+
gem "rubocop-rspec", "~> 3.0.1"
|
12
|
+
gem "semantic_logger"
|
13
|
+
gem "timecop"
|
14
|
+
gem "webmock"
|
15
|
+
gem "rails", "~> 7.1"
|
16
|
+
gem "rspec-rails"
|
17
|
+
|
18
|
+
gemspec path: "../"
|
data/lib/cloudtasker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudtasker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arnaud Lachaume
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -153,6 +153,7 @@ files:
|
|
153
153
|
- gemfiles/rails_6.0.gemfile
|
154
154
|
- gemfiles/rails_6.1.gemfile
|
155
155
|
- gemfiles/rails_7.0.gemfile
|
156
|
+
- gemfiles/rails_7.1.gemfile
|
156
157
|
- gemfiles/semantic_logger_3.4.gemfile
|
157
158
|
- gemfiles/semantic_logger_4.6.gemfile
|
158
159
|
- gemfiles/semantic_logger_4.7.0.gemfile
|