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

Sequel CI failures with ActiveSupport 6.1 #6488

Closed
headius opened this issue Dec 10, 2020 · 0 comments
Closed

Sequel CI failures with ActiveSupport 6.1 #6488

headius opened this issue Dec 10, 2020 · 0 comments
Milestone

Comments

@headius
Copy link
Member

headius commented Dec 10, 2020

Our master (9.3) CI job based on Sequel HEAD started failing when Sequel started pulling in ActiveSupport 6.1. Pinning it to < 6.1 appears to get it green again.

The failures, which have not yet been investigated by me or by @jeremyevans, are below:

  4) Failure:
Sequel named_timezones extension with Time class#test_0008_should assume datetimes coming out of the database that don't have an offset as coming from database_timezone [/home/travis/build/jruby/jruby/sequel/spec/extensions/named_timezones_spec.rb:185]:
Expected: -25200
  Actual: 0
  5) Failure:
Sequel named_timezones extension with Time class#test_0004_should convert datetimes going into the database to named database_timezone [/home/travis/build/jruby/jruby/sequel/spec/extensions/named_timezones_spec.rb:154]:
--- expected
+++ actual
@@ -1 +1 @@
-["INSERT INTO a VALUES ('2009-06-01 06:20:30-0400', '2009-06-01 06:20:30-0400', '2009-06-01 06:20:30-0400')"]
+["INSERT INTO a VALUES ('2009-06-01 10:20:30+0000', '2009-06-01 10:20:30+0000', '2009-06-01 10:20:30+0000')"]
  6) Failure:
Sequel named_timezones extension with Time class#test_0007_should support tzinfo_disambiguator= to handle ambiguous timezones automatically [/home/travis/build/jruby/jruby/sequel/spec/extensions/named_timezones_spec.rb:178]:
Expected: -25200
  Actual: 0
  7) Failure:
Sequel named_timezones extension with Time class#test_0005_should convert datetimes coming out of the database from database_timezone to application_timezone [/home/travis/build/jruby/jruby/sequel/spec/extensions/named_timezones_spec.rb:161]:
Expected: -25200
  Actual: 0

Update: After some investigation by @jeremyevans only the four errors above relating to the named timezones extension are failing. They pass when run against JRuby 9.2.14.0 so we have broken something in timezone handling on master.

The following script exercises the first example outside of a spec environment, and shows that the offset is being zeroed:

require 'sequel'
require 'tzinfo'

Sequel.extension :thread_local_timezones
Sequel.extension :named_timezones
Sequel.datetime_class = Time
Sequel.application_timezone = 'America/Los_Angeles'
Sequel.database_timezone = 'America/New_York'

ts = Sequel.database_to_application_timestamp('2009-06-01 06:20:30-0400')
p ts.utc_offset # 0 but should be -25200
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

No branches or pull requests

1 participant