Skip to content

Fix duplicate UnmarshalJSON func for SyncData #9576

Fix duplicate UnmarshalJSON func for SyncData

Fix duplicate UnmarshalJSON func for SyncData #9576

Triggered via push April 8, 2024 14:19
Status Failure
Total duration 12m 42s
Artifacts

ci.yml

on: push
Matrix: test-sgcollect
Matrix: test-stats-definition-exporter
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

46 errors and 4 warnings
lint: db/document.go#L1251
func `(*Document).currentChannels` is unused (unused)
lint
issues found
test (ubuntu)
Process completed with exit code 1.
test (ubuntu): access_test.go#L63
access_test.go:63: Error Trace: /home/runner/work/sync_gateway/sync_gateway/db/access_test.go:63 Error: Received unexpected error: 403 forbidden Test: TestDynamicChannelGrant 2024-04-08T14:21:08.146Z
test (ubuntu): database_test.go#L514
database_test.go:514: Error Trace: /home/runner/work/sync_gateway/sync_gateway/db/database_test.go:514 Error: Not equal: expected: db.Body{"_id":"doc1", "_rev":"2-887ae37ab268774730645af84ac149bb", "_revisions":db.Revisions{"ids":[]string{"887ae37ab268774730645af84ac149bb", "b980f8ee1b0cc306ce1e6556bfb33ac3"}, "start":2}, "channels":[]string{"ABC"}, "k2":"v2"} actual : db.Body{"_id":"doc1", "_removed":true, "_rev":"2-887ae37ab268774730645af84ac149bb", "_revisions":db.Revisions{"ids":[]string{"887ae37ab268774730645af84ac149bb", "b980f8ee1b0cc306ce1e6556bfb33ac3"}, "start":2}} Diff: --- Expected +++ Actual @@ -1,3 +1,4 @@ -(db.Body) (len=5) { +(db.Body) (len=4) { (string) (len=3) "_id": (string) (len=4) "doc1", + (string) (len=8) "_removed": (bool) true, (string) (len=4) "_rev": (string) (len=34) "2-887ae37ab268774730645af84ac149bb", @@ -9,7 +10,3 @@ (string) (len=5) "start": (int) 2 - }, - (string) (len=8) "channels": ([]string) (len=1) { - (string) (len=3) "ABC" - }, - (string) (len=2) "k2": (string) (len=2) "v2" + } } Test: TestUncachedOldRevisionChannel ---
test (ubuntu): database_test.go#L586
database_test.go:586: Error Trace: /home/runner/work/sync_gateway/sync_gateway/db/database_test.go:586 Error: Not equal: expected: db.Body{"_id":"doc1", "_rev":"2-98b0e58dd5e3d2c23bbcec36458559f1", "_revisions":db.Revisions{"ids":[]string{"98b0e58dd5e3d2c23bbcec36458559f1", "f8fd91d4024e824690d5dd4f20ffbf1c"}, "start":2}, "channels":[]string{"ABC"}, "k2":"v2"} actual : db.Body{"_id":"doc1", "_removed":true, "_rev":"2-98b0e58dd5e3d2c23bbcec36458559f1", "_revisions":db.Revisions{"ids":[]string{"98b0e58dd5e3d2c23bbcec36458559f1", "f8fd91d4024e824690d5dd4f20ffbf1c"}, "start":2}} Diff: --- Expected +++ Actual @@ -1,3 +1,4 @@ -(db.Body) (len=5) { +(db.Body) (len=4) { (string) (len=3) "_id": (string) (len=4) "doc1", + (string) (len=8) "_removed": (bool) true, (string) (len=4) "_rev": (string) (len=34) "2-98b0e58dd5e3d2c23bbcec36458559f1", @@ -9,7 +10,3 @@ (string) (len=5) "start": (int) 2 - }, - (string) (len=8) "channels": ([]string) (len=1) { - (string) (len=3) "ABC" - }, - (string) (len=2) "k2": (string) (len=2) "v2" + } } Test: TestGetRemovalMultiChannel ---
test (ubuntu): rest/changes_api_test.go#L1961
changes_api_test.go:1961: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/changestest/changes_api_test.go:1961 Error: Received unexpected error: unexpected end of JSON input Test: TestOneShotChangesWithExplicitDocIds
test (ubuntu): rest/changes_api_test.go#L1962
changes_api_test.go:1962: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/changestest/changes_api_test.go:1962 Error: Not equal: expected: string("docD") actual : <nil>(<nil>) Test: TestOneShotChangesWithExplicitDocIds 2024-04-08T14:21:17.823Z
test (ubuntu): rest/changes_api_test.go#L2219
changes_api_test.go:2219: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/changestest/changes_api_test.go:2219 Error: Received unexpected error: Unexpected empty JSON input to body.Unmarshal Test: TestChangesIncludeDocs
test (ubuntu): rest/changes_api_test.go#L2219
changes_api_test.go:2219: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/changestest/changes_api_test.go:2219 Error: Received unexpected error: Unexpected empty JSON input to body.Unmarshal Test: TestChangesIncludeDocs
test (ubuntu): blip_api_crud_test.go#L1782
blip_api_crud_test.go:1782: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/blip_api_crud_test.go:1782 Error: Should be false Test: TestGetRemovedDoc 2024-04-08T14:21:20.658Z
test (ubuntu): rest/blip_api_delta_sync_test.go#L523
blip_api_delta_sync_test.go:523: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/blip_api_delta_sync_test.go:523 /home/runner/work/sync_gateway/sync_gateway/rest/blip_client_test.go:615 Error: "{\"_removed\":true}" does not contain "\"channels\":[\"public\"]" Test: TestBlipDeltaSyncPullTombstoned/revTree
test (ubuntu): rest/blip_api_delta_sync_test.go#L524
blip_api_delta_sync_test.go:524: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/blip_api_delta_sync_test.go:524 /home/runner/work/sync_gateway/sync_gateway/rest/blip_client_test.go:615 Error: "{\"_removed\":true}" does not contain "\"greetings\":[{\"hello\":\"world!\"}]" Test: TestBlipDeltaSyncPullTombstoned/revTree 2024-04-08T14:21:25.678Z
test-race
Process completed with exit code 1.
test-race: database_test.go#L514
database_test.go:514: Error Trace: /home/runner/work/sync_gateway/sync_gateway/db/database_test.go:514 Error: Not equal: expected: db.Body{"_id":"doc1", "_rev":"2-887ae37ab268774730645af84ac149bb", "_revisions":db.Revisions{"ids":[]string{"887ae37ab268774730645af84ac149bb", "b980f8ee1b0cc306ce1e6556bfb33ac3"}, "start":2}, "channels":[]string{"ABC"}, "k2":"v2"} actual : db.Body{"_id":"doc1", "_removed":true, "_rev":"2-887ae37ab268774730645af84ac149bb", "_revisions":db.Revisions{"ids":[]string{"887ae37ab268774730645af84ac149bb", "b980f8ee1b0cc306ce1e6556bfb33ac3"}, "start":2}} Diff: --- Expected +++ Actual @@ -1,3 +1,4 @@ -(db.Body) (len=5) { +(db.Body) (len=4) { (string) (len=3) "_id": (string) (len=4) "doc1", + (string) (len=8) "_removed": (bool) true, (string) (len=4) "_rev": (string) (len=34) "2-887ae37ab268774730645af84ac149bb", @@ -9,7 +10,3 @@ (string) (len=5) "start": (int) 2 - }, - (string) (len=8) "channels": ([]string) (len=1) { - (string) (len=3) "ABC" - }, - (string) (len=2) "k2": (string) (len=2) "v2" + } } Test: TestUncachedOldRevisionChannel ---
test-race: rest/changes_api_test.go#L2219
changes_api_test.go:2219: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/changestest/changes_api_test.go:2219 Error: Received unexpected error: Unexpected empty JSON input to body.Unmarshal Test: TestChangesIncludeDocs
test-race: rest/changes_api_test.go#L2219
changes_api_test.go:2219: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/changestest/changes_api_test.go:2219 Error: Received unexpected error: Unexpected empty JSON input to body.Unmarshal Test: TestChangesIncludeDocs
test-race: revocation_test.go#L2004
revocation_test.go:2004: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/revocation_test.go:2004 Error: Received unexpected error: expecting 1 changes, got 0 Test: TestReplicatorRevocationsWithChannelFilter 2024-04-08T14:22:09.206Z
test-race: rest/changes_api_test.go#L1961
changes_api_test.go:1961: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/changestest/changes_api_test.go:1961 Error: Received unexpected error: unexpected end of JSON input Test: TestOneShotChangesWithExplicitDocIds
test-race: rest/changes_api_test.go#L1962
changes_api_test.go:1962: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/changestest/changes_api_test.go:1962 Error: Not equal: expected: string("docD") actual : <nil>(<nil>) Test: TestOneShotChangesWithExplicitDocIds 2024-04-08T14:21:53.628Z
test-race: rest/replicator_test.go#L5487
replicator_test.go:5487: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/replicatortest/replicator_test.go:5487 Error: Received unexpected error: expecting 13 changes, got 0 Test: TestActiveReplicatorPullModifiedHash 2024-04-08T14:22:35.728Z
test-race: revocation_test.go#L2597
revocation_test.go:2597: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/revocation_test.go:2597 Error: Received unexpected error: expecting 17 changes, got 0 Test: TestReplicatorSwitchPurgeNoReset 2024-04-08T14:22:35.846Z
test-race: blip_api_crud_test.go#L1782
blip_api_crud_test.go:1782: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/blip_api_crud_test.go:1782 Error: Should be false Test: TestGetRemovedDoc 2024/04/08
test-race: rest/replicatortest/replicator_test.go#L6745
replicator_test.go:6745: Error Trace: /home/runner/work/sync_gateway/sync_gateway/rest/replicatortest/replicator_test.go:6745 Error: Received unexpected error: RetryLoop for Wait for condition options giving up after 201 attempts Test: TestDefaultConflictResolverWithTombstoneRemote/revGenTieRemoteDigestLower 2024-04-08T14:22:59.139Z
test (windows): rest/blip_api_crud_test.go#L2783
blip_api_crud_test.go:2783: Error Trace: D:/a/sync_gateway/sync_gateway/rest/blip_api_crud_test.go:2783 D:/a/sync_gateway/sync_gateway/rest/blip_client_test.go:615 Error: Not equal: expected: "{\"channel\":[\"PBS\"]}" actual : "{\"_removed\":true}" Diff: --- Expected +++ Actual @@ -1 +1 @@ -{"channel":["PBS"]} +{"_removed":true} Test: TestRequestPlusPull/revTree 2024-04-08T14:23:01.498Z
test (windows): rest/blip_api_crud_test.go#L2199
blip_api_crud_test.go:2199: Error Trace: D:/a/sync_gateway/sync_gateway/rest/blip_api_crud_test.go:2199 D:/a/sync_gateway/sync_gateway/rest/blip_client_test.go:615 Error: "[[3 doc 2-be1091a5021df5c6d45011885d89fc96 4] [5 docmarker 1-7b361410bb628fcc490f1df46ddd0efa]]" should have 1 item(s), but has 2 Test: TestRemovedMessageWithAlternateAccessAndChannelFilteredReplication/revTree 2024-04-08T14:23:02.030Z
test (windows): revocation_test.go#L2004
revocation_test.go:2004: Error Trace: D:/a/sync_gateway/sync_gateway/rest/revocation_test.go:2004 Error: Received unexpected error: expecting 1 changes, got 0 Test: TestReplicatorRevocationsWithChannelFilter ---
test (windows): rest/changes_api_test.go#L2219
changes_api_test.go:2219: Error Trace: D:/a/sync_gateway/sync_gateway/rest/changestest/changes_api_test.go:2219 Error: Received unexpected error: Unexpected empty JSON input to body.Unmarshal Test: TestChangesIncludeDocs
test (windows): rest/changes_api_test.go#L2219
changes_api_test.go:2219: Error Trace: D:/a/sync_gateway/sync_gateway/rest/changestest/changes_api_test.go:2219 Error: Received unexpected error: Unexpected empty JSON input to body.Unmarshal Test: TestChangesIncludeDocs
test (windows): rest/changes_api_test.go#L1961
changes_api_test.go:1961: Error Trace: D:/a/sync_gateway/sync_gateway/rest/changestest/changes_api_test.go:1961 Error: Received unexpected error: unexpected end of JSON input Test: TestOneShotChangesWithExplicitDocIds
test (windows): rest/changes_api_test.go#L1962
changes_api_test.go:1962: Error Trace: D:/a/sync_gateway/sync_gateway/rest/changestest/changes_api_test.go:1962 Error: Not equal: expected: string("docD") actual : <nil>(<nil>) Test: TestOneShotChangesWithExplicitDocIds 2024-04-08T14:23:28.246Z
test (windows): rest/replicator_test.go#L5391
replicator_test.go:5391: Error Trace: D:/a/sync_gateway/sync_gateway/rest/replicatortest/replicator_test.go:5391 Error: Received unexpected error: expecting 2 changes, got 1 Test: TestActiveReplicatorIgnoreNoConflicts 2024-04-08T14:23:59.944Z
test (windows): revocation_test.go#L1798
revocation_test.go:1798: Error Trace: D:/a/sync_gateway/sync_gateway/rest/revocation_test.go:1798 Error: Received unexpected error: expecting 5 changes, got 0 Test: TestReplicatorRevocationsMultipleAlternateAccess 2024-04-08T14:24:02.456Z
test (windows): database_test.go#L586
database_test.go:586: Error Trace: D:/a/sync_gateway/sync_gateway/db/database_test.go:586 Error: Not equal: expected: db.Body{"_id":"doc1", "_rev":"2-98b0e58dd5e3d2c23bbcec36458559f1", "_revisions":db.Revisions{"ids":[]string{"98b0e58dd5e3d2c23bbcec36458559f1", "f8fd91d4024e824690d5dd4f20ffbf1c"}, "start":2}, "channels":[]string{"ABC"}, "k2":"v2"} actual : db.Body{"_id":"doc1", "_removed":true, "_rev":"2-98b0e58dd5e3d2c23bbcec36458559f1", "_revisions":db.Revisions{"ids":[]string{"98b0e58dd5e3d2c23bbcec36458559f1", "f8fd91d4024e824690d5dd4f20ffbf1c"}, "start":2}} Diff: --- Expected +++ Actual @@ -1,3 +1,4 @@ -(db.Body) (len=5) { +(db.Body) (len=4) { (string) (len=3) "_id": (string) (len=4) "doc1", + (string) (len=8) "_removed": (bool) true, (string) (len=4) "_rev": (string) (len=34) "2-98b0e58dd5e3d2c23bbcec36458559f1", @@ -9,7 +10,3 @@ (string) (len=5) "start": (int) 2 - }, - (string) (len=8) "channels": ([]string) (len=1) { - (string) (len=3) "ABC" - }, - (string) (len=2) "k2": (string) (len=2) "v2" + } } Test: TestGetRemovalMultiChannel ---
test (windows)
Process completed with exit code 1.
test (macos)
Process completed with exit code 1.
test (macos): access_test.go#L63
access_test.go:63: Error Trace: /Users/runner/work/sync_gateway/sync_gateway/db/access_test.go:63 Error: Received unexpected error: 403 forbidden Test: TestDynamicChannelGrant 2024-04-08T14:23:15.395Z
test (macos): database_test.go#L514
database_test.go:514: Error Trace: /Users/runner/work/sync_gateway/sync_gateway/db/database_test.go:514 Error: Not equal: expected: db.Body{"_id":"doc1", "_rev":"2-887ae37ab268774730645af84ac149bb", "_revisions":db.Revisions{"ids":[]string{"887ae37ab268774730645af84ac149bb", "b980f8ee1b0cc306ce1e6556bfb33ac3"}, "start":2}, "channels":[]string{"ABC"}, "k2":"v2"} actual : db.Body{"_id":"doc1", "_removed":true, "_rev":"2-887ae37ab268774730645af84ac149bb", "_revisions":db.Revisions{"ids":[]string{"887ae37ab268774730645af84ac149bb", "b980f8ee1b0cc306ce1e6556bfb33ac3"}, "start":2}} Diff: --- Expected +++ Actual @@ -1,3 +1,4 @@ -(db.Body) (len=5) { +(db.Body) (len=4) { (string) (len=3) "_id": (string) (len=4) "doc1", + (string) (len=8) "_removed": (bool) true, (string) (len=4) "_rev": (string) (len=34) "2-887ae37ab268774730645af84ac149bb", @@ -9,7 +10,3 @@ (string) (len=5) "start": (int) 2 - }, - (string) (len=8) "channels": ([]string) (len=1) { - (string) (len=3) "ABC" - }, - (string) (len=2) "k2": (string) (len=2) "v2" + } } Test: TestUncachedOldRevisionChannel ---
test (macos): blip_api_crud_test.go#L1782
blip_api_crud_test.go:1782: Error Trace: /Users/runner/work/sync_gateway/sync_gateway/rest/blip_api_crud_test.go:1782 Error: Should be false Test: TestGetRemovedDoc 2024-04-08T14:23:52.552Z
test (macos): blip_api_crud_test.go#L1106
blip_api_crud_test.go:1106: Error Trace: /Users/runner/work/sync_gateway/sync_gateway/rest/blip_api_crud_test.go:1106 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/context.go:304 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/receiver.go:276 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/message.go:381 /Users/runner/hostedtoolcache/go/1.21.8/x64/src/runtime/asm_amd64.s:1650 Error: Should be false Test: TestConcurrentRefreshUser
test (macos): blip_api_crud_test.go#L1106
blip_api_crud_test.go:1106: Error Trace: /Users/runner/work/sync_gateway/sync_gateway/rest/blip_api_crud_test.go:1106 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/context.go:304 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/receiver.go:276 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/message.go:381 /Users/runner/hostedtoolcache/go/1.21.8/x64/src/runtime/asm_amd64.s:1650 Error: Should be false Test: TestConcurrentRefreshUser
test (macos): blip_api_crud_test.go#L1106
blip_api_crud_test.go:1106: Error Trace: /Users/runner/work/sync_gateway/sync_gateway/rest/blip_api_crud_test.go:1106 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/context.go:304 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/receiver.go:276 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/message.go:381 /Users/runner/hostedtoolcache/go/1.21.8/x64/src/runtime/asm_amd64.s:1650 Error: Should be false Test: TestConcurrentRefreshUser
test (macos): blip_api_crud_test.go#L1106
blip_api_crud_test.go:1106: Error Trace: /Users/runner/work/sync_gateway/sync_gateway/rest/blip_api_crud_test.go:1106 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/context.go:304 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/receiver.go:276 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/message.go:381 /Users/runner/hostedtoolcache/go/1.21.8/x64/src/runtime/asm_amd64.s:1650 Error: Should be false Test: TestConcurrentRefreshUser
test (macos): blip_api_crud_test.go#L1106
blip_api_crud_test.go:1106: Error Trace: /Users/runner/work/sync_gateway/sync_gateway/rest/blip_api_crud_test.go:1106 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/context.go:304 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/receiver.go:276 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/message.go:381 /Users/runner/hostedtoolcache/go/1.21.8/x64/src/runtime/asm_amd64.s:1650 Error: Should be false Test: TestConcurrentRefreshUser
test (macos): blip_api_crud_test.go#L1106
blip_api_crud_test.go:1106: Error Trace: /Users/runner/work/sync_gateway/sync_gateway/rest/blip_api_crud_test.go:1106 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/context.go:304 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/receiver.go:276 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/message.go:381 /Users/runner/hostedtoolcache/go/1.21.8/x64/src/runtime/asm_amd64.s:1650 Error: Should be false Test: TestConcurrentRefreshUser
test (macos): blip_api_crud_test.go#L1106
blip_api_crud_test.go:1106: Error Trace: /Users/runner/work/sync_gateway/sync_gateway/rest/blip_api_crud_test.go:1106 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/context.go:304 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/receiver.go:276 /Users/runner/go/pkg/mod/github.com/couchbase/[email protected]/message.go:381 /Users/runner/hostedtoolcache/go/1.21.8/x64/src/runtime/asm_amd64.s:1650 Error: Should be false Test: TestConcurrentRefreshUser
test (ubuntu)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: guyarb/[email protected]. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
test-race
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: guyarb/[email protected]. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
test (windows)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: guyarb/[email protected]. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
test (macos)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: guyarb/[email protected]. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.