Repository navigation
PLA-1859 Instrument feeder and add sandbox-only simulated delivery #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kosmin
wants to merge
10
commits into
master
Choose a base branch
from
cosmin/pla-1859-sandbox-no-send
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+290
−18
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d80d33d
PLA-1859 Instrument Rpush feeder claims for sandbox POC
Kosmin c4cecae
PLA-1859 Add sandbox-only simulated Rpush delivery
Kosmin cd53458
PLA-1859 Keep Rpush specs compatible with JSON 3
Kosmin eafa49c
PLA-1859 Pin test JSON below incompatible major version
Kosmin 376e104
PLA-1859 Make marked sandbox probe records intrinsically no-send
Kosmin 67c5f4a
PLA-1859 Pipeline bounded Redis notification fetches
Kosmin 98740ec
PLA-1859 Pipeline bounded Redis notification fetches
Kosmin ba81bb0
PLA-1859 Pipeline bounded Redis notification fetches
Kosmin 51656be
PLA-1859 Pipeline bounded Redis notification fetches
Kosmin e2a1bae
PLA-1859 Compare retry times independent of timezone label
Kosmin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: thanx/rpush
Length of output: 12715
🏁 Script executed:
Repository: thanx/rpush
Length of output: 20684
🏁 Script executed:
Repository: thanx/rpush
Length of output: 3564
🏁 Script executed:
Repository: thanx/rpush
Length of output: 579
🏁 Script executed:
Repository: thanx/rpush
Length of output: 2353
Reject invalid Redis fetch batch sizes before claiming notifications.
redis_fetch_batch_size = 0reachesfind_notifications_by_ids, whereeach_slice(0)raises. Redis has already removed the claimed pending or retryable IDs, and the feeder only logs the exception. Those notifications can remain undelivered and absent from both claim sets.Suggested fix
def initialize super self.push_poll = 2 self.batch_size = 100 self.redis_fetch_batch_size = 1 self.logger = nil self.log_file = 'log/rpush.log' self.pid_file = 'tmp/rpush.pid' self.log_level = (defined?(Rails) && Rails.logger) ? Rails.logger.level : ::Logger::Severity::DEBUG self.plugin = OpenStruct.new self.foreground = false self.foreground_logging = true self.apns = ApnsConfiguration.new # Internal options. self.embedded = false self.push = false end + def redis_fetch_batch_size=(value) + unless value.is_a?(Integer) && value > 0 + raise ConfigurationError, 'Rpush.config.redis_fetch_batch_size must be a positive integer.' + end + + super + end + def update(other)🤖 Prompt for AI Agents