8000 GO-4969: REST API Stage 2 by jmetrikat · Pull Request #2303 · anyproto/anytype-heart · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

GO-4969: REST API Stage 2 #2303

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

Merged
merged 146 commits into from
May 6, 2025
Merged

Conversation

jmetrikat
Copy link
Member
@jmetrikat jmetrikat commented Apr 6, 2025

New Endpoints

  • Add new space endpoint: PATCH("/spaces/:space_id")
  • Add new type endpoints:
    • POST("/spaces/:space_id/types")
    • PATCH("/spaces/:space_id/types/:type_id")
    • DELETE("/spaces/:space_id/types/:type_id")
  • Add new property endpoints:
    • GET("/spaces/:space_id/properties")
    • GET("/spaces/:space_id/properties/:property_id")
    • POST("/spaces/:space_id/properties")
    • PATCH("/spaces/:space_id/properties/:property_id")
    • DELETE("/spaces/:space_id/properties/:property_id")
  • Add new tag endoints:
    • GET("/spaces/:space_id/properties/:property_id/tags")
    • ⁠GET("/spaces/:space_id/properties/:property_id/tags/:tag_id")
    • POST("/spaces/:space_id/properties/:property_id/tags")
    • PATCH("/spaces/:space_id/properties/:property_id/tags/:tag_id")
    • DELETE("/spaces/:space_id/properties/:property_id/tags/:tag_id")

Improvements and Fixes

  • Add "Anytype-Version" header parameter to swagger spec
  • Add operation IDs to all endpoints in swagger spec
  • Add actual property id alongside already returned key
  • Return linked properties (featured and from sidebar) and plural_name for types
  • Introduce oneOf for Icon, PropertyWithValue and PropertyLinkWithValue in swagger spec

Breaking Changes

  • Rename recommended_layout to layout for types
  • Move description and source to []properties in CreateObjectRequest
  • Rename layout todo to action for consistency
  • Remove ot- prefix for type keys
  • Rename property to property_key in sort options in search
  • Deprecate separate markdown export, unify with getObject
  • Deprecate blocks in getObject in favor of markdown exported body (proper json block export will be added later)

Copy link
github-actions bot commented Apr 6, 2025

New Coverage 50.0% of statements
Patch Coverage 33.7% of changed statements (597/1774)

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

jmetrikat and others added 27 commits April 6, 2025 20:38
@jmetrikat jmetrikat requested a review from Copilot May 5, 2025 15:54
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements "GO-4969: REST API Stage 2" by removing the legacy internal API endpoints and introducing a new set of REST endpoints under the handler package. Key changes include the complete removal of internal list, export, and auth packages and the addition of new endpoints for types, templates, tags, spaces, properties, objects, search, members, and list management.

Reviewed Changes

Copilot reviewed 79 out of 79 changed files in this pull request and generated no comments.

