Skip to content

GO-4284 Remove Relation links #2145

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

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

Conversation

KirillSto
Copy link
Member

@KirillSto KirillSto commented Feb 20, 2025

https://linear.app/anytype/issue/GO-4284/get-rid-of-relation-links

  • remove relationLinks from state. Now list of relations is calculated based on details
  • relationLinks are depricated in Snapshots
  • relation addition means detail addition with Null value
  • relation removal means detail removal
  • relationLinks used to carry relation format. Now format is fetched from object store
  • on state build empty details are not ignored anymore
  • We do not generate ChangeRelationAdd and ChangeRelationRemove changes anymore
  • RelationLinks are removed from responses of History, ObjectView and ObjectOpen rpcs
  • ObjectToBookmark request is removed, as it is not used by clients

Copy link

github-actions bot commented Feb 20, 2025

Previous Coverage 50.5% of statements
New Coverage 50.4% of statements
Patch Coverage 60.5% of changed statements (351/580)

Coverage provided by https://github.com/seriousben/go-patch-cover-action

@KirillSto KirillSto self-assigned this Feb 21, 2025
@KirillSto KirillSto marked this pull request as ready for review February 21, 2025 15:49
@@ -296,7 +293,12 @@ func handleObjectRelation(st *state.State, oldIDtoNew map[string]string, v domai
}
return
}
objectsIDs := v.StringList()

objectsIDs, ok := v.TryStringList()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only objects relations have list in details?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, in general SringList could carry relation of every format.
However, our clients do not allow to make relations of format != object and with StringList type

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's really good, you paid attention to this code, because I don't really know, how to check format here. We could propagate store index and it would be useful only for bundled relations and relations that already present in the store. Other relations are not indexed, because they are not imported yet

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All we rely on here right now is cid.Parse check, but of course that is not the best check 🙂

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, we can get bundled relations format without store the same way we do it in system objects revisor. As for imported relations, we should extract their format from according snapshot and provide this information to this function. But I think, it is a separate task

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return s.Details().Merge(s.LocalDetails())
}

