Skip to content
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

Fix ActiveSupport::Notifications.publish_event to preserve units #50779

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

casperisfine
Copy link
Contributor

Ref: #43502
Fix: #50767
Fix: #50493

When republishing a an event into a start, finish tuple, we need to convert the timestamps back into seconds.

cc @fatkodima @rporrasluc

To be backported in 7.1 and 7.0

Ref: rails#43502
Fix: rails#50767
Fix: rails#50493

When republishing a an event into a `start, finish` tuple, we need
to convert the timestamps back into seconds.
@byroot byroot merged commit a9562e2 into rails:main Jan 17, 2024
3 of 4 checks passed
byroot added a commit that referenced this pull request Jan 17, 2024
Fix `ActiveSupport::Notifications.publish_event` to preserve units
byroot added a commit that referenced this pull request Jan 17, 2024
Fix `ActiveSupport::Notifications.publish_event` to preserve units
@byroot
Copy link
Member

byroot commented Jan 17, 2024

Backported to 7.1 and 7.0.

@casperisfine casperisfine deleted the debug-ar-time branch January 17, 2024 14:51
rosa added a commit to rosa/yabeda-activejob that referenced this pull request Mar 12, 2024
In Rails 7 this is seconds as per rails/rails#50779,
that changes all times to be in seconds (done for Rails 7.2, and backported to
Rails 7.1 and 7.0). This means that calling `Time.parse(time.to_s).utc` on a
seconds value results in an
```
ArgumentError: argument out of range
```
rosa added a commit to rosa/yabeda-activejob that referenced this pull request Mar 12, 2024
In Rails 7 this is seconds as per rails/rails#50779,
that changes all times to be in seconds (done for Rails 7.2, and backported to
Rails 7.1 and 7.0). This means that calling `Time.parse(time.to_s).utc` on a
seconds value results in an
```
ArgumentError: argument out of range
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants