In Ory Kratos master, I notice that <github.com/or...
# contributors
f
In Ory Kratos master, I notice that github.com/ory/kratos/session tests do not pass. I am wondering if I am doing something wrong, or if something slipped past CI. I am running with
cd session; go test -tags sqlite -short .
b
What errors are you seeing?
f
Apologies for not sending more detail up front.
Copy code
aran@Mac kratos % git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
aran@Mac kratos % git pull
Already up to date.
aran@Mac kratos % cd session; go test -tags sqlite -short .
time=2025-04-03T08:10:57-07:00 level=warning msg=Migration has requested running outside a transaction. Proceed with caution. audience=application migration_file=migrations/sql/20241029153900000001_identities.autocommit.up.sql migration_name=identities service_name= service_version= version=20241029153900000001
time=2025-04-03T08:10:57-07:00 

<snip> 

level=warning msg=Migration has requested running outside a transaction. Proceed with caution. audience=application migration_file=migrations/sql/20241108105000000001_index_cleanup.autocommit.up.sql migration_name=index_cleanup service_name= service_version= version=20241108105000000001
--- FAIL: TestHandlerAdminSessionManagement (1.02s)
    --- FAIL: TestHandlerAdminSessionManagement/case=should_return_pagination_headers_on_list_response (0.00s)
        --- FAIL: TestHandlerAdminSessionManagement/case=should_return_pagination_headers_on_list_response/active="true" (0.00s)
            handler_test.go:839: 
                        Error Trace:    /Users/aran/Projects/kratos/session/handler_test.go:839
                        Error:          elements differ
                                    
                                        extra elements in list A:
                                        ([]interface {}) (len=2) {
                                         (uuid.UUID) (len=16) {
                                          00000000  c9 0d ad cf 5d 90 46 43  9b 99 47 9e 71 6c e9 ec  |....].FC..G.ql..|
                                         },
                                         (uuid.UUID) (len=16) {
                                          00000000  7a bb bd 87 8a 00 44 24  92 6c b7 93 d0 f6 cf c4  |z.....D$.l......|
                                         }
                                        }
                                    
                                    
                                        listA:
                                        ([]uuid.UUID) (len=2) {
                                         (uuid.UUID) (len=16) {
                                          00000000  c9 0d ad cf 5d 90 46 43  9b 99 47 9e 71 6c e9 ec  |....].FC..G.ql..|
                                         },
                                         (uuid.UUID) (len=16) {
                                          00000000  7a bb bd 87 8a 00 44 24  92 6c b7 93 d0 f6 cf c4  |z.....D$.l......|
                                         }
                                        }
                                    
                                    
                                        listB:
                                        ([]uuid.UUID) {
                                        }
                        Test:           TestHandlerAdminSessionManagement/case=should_return_pagination_headers_on_list_response/active="true"
        --- FAIL: TestHandlerAdminSessionManagement/case=should_return_pagination_headers_on_list_response/active="false" (0.00s)
            handler_test.go:839: 
                        Error Trace:    /Users/aran/Projects/kratos/session/handler_test.go:839
                        Error:          elements differ
                                    
                                        extra elements in list B:
                                        ([]interface {}) (len=2) {
                                         (uuid.UUID) (len=16) {
                                          00000000  7a bb bd 87 8a 00 44 24  92 6c b7 93 d0 f6 cf c4  |z.....D$.l......|
                                         },
                                         (uuid.UUID) (len=16) {
                                          00000000  c9 0d ad cf 5d 90 46 43  9b 99 47 9e 71 6c e9 ec  |....].FC..G.ql..|
                                         }
                                        }
                                    
                                    
                                        listA:
                                        ([]uuid.UUID) (len=3) {
                                         (uuid.UUID) (len=16) {
                                          00000000  76 49 7b 75 31 3a 48 8b  a0 9b b3 99 86 c2 12 ae  |vI{u1:H.........|
                                         },
                                         (uuid.UUID) (len=16) {
                                          00000000  d8 c9 e8 de 69 59 40 73  be fc 68 87 1a da 2a 85  |....iY@s..h...*.|
                                         },
                                         (uuid.UUID) (len=16) {
                                          00000000  61 37 fd f1 d2 be 4e 15  94 66 c4 ac c1 35 a0 99  |a7....N..f...5..|
                                         }
                                        }
                                    
                                    
                                        listB:
                                        ([]uuid.UUID) (len=5) {
                                         (uuid.UUID) (len=16) {
                                          00000000  61 37 fd f1 d2 be 4e 15  94 66 c4 ac c1 35 a0 99  |a7....N..f...5..|
                                         },
                                         (uuid.UUID) (len=16) {
                                          00000000  d8 c9 e8 de 69 59 40 73  be fc 68 87 1a da 2a 85  |....iY@s..h...*.|
                                         },
                                         (uuid.UUID) (len=16) {
                                          00000000  76 49 7b 75 31 3a 48 8b  a0 9b b3 99 86 c2 12 ae  |vI{u1:H.........|
                                         },
                                         (uuid.UUID) (len=16) {
                                          00000000  7a bb bd 87 8a 00 44 24  92 6c b7 93 d0 f6 cf c4  |z.....D$.l......|
                                         },
                                         (uuid.UUID) (len=16) {
                                          00000000  c9 0d ad cf 5d 90 46 43  9b 99 47 9e 71 6c e9 ec  |....].FC..G.ql..|
                                         }
                                        }
                        Test:           TestHandlerAdminSessionManagement/case=should_return_pagination_headers_on_list_response/active="false"
time=2025-04-03T08:11:03-07:00 level=warning msg=Migration has requested running outside a transaction. Proceed with caution. audience=application migration_file=migrations/sql/20241029153900000001_identities.autocommit.up.sql migration_name=identities service_name= service_version= version=20241029153900000001
time=2025-04-03T08:11:03-07:00 

<snip>

level=warning msg=Migration has requested running outside a transaction. Proceed with caution. audience=application migration_file=migrations/sql/20241108105000000001_index_cleanup.autocommit.up.sql migration_name=index_cleanup service_name= service_version= version=20241108105000000001
FAIL
FAIL    <http://github.com/ory/kratos/session|github.com/ory/kratos/session>   39.500s
FAIL
aran@Mac session % git rev-parse --short HEAD
ef2ad4445
b
And this is reproducable?
f
yes - this is just check out master from git and run the command on my arm mac. I have
go version go1.24.1 darwin/arm64
r
Works on my machine?
Copy code
$ go test -tags sqlite -short .
ok      <http://github.com/ory/kratos/session|github.com/ory/kratos/session>   49.602s
$ git rev-parse HEAD
d5e0f6fd73e317eb2f7ec20b2ddf84b5cb8f59f4
Do you still have this issue?
f
@refined-kangaroo-48640 - yes. updated to lastest master / d5e0f6fd73e317, and go 1.24.2. I also just tried running with a more recent version of sqlite on the PATH - 3.49.1 instead of the system default 3.43.2 in case it is using sqlite from PATH. I’m not sure what other dependencies would be involved that could cause such an issue.
I also tried a go mod tidy, no change
r
Weird