func (s *State) AllRelationKeys() []domain.RelationKey {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every call it allocate 3 slices, I suggest you to use Iterators to make this code to have zero allocations. AllRelationKeys iterator will call Details.Iterate and LocalDetails.Iterate.

https://pkg.go.dev/slices#Collect is useful to collect result of iteration to slice

Also you can add new function ContainsInSeq to our library. This function will search for element in iter.Seq and have no allocations. So there will no need to convert iterator to slice and then use slices.Contains.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have also introduced State.iteratreKeys() iter.Seq[domain.Key] method. It can be made global, but I am not sure about security

Base automatically changed from feature/primitives to main February 24, 2025 16:37
# Conflicts:
#	clientlibrary/service/service.pb.go
#	core/block/editor/archive.go
#	core/block/editor/smartblock/detailsinject.go
#	core/block/editor/smartblock/smartblock.go
#	core/block/editor/state/state_test.go
#	core/block/source/bundledobjecttype.go
#	core/indexer/fulltext.go
#	core/publish/service_test.go
#	pb/commands.pb.go
#	pb/service/mock_service/mock_ClientCommandsServer.go
#	pb/service/service.pb.go
#	pkg/lib/pb/model/models.pb.go
Copy link

Testomat.io Report 🔴 SMOKE-TEST FAILED
Tests ✔️ 19 tests run
Summary 🔴 18 failed; 🟢 1 passed; 🟡 0 skipped
Duration 🕐 24 minutes, 28 seconds
Testomat.io Report 📊 Run #ccc90376
Job 🗂️ Smoke Tests / smoke-test
Operating System 🖥️ Linux X64

✅ Passed Tests (1)

  • Sync on staging nodes (1 minute, 47 seconds)

🟥 Failures (18)

🔴 Revoking an invite link

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (139812.92ms)
And the user 1 is using client 1 (0.61ms)
And the user creates a new account on "staging" (1835.80ms)
And the account is synced within 60 seconds (62075.70ms)
Given the user has shared his space and generated an invite link (0.00ms)
When the user revokes the invite link (0.00ms)
Then the invite link should be invalid (0.00ms)
And the account is deleted (0.00ms)
And the server 1 is stopped (0.00ms)

🔴 Revoking an invite link (Will be retried 🔄)

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (3462.89ms)
And the user 1 is using client 1 (0.42ms)
And the user creates a new account on "staging" (1843.73ms)
And the account is synced within 60 seconds (62055.85ms)
Given the user has shared his space and generated an invite link (0.00ms)
When the user revokes the invite link (0.00ms)
Then the invite link should be invalid (0.00ms)
And the account is deleted (0.00ms)
And the server 1 is stopped (0.00ms)

🔴 User cancels their join request

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (3472.14ms)
And the user 1 is using client 1 (0.31ms)
And the user creates a new account on "staging" (1857.80ms)
And the account is synced within 60 seconds (62023.02ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
And the user cancels their join request (0.00ms)
And the user 1 is using client 1 (0.00ms)
Then there is no request pending for joining the space (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 User cancels their join request (Will be retried 🔄)

Error: function timed out, ensure the promise resolves within 5000 milliseconds at Timeout. (/home/runner/work/anytype-heart/anytype-heart/node_modules/@cucumber/cucumber/src/time.ts:52:14) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7)

################[ Steps ]################
Given the server "default" 1 is running (3592.77ms)
And the user 1 is using client 1 (0.29ms)
And the user creates a new account on "staging" (1861.32ms)
And the account is synced within 60 seconds (41260.74ms)
Given the user creates an object 1 in the account (8.40ms)
And the user can open the object 1 (10006.92ms)
And the user has shared his space and generated an invite link (850.94ms)
And the account is synced within 60 seconds (100.66ms)
And the server "default" 2 is running (3579.64ms)
And the user 2 is using client 2 (0.32ms)
And the user creates a new account on "staging" (1949.06ms)
And the user sends requests to join the space (5000.99ms)
And the user cancels their join request (0.00ms)
And the user 1 is using client 1 (0.00ms)
Then there is no request pending for joining the space (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 User deletes the space and rejoins later

Error: function timed out, ensure the promise resolves within 5000 milliseconds at Timeout. (/home/runner/work/anytype-heart/anytype-heart/node_modules/@cucumber/cucumber/src/time.ts:52:14) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7)

################[ Steps ]################
Given the server "default" 1 is running (3543.61ms)
And the user 1 is using client 1 (0.24ms)
And the user creates a new account on "staging" (1853.02ms)
And the account is synced within 60 seconds (41165.40ms)
Given the user creates an object 1 in the account (7.96ms)
And the user can open the object 1 (10006.72ms)
And the user has shared his space and generated an invite link (875.72ms)
And the account is synced within 60 seconds (100.72ms)
And the server "default" 2 is running (3577.40ms)
And the user 2 is using client 2 (0.31ms)
And the user creates a new account on "staging" (1849.01ms)
And the user sends requests to join the space (5000.85ms)
When the user 1 approves the join request of user 2 with "Viewer" rights (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user 2 leaves the shared space (0.00ms)
And the user sends requests to join the space (0.00ms)
Then the request is automatically approved as "Viewer" again (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 User deletes the space and rejoins later (Will be retried 🔄)

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (3615.71ms)
And the user 1 is using client 1 (0.23ms)
And the user creates a new account on "staging" (1864.38ms)
And the account is synced within 60 seconds (62117.03ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Viewer" rights (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user 2 leaves the shared space (0.00ms)
And the user sends requests to join the space (0.00ms)
Then the request is automatically approved as "Viewer" again (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner changes the rights of a user from Viewer to Editor

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (3535.01ms)
And the user 1 is using client 1 (0.23ms)
And the user creates a new account on "staging" (2078.48ms)
And the account is synced within 60 seconds (62054.60ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Viewer" rights (0.00ms)
And the user 1 changes the rights of user 2 from "Viewer" to "Editor" (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can open the object 1 (0.00ms)
And the user can rename the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner changes the rights of a user from Viewer to Editor (Will be retried 🔄)

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (3515.24ms)
And the user 1 is using client 1 (0.23ms)
And the user creates a new account on "staging" (1847.92ms)
And the account is synced within 60 seconds (62065.39ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Viewer" rights (0.00ms)
And the user 1 changes the rights of user 2 from "Viewer" to "Editor" (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can open the object 1 (0.00ms)
And the user can rename the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner approves a join request with Editor permissions

Error: function timed out, ensure the promise resolves within 5000 milliseconds at Timeout. (/home/runner/work/anytype-heart/anytype-heart/node_modules/@cucumber/cucumber/src/time.ts:52:14) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7)

################[ Steps ]################
Given the server "default" 1 is running (3582.35ms)
And the user 1 is using client 1 (0.25ms)
And the user creates a new account on "staging" (1960.79ms)
And the account is synced within 60 seconds (44116.48ms)
Given the user creates an object 1 in the account (7.41ms)
And the user can open the object 1 (10007.04ms)
And the user has shared his space and generated an invite link (919.30ms)
And the account is synced within 60 seconds (100.64ms)
And the server "default" 2 is running (3576.83ms)
And the user 2 is using client 2 (0.23ms)
And the user creates a new account on "staging" (1872.25ms)
And the user sends requests to join the space (5001.36ms)
When the user 1 approves the join request of user 2 with "Editor" rights (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can open the object 1 (0.00ms)
And the user can rename the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner approves a join request with Editor permissions (Will be retried 🔄)

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (3548.50ms)
And the user 1 is using client 1 (0.22ms)
And the user creates a new account on "staging" (1863.58ms)
And the account is synced within 60 seconds (62103.08ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Editor" rights (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can open the object 1 (0.00ms)
And the user can rename the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner declines a join request

Error: function timed out, ensure the promise resolves within 5000 milliseconds at Timeout. (/home/runner/work/anytype-heart/anytype-heart/node_modules/@cucumber/cucumber/src/time.ts:52:14) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7)

################[ Steps ]################
Given the server "default" 1 is running (3628.66ms)
And the user 1 is using client 1 (0.21ms)
And the user creates a new account on "staging" (1856.00ms)
And the account is synced within 60 seconds (44166.84ms)
Given the user creates an object 1 in the account (9.84ms)
And the user can open the object 1 (10005.94ms)
And the user has shared his space and generated an invite link (955.38ms)
And the account is synced within 60 seconds (100.60ms)
And the server "default" 2 is running (3580.28ms)
And the user 2 is using client 2 (0.23ms)
And the user creates a new account on "staging" (1915.07ms)
And the user sends requests to join the space (5000.41ms)
When the user 1 declines the join request of user 2 (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can't open the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner declines a join request (Will be retried 🔄)

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (3593.29ms)
And the user 1 is using client 1 (0.20ms)
And the user creates a new account on "staging" (1881.09ms)
And the account is synced within 60 seconds (62104.28ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 declines the join request of user 2 (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can't open the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner removes a participant from the space

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (3663.79ms)
And the user 1 is using client 1 (0.15ms)
And the user creates a new account on "staging" (1978.23ms)
And the account is synced within 60 seconds (62111.29ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Editor" rights (0.00ms)
When the user 1 removes the user 2 from the space (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can't open the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner removes a participant from the space (Will be retried 🔄)

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (3695.50ms)
And the user 1 is using client 1 (0.22ms)
And the user creates a new account on "staging" (1901.92ms)
And the account is synced within 60 seconds (62117.66ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Editor" rights (0.00ms)
When the user 1 removes the user 2 from the space (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can't open the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner deletes a space

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (3772.49ms)
And the user 1 is using client 1 (0.22ms)
And the user creates a new account on "staging" (1980.86ms)
And the account is synced within 60 seconds (62103.64ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Editor" rights (0.00ms)
And the user 1 deletes the shared space (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can't open the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner deletes a space (Will be retried 🔄)

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (3715.94ms)
And the user 1 is using client 1 (0.19ms)
And the user creates a new account on "staging" (2062.42ms)
And the account is synced within 60 seconds (62117.84ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Editor" rights (0.00ms)
And the user 1 deletes the shared space (0.00ms)
And the user 2 is using client 2 (0.00ms)
Then the user can't open the object 1 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner approves leave request

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (3578.90ms)
And the user 1 is using client 1 (0.24ms)
And the user creates a new account on "staging" (1877.59ms)
And the account is synced within 60 seconds (62074.77ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Viewer" rights (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user 2 leaves the shared space (0.00ms)
And the user 1 approves the leave request of user 2 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

🔴 Owner approves leave request (Will be retried 🔄)

Error: Test failed: The account did not sync within the expected time. Stack trace: Error: Timeout: Condition not met within the specified time. at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:594:17) at processTimers (node:internal/timers:529:7) at World. (/home/runner/work/anytype-heart/anytype-heart/step_definitions/api/accountSteps.ts:233:13)

################[ Steps ]################
Given the server "default" 1 is running (3794.60ms)
And the user 1 is using client 1 (0.18ms)
And the user creates a new account on "staging" (2013.96ms)
And the account is synced within 60 seconds (62092.78ms)
Given the user creates an object 1 in the account (0.00ms)
And the user can open the object 1 (0.00ms)
And the user has shared his space and generated an invite link (0.00ms)
And the account is synced within 60 seconds (0.00ms)
And the server "default" 2 is running (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user creates a new account on "staging" (0.00ms)
And the user sends requests to join the space (0.00ms)
When the user 1 approves the join request of user 2 with "Viewer" rights (0.00ms)
And the user 2 is using client 2 (0.00ms)
And the user 2 leaves the shared space (0.00ms)
And the user 1 approves the leave request of user 2 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

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

Successfully merging this pull request may close these issues.

3 participants