Show a summary per file
File Description
core/api/internal/list/model.go Removed legacy list model definitions.
core/api/internal/list/handler.go Removed legacy list handlers.
core/api/internal/export/model.go and handler.go Removed legacy export endpoints.
core/api/internal/auth/model.go and handler.go Removed legacy authentication endpoints.
core/api/handler/*.go (type.go, template.go, tag.go, space.go, search.go, property.go, object.go, member.go, list.go, auth.go) Introduced new endpoints with updated Swagger annotations and restructured API handlers.
core/api/core/mock_apicore/mock_ClientCommands.go Updated mocks to support the new object type, relation, and option endpoint methods.
core/api/core/core.go Updated the interface to include new methods for object types, relations, and tag options.

Copy link
github-actions bot commented May 5, 2025
Testomat.io Report 🔴 SMOKE-TEST FAILED
Tests ✔️ 19 tests run
Summary 🔴 17 failed; 🟢 2 passed; 🟡 0 skipped
Duration 🕐 23 minutes, 55 seconds
Testomat.io Report 📊 Run #88937538
Job 🗂️ Smoke Tests / smoke-test
Operating System 🖥️ Linux X64

✅ Passed Tests (2)

  • Revoking an invite link (51 seconds) Passed on retry: 2
  • Sync on staging nodes (1 minute, 19 seconds)

🟥 Failures (17)

🔴 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:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523: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 (141652.43ms)
And the user 1 is using client 1 (0.75ms)
And the user creates a new account on "staging" (1828.81ms)
And the account is synced within 60 seconds (62080.52ms)
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: 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:588:17) at processTimers (node:internal/timers:523:7)

################[ Steps ]################
Given the server "default" 1 is running (3389.12ms)
And the user 1 is using client 1 (0.34ms)
And the user creates a new account on "staging" (1794.47ms)
And the account is synced within 60 seconds (44200.57ms)
Given the user creates an object 1 in the account (8.81ms)
And the user can open the object 1 (10009.33ms)
And the user has shared his space and generated an invite link (1319.89ms)
And the account is synced within 60 seconds (100.70ms)
And the server "default" 2 is running (3425.93ms)
And the user 2 is using client 2 (0.30ms)
And the user creates a new account on "staging" (1827.48ms)
And the user sends requests to join the space (5001.97ms)
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:588:17) at processTimers (node:internal/timers:523:7)

################[ Steps ]################
Given the server "default" 1 is running (3445.12ms)
And the user 1 is using client 1 (0.27ms)
And the user creates a new account on "staging" (1799.16ms)
And the account is synced within 60 seconds (44224.18ms)
Given the user creates an object 1 in the account (7.95ms)
And the user can open the object 1 (10008.53ms)
And the user has shared his space and generated an invite link (1398.40ms)
And the account is synced within 60 seconds (100.56ms)
And the server "default" 2 is running (3446.15ms)
And the user 2 is using client 2 (0.25ms)
And the user creates a new account on "staging" (1819.15ms)
And the user sends requests to join the space (5001.29ms)
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: 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:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523: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 (3444.83ms)
And the user 1 is using client 1 (0.25ms)
And the user creates a new account on "staging" (1835.67ms)
And the account is synced within 60 seconds (62021.92ms)
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)

🔴 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:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523: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 (3576.56ms)
And the user 1 is using client 1 (0.22ms)
And the user creates a new account on "staging" (1830.57ms)
And the account is synced within 60 seconds (62043.89ms)
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: 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:588:17) at processTimers (node:internal/timers:523:7)

################[ Steps ]################
Given the server "default" 1 is running (3603.14ms)
And the user 1 is using client 1 (0.23ms)
And the user creates a new account on "staging" (1809.52ms)
And the account is synced within 60 seconds (44214.77ms)
Given the user creates an object 1 in the account (8.49ms)
And the user can open the object 1 (10005.67ms)
And the user has shared his space and generated an invite link (1300.60ms)
And the account is synced within 60 seconds (100.58ms)
And the server "default" 2 is running (3480.04ms)
And the user 2 is using client 2 (0.23ms)
And the user creates a new account on "staging" (1830.81ms)
And the user sends requests to join the space (5001.03ms)
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:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523: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 (3541.00ms)
And the user 1 is using client 1 (0.25ms)
And the user creates a new account on "staging" (1825.30ms)
And the account is synced within 60 seconds (62114.58ms)
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: 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:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523: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 (3553.50ms)
And the user 1 is using client 1 (0.20ms)
And the user creates a new account on "staging" (1849.30ms)
And the account is synced within 60 seconds (62106.90ms)
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 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:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523: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 (3583.80ms)
And the user 1 is using client 1 (0.22ms)
And the user creates a new account on "staging" (1826.00ms)
And the account is synced within 60 seconds (62082.57ms)
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: 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:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523: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.02ms)
And the user 1 is using client 1 (0.26ms)
And the user creates a new account on "staging" (1835.72ms)
And the account is synced within 60 seconds (62105.93ms)
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 declines a 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:588:17) at processTimers (node:internal/timers:523:7)

################[ Steps ]################
Given the server "default" 1 is running (3578.86ms)
And the user 1 is using client 1 (0.14ms)
And the user creates a new account on "staging" (1846.91ms)
And the account is synced within 60 seconds (44227.58ms)
Given the user creates an object 1 in the account (7.88ms)
And the user can open the object 1 (10005.76ms)
And the user has shared his space and generated an invite link (1358.04ms)
And the account is synced within 60 seconds (99.93ms)
And the server "default" 2 is running (3575.45ms)
And the user 2 is using client 2 (0.24ms)
And the user creates a new account on "staging" (1832.79ms)
And the user sends requests to join the space (4999.86ms)
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:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523: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 (3490.80ms)
And the user 1 is using client 1 (0.22ms)
And the user creates a new account on "staging" (1856.16ms)
And the account is synced within 60 seconds (62116.94ms)
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:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523: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 (3669.13ms)
And the user 1 is using client 1 (0.18ms)
And the user creates a new account on "staging" (2053.24ms)
And the account is synced within 60 seconds (62028.13ms)
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:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523: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 (3587.18ms)
And the user 1 is using client 1 (0.22ms)
And the user creates a new account on "staging" (1891.69ms)
And the account is synced within 60 seconds (62052.90ms)
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:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523: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 (3568.72ms)
And the user 1 is using client 1 (0.19ms)
And the user creates a new account on "staging" (2025.12ms)
And the account is synced within 60 seconds (62102.94ms)
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:588:17) at processTimers (node:internal/timers:523:7) at Timeout. (/home/runner/work/anytype-heart/anytype-heart/support/api/services/utils.ts:231:11) at listOnTimeout (node:internal/timers:588:17) at processTimers (node:internal/timers:523: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 (3552.34ms)
And the user 1 is using client 1 (0.19ms)
And the user creates a new account on "staging" (1806.56ms)
And the account is synced within 60 seconds (62063.74ms)
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: 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:588:17) at processTimers (node:internal/timers:523:7)

################[ Steps ]################
Given the server "default" 1 is running (3577.19ms)
And the user 1 is using client 1 (0.18ms)
And the user creates a new account on "staging" (1851.01ms)
And the account is synced within 60 seconds (44171.38ms)
Given the user creates an object 1 in the account (9.32ms)
And the user can open the object 1 (10006.05ms)
And the user has shared his space and generated an invite link (1257.22ms)
And the account is synced within 60 seconds (100.62ms)
And the server "default" 2 is running (3600.68ms)
And the user 2 is using client 2 (0.22ms)
And the user creates a new account on "staging" (1883.33ms)
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 1 approves the leave request of user 2 (0.00ms)
And both accounts are deleted (0.00ms)
And both servers are stopped (0.00ms)

@deff7 deff7 changed the base branch from main to release-10-hotfix May 6, 2025 08:00
@jmetrikat jmetrikat merged commit ace65b9 into release-10-hotfix May 6, 2025
4 of 6 checks passed
@jmetrikat jmetrikat deleted the go-4969-rest-api-stage-2 branch May 6, 2025 18:18
@github-actions github-actions bot locked and limited conversation to collaborators May 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0