Skip to content

Sequel CI failures with ActiveSupport 6.1 #6488

@headius

Description

@headius

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions