cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.18k stars 3.82k forks source link

pkg/ccl/testccl/sqlccl/sqlccl_test: TestShowTransferState failed #128125

Closed github-actions[bot] closed 1 month ago

github-actions[bot] commented 3 months ago

pkg/ccl/testccl/sqlccl/sqlccl_test.TestShowTransferState failed on master @ 78fa126dfc749e620c28531c1659e35bf98034ec:

=== RUN   TestShowTransferState
    test_log_scope.go:170: test logs captured to: outputs.zip/logTestShowTransferState246603600
    test_log_scope.go:81: use -show-logs to present logs inline
    show_transfer_state_test.go:268: -- test log scope end --
test logs left over in: outputs.zip/logTestShowTransferState246603600
--- FAIL: TestShowTransferState (2.05s)
=== RUN   TestShowTransferState/errors
    --- FAIL: TestShowTransferState/errors (0.02s)
=== RUN   TestShowTransferState/errors/root_user
    show_transfer_state_test.go:219: 
            Error Trace:    pkg/ccl/testccl/sqlccl/sqlccl_test/pkg/ccl/testccl/sqlccl/show_transfer_state_test.go:219
            Error:          Not equal: 
                            expected: "cannot create token for root user"
                            actual  : "session revival tokens are not supported on this cluster"

                            Diff:
                            --- Expected
                            +++ Actual
                            @@ -1 +1 @@
                            -cannot create token for root user
                            +session revival tokens are not supported on this cluster
            Test:           TestShowTransferState/errors/root_user
        --- FAIL: TestShowTransferState/errors/root_user (0.00s)
=== RUN   TestShowTransferState/successful_transfer
    show_transfer_state_test.go:163: 
            Error Trace:    pkg/ccl/testccl/sqlccl/sqlccl_test/pkg/ccl/testccl/sqlccl/show_transfer_state_test.go:163
            Error:          Received unexpected error:
                            failed to connect to ``host=127.0.0.1 user=testuser database=``: server error (ERROR: session revival tokens are not supported on this cluster (SQLSTATE 28000))
            Test:           TestShowTransferState/successful_transfer
    --- FAIL: TestShowTransferState/successful_transfer (0.01s)
=== RUN   TestShowTransferState/with_transfer_key
    show_transfer_state_test.go:142: 
            Error Trace:    pkg/ccl/testccl/sqlccl/sqlccl_test/pkg/ccl/testccl/sqlccl/show_transfer_state_test.go:142
            Error:          Should be false
            Test:           TestShowTransferState/with_transfer_key
    --- FAIL: TestShowTransferState/with_transfer_key (0.20s)
=== RUN   TestShowTransferState/without_transfer_key
    show_transfer_state_test.go:78: 
            Error Trace:    pkg/ccl/testccl/sqlccl/sqlccl_test/pkg/ccl/testccl/sqlccl/show_transfer_state_test.go:78
            Error:          Should be false
            Test:           TestShowTransferState/without_transfer_key
            Messages:       expected null error, got session revival tokens are not supported on this cluster
    --- FAIL: TestShowTransferState/without_transfer_key (0.02s)

Parameters:

See also: How To Investigate a Go Test Failure (internal)

This test on roachdash | Improve this report!

Jira issue: CRDB-40806

cockroach-teamcity commented 3 months ago

pkg/ccl/testccl/sqlccl/sqlccl_test.TestShowTransferState failed on master @ 9e48858c6c8b22af4ec1159bcff6e233e7bfddff:

=== RUN   TestShowTransferState
    test_log_scope.go:170: test logs captured to: outputs.zip/logTestShowTransferState136549065
    test_log_scope.go:81: use -show-logs to present logs inline
    show_transfer_state_test.go:268: -- test log scope end --
test logs left over in: outputs.zip/logTestShowTransferState136549065
--- FAIL: TestShowTransferState (2.16s)
=== RUN   TestShowTransferState/without_transfer_key
    show_transfer_state_test.go:78: 
            Error Trace:    pkg/ccl/testccl/sqlccl/sqlccl_test/pkg/ccl/testccl/sqlccl/show_transfer_state_test.go:78
            Error:          Should be false
            Test:           TestShowTransferState/without_transfer_key
            Messages:       expected null error, got session revival tokens are not supported on this cluster
    --- FAIL: TestShowTransferState/without_transfer_key (0.02s)
=== RUN   TestShowTransferState/errors
    --- FAIL: TestShowTransferState/errors (0.02s)
=== RUN   TestShowTransferState/errors/root_user
    show_transfer_state_test.go:219: 
            Error Trace:    pkg/ccl/testccl/sqlccl/sqlccl_test/pkg/ccl/testccl/sqlccl/show_transfer_state_test.go:219
            Error:          Not equal: 
                            expected: "cannot create token for root user"
                            actual  : "session revival tokens are not supported on this cluster"

                            Diff:
                            --- Expected
                            +++ Actual
                            @@ -1 +1 @@
                            -cannot create token for root user
                            +session revival tokens are not supported on this cluster
            Test:           TestShowTransferState/errors/root_user
        --- FAIL: TestShowTransferState/errors/root_user (0.00s)
=== RUN   TestShowTransferState/successful_transfer
    show_transfer_state_test.go:163: 
            Error Trace:    pkg/ccl/testccl/sqlccl/sqlccl_test/pkg/ccl/testccl/sqlccl/show_transfer_state_test.go:163
            Error:          Received unexpected error:
                            failed to connect to ``host=127.0.0.1 user=testuser database=``: server error (ERROR: session revival tokens are not supported on this cluster (SQLSTATE 28000))
            Test:           TestShowTransferState/successful_transfer
    --- FAIL: TestShowTransferState/successful_transfer (0.01s)
=== RUN   TestShowTransferState/with_transfer_key
    show_transfer_state_test.go:142: 
            Error Trace:    pkg/ccl/testccl/sqlccl/sqlccl_test/pkg/ccl/testccl/sqlccl/show_transfer_state_test.go:142
            Error:          Should be false
            Test:           TestShowTransferState/with_transfer_key
    --- FAIL: TestShowTransferState/with_transfer_key (0.20s)

Parameters:

See also: How To Investigate a Go Test Failure (internal)

This test on roachdash | Improve this report!

fqazi commented 2 months ago

For some reason the cluster setting isn't set on the tenant if we see this error:

https://github.com/cockroachdb/cockroach/blob/b8dc903c562047f9f2009642c281b4920292fc32/pkg/sql/session_revival_token.go#L57

The test does set it earlier for the tenant at:

https://github.com/cockroachdb/cockroach/blob/b8dc903c562047f9f2009642c281b4920292fc32/pkg/ccl/testccl/sqlccl/show_transfer_state_test.go#L44

Lets try reproing it since the logs are gone :(

renatolabs commented 2 months ago

This flaked on my PR: https://github.com/cockroachdb/cockroach/actions/runs/10927133607?pr=130194.

renatolabs commented 2 months ago

Another flake: https://github.com/cockroachdb/cockroach/actions/runs/11020565533?pr=131314

jaylim-crl commented 2 months ago

The test does set it earlier for the tenant at:

_, err = mainDB.Exec("ALTER TENANT ALL SET CLUSTER SETTING server.user_login.session_revival_token.enabled = true")

I wonder if we need to wait until the cluster setting gets propagated to the tenant.

Dedej-Bergin commented 2 months ago

FYI this test is now being skipped until it is fixed properly via this PR: https://github.com/cockroachdb/cockroach/pull/131363