Skip to content
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

chore: create default user for devcontainer #5917

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

EYHN
Copy link
Member

@EYHN EYHN commented Feb 26, 2024

Type

enhancement


Description

  • Added a command to .devcontainer/build.sh to create a default user (affine) in the database for development purposes.
  • Introduced error handling in .devcontainer/setup-user.sh to ensure the script stops on the first error.
  • Modified the git fetch command in .devcontainer/setup-user.sh to fetch the canary branch from origin with a depth of 1, optimizing the setup process.

Changes walkthrough

Relevant files
Enhancement
build.sh
Add Default User Creation to Dev Container Build Script   

.devcontainer/build.sh

  • Added command to create a default user with username and password
    'affine'.
  • Ensured database push command is followed by a newline.
  • +4/-1     
    setup-user.sh
    Enhance User Setup Script with Error Handling and Specific Git Fetch

    .devcontainer/setup-user.sh

  • Introduced error handling with 'set -e' to stop on first error.
  • Modified 'git fetch' to specifically fetch 'canary' branch from
    'origin' with depth of 1.
  • +3/-1     

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link
    Member Author

    EYHN commented Feb 26, 2024

    Current dependencies on/for this PR:

    This stack of pull requests is managed by Graphite.

    Copy link

    nx-cloud bot commented Feb 26, 2024

    Copy link

    codecov bot commented Feb 26, 2024

    Codecov Report

    All modified and coverable lines are covered by tests ✅

    Project coverage is 64.31%. Comparing base (2295685) to head (0dabb08).

    Additional details and impacted files
    @@           Coverage Diff           @@
    ##           canary    #5917   +/-   ##
    =======================================
      Coverage   64.31%   64.31%           
    =======================================
      Files         360      360           
      Lines       19969    19969           
      Branches     1705     1705           
    =======================================
      Hits        12844    12844           
      Misses       6904     6904           
      Partials      221      221           
    Flag Coverage Δ
    server-test 71.20% <ø> (ø)
    unittest 45.10% <ø> (ø)

    Flags with carried forward coverage won't be shown. Click here to find out more.

    ☔ View full report in Codecov by Sentry.
    📢 Have feedback on the report? Share it here.

    Copy link

    graphite-app bot commented Feb 26, 2024

    Your org has enabled the Graphite merge queue for merging into canary

    You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

    You can enable merging using labels in your Graphite merge queue settings.

    Copy link

    PR-Agent was enabled for this repository. To use it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback

    Action: Publish Storybook

    Failed stage: Run chromaui/action-next@v1 [❌]

    Failure summary:

    The action failed due to issues encountered during the Storybook build process. Key points include:

  • Multiple packages required for the build, such as @affine/component and @blocksuite/inline, were not
    found, as indicated by warnings about missing package.json files.
  • The final error was a "non-zero exit code" from the Storybook build command, suggesting that the
    build script encountered errors that prevented successful completion.
  • The recommendation to manually run the build command and verify the output suggests that the failure
    is related to the Storybook configuration or dependencies, rather than the CI environment itself.

  • Relevant error logs:
    1:  Job defined at: toeverything/AFFiNE/.github/workflows/publish-storybook.yml@refs/pull/5917/merge
    2:  Waiting for a runner to pick up this job...
    ...
    
    629:  �[94m➤�[39m �[90mYN0000�[39m: └ Completed
    630:  �[94m➤�[39m �[90mYN0000�[39m: ┌ Fetch step
    631:  ##[group]Fetch step
    632:  �[94m➤�[39m YN0013: │ �[38;5;220m3030�[39m packages were added to the project (�[38;5;160m+ 366.53 MiB�[39m).
    633:  ##[endgroup]
    634:  �[94m➤�[39m �[90mYN0000�[39m: └ Completed in 35s 648ms
    635:  �[94m➤�[39m �[90mYN0000�[39m: ┌ Link step
    636:  ##[group]Link step
    637:  �[94m➤�[39m YN0007: │ �[38;5;166m@affine/�[39m�[38;5;173mtemplates�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/templates�[39m must be built because it never has been before or the last one failed
    638:  �[94m➤�[39m YN0007: │ �[38;5;173melectron�[39m�[38;5;111m@�[39m�[38;5;111mnpm:29.0.1�[39m must be built because it never has been before or the last one failed
    639:  �[94m➤�[39m YN0007: │ �[38;5;173mmsw�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.2.1 [a367a]�[39m must be built because it never has been before or the last one failed
    640:  �[94m➤�[39m YN0007: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m must be built because it never has been before or the last one failed
    641:  �[94m➤�[39m YN0007: │ �[38;5;173mesbuild�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.19.12�[39m must be built because it never has been before or the last one failed
    642:  �[94m➤�[39m YN0007: │ �[38;5;166m@nestjs/�[39m�[38;5;173mcore�[39m�[38;5;111m@�[39m�[38;5;111mnpm:10.3.3 [c1224]�[39m must be built because it never has been before or the last one failed
    643:  �[94m➤�[39m YN0007: │ �[38;5;166m@prisma/�[39m�[38;5;173mengines�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2�[39m must be built because it never has been before or the last one failed
    644:  �[94m➤�[39m YN0007: │ �[38;5;166m@apollo/�[39m�[38;5;173mprotobufjs�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.2.7�[39m must be built because it never has been before or the last one failed
    645:  �[94m➤�[39m YN0007: │ �[38;5;173mprotobufjs�[39m�[38;5;111m@�[39m�[38;5;111mnpm:7.2.5�[39m must be built because it never has been before or the last one failed
    646:  �[94m➤�[39m YN0007: │ �[38;5;166m@swc/�[39m�[38;5;173mcore�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.4.2 [9a545]�[39m must be built because it never has been before or the last one failed
    647:  �[94m➤�[39m YN0007: │ �[38;5;173mesbuild�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.17.19�[39m must be built because it never has been before or the last one failed
    648:  �[94m➤�[39m YN0007: │ �[38;5;173mesbuild�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.20.1�[39m must be built because it never has been before or the last one failed
    649:  �[94m➤�[39m YN0007: │ �[38;5;173mesbuild�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.18.20�[39m must be built because it never has been before or the last one failed
    650:  �[94m➤�[39m YN0007: │ �[38;5;173mcore-js-pure�[39m�[38;5;111m@�[39m�[38;5;111mnpm:3.33.3�[39m must be built because it never has been before or the last one failed
    651:  �[94m➤�[39m YN0007: │ �[38;5;173melectron-winstaller�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.2.1�[39m must be built because it never has been before or the last one failed
    652:  �[94m➤�[39m YN0007: │ �[38;5;173mejs�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.7.4�[39m must be built because it never has been before or the last one failed
    653:  �[94m➤�[39m YN0007: │ �[38;5;173mworkerd�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.20240208.0�[39m must be built because it never has been before or the last one failed
    654:  �[94m➤�[39m YN0007: │ �[38;5;166m@sentry/�[39m�[38;5;173mcli�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.28.6�[39m must be built because it never has been before or the last one failed
    ...
    
    764:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m       globalAgent: [Agent],
    765:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m       Server: [Function: Server],
    766:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m       createServer: [Function: createServer],
    767:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m       get: [Function: get],
    768:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m       request: [Function: request]
    769:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m     }
    770:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m   }
    771:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m }
    772:  �[94m➤�[39m YN0007: │ �[38;5;166m@affine/�[39m�[38;5;173mmonorepo�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:.�[39m must be built because it never has been before or the last one failed
    773:  �[94m➤�[39m YN0007: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m must be built because it never has been before or the last one failed
    774:  �[94m➤�[39m YN0007: │ �[38;5;173mprisma�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2�[39m must be built because it never has been before or the last one failed
    ...
    
    786:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m [SUCCESS] Generate
    787:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m [SUCCESS] Generate to ./src/schema.ts
    788:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m [SUCCESS] Generate outputs
    789:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m Running lifecycle hook "afterStart" scripts...
    790:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m [CLI] Loading Schemas
    791:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m [CLI] Loading Documents
    792:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m [CLI] Generating output
    793:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mmonorepo�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:.�[39m �[31mSTDERR�[39m install command is deprecated
    794:  �[94m➤�[39m YN0007: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m must be built because it never has been before or the last one failed
    ...
    
    803:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +2ms
    804:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:get-platform The parsed libssl version is: 1.1.x +0ms
    805:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:loadEnv project root found at /home/runner/work/AFFiNE/AFFiNE/package.json +329ms
    806:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:tryLoadEnv Environment variables not found at null +9ms
    807:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:tryLoadEnv Environment variables not found at undefined +0ms
    808:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:tryLoadEnv No Environment variables loaded +0ms
    809:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m Prisma schema loaded from packages/backend/server/schema.prisma
    810:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getConfig Using getConfig Wasm +4ms
    811:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getConfig config data retrieved without errors in getConfig Wasm +17ms
    ...
    
    815:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m   "familyDistro": "debian",
    816:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m   "originalDistro": "ubuntu"
    817:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m } +1ms
    818:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +0ms
    819:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +2ms
    820:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:get-platform The parsed libssl version is: 1.1.x +0ms
    821:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:fetch-engine:download copying /home/runner/.cache/prisma/master/5a9203d0590c951969e85a7d07215503f4672eb9/debian-openssl-1.1.x/libquery-engine to /home/runner/work/AFFiNE/AFFiNE/packages/backend/server/node_modules/prisma/libquery_engine-debian-openssl-1.1.x.so.node +20ms
    822:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getConfig Using getConfig Wasm +37ms
    823:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getConfig config data retrieved without errors in getConfig Wasm +3ms
    824:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getDMMF Using getDmmf Wasm +0ms
    825:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getDMMF Using given datamodel +1ms
    826:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getDMMF dmmf data retrieved without errors in getDmmf Wasm +109ms
    ...
    
    886:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m 
    887:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m ┌─────────────────────────────────────────────────────────────┐
    888:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m │  Deploying your app to serverless or edge functions?        │
    889:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m │  Try Prisma Accelerate for connection pooling and caching.  │
    890:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m │  https://pris.ly/cli/accelerate                             │
    891:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m └─────────────────────────────────────────────────────────────┘
    892:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m 
    893:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:GeneratorProcess child exited with code null on signal SIGTERM +87ms
    894:  �[94m➤�[39m YN0007: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m must be built because it never has been before or the last one failed
    ...
    
    903:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +2ms
    904:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:get-platform The parsed libssl version is: 1.1.x +0ms
    905:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:loadEnv project root found at /home/runner/work/AFFiNE/AFFiNE/packages/backend/server/package.json +329ms
    906:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:tryLoadEnv Environment variables not found at null +8ms
    907:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:tryLoadEnv Environment variables not found at undefined +0ms
    908:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:tryLoadEnv No Environment variables loaded +0ms
    909:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m Prisma schema loaded from schema.prisma
    910:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getConfig Using getConfig Wasm +3ms
    911:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getConfig config data retrieved without errors in getConfig Wasm +20ms
    ...
    
    914:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m   "targetDistro": "debian",
    915:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m   "familyDistro": "debian",
    916:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m   "originalDistro": "ubuntu"
    917:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m } +2ms
    918:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +0ms
    919:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +2ms
    920:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:get-platform The parsed libssl version is: 1.1.x +0ms
    921:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getConfig Using getConfig Wasm +39ms
    922:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getConfig config data retrieved without errors in getConfig Wasm +3ms
    923:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getDMMF Using getDmmf Wasm +1ms
    924:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getDMMF Using given datamodel +0ms
    925:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getDMMF dmmf data retrieved without errors in getDmmf Wasm +102ms
    ...
    
    983:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m 
    984:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m ┌─────────────────────────────────────────────────────────────┐
    985:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m │  Deploying your app to serverless or edge functions?        │
    986:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m │  Try Prisma Accelerate for connection pooling and caching.  │
    987:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m │  https://pris.ly/cli/accelerate                             │
    988:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m └─────────────────────────────────────────────────────────────┘
    989:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m 
    990:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getConfig Using getConfig Wasm +9ms
    991:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getConfig config data retrieved without errors in getConfig Wasm +2ms
    ...
    
    1052:  → [               *    ]
    1053:  → [              *     ]
    1054:  → [             *      ]
    1055:  → [            *       ]
    1056:  → [           *        ]
    1057:  → [          *         ]
    1058:  → [         *          ]
    1059:  → [        *           ]
    1060:  The CLI tried to run your build script, but the command failed. This indicates a problem with your Storybook. Here's what to do:
    1061:  - Check the Storybook build log printed below.
    1062:  - Run npm run build or yarn build yourself and make sure it outputs a valid Storybook by opening the generated index.html in your browser.
    1063:  → Command failed: yarn run build --output-dir /tmp/chromatic--2423-I8Qr4meln6XU
    ...
    
    1080:  info => Building manager..
    1081:  WARN unable to find package.json for @affine/component
    1082:  WARN unable to find package.json for @blocksuite/inline
    1083:  info => Manager built (168 ms)
    1084:  info => Building preview..
    1085:  info => Copying static files: /home/runner/work/AFFiNE/AFFiNE/node_modules/@storybook/manager/static at /tmp/chromatic--2423-I8Qr4meln6XU/sb-common-assets
    1086:  info => Copying static files: /home/runner/work/AFFiNE/AFFiNE/packages/frontend/core/public at /tmp/chromatic--2423-I8Qr4meln6XU/
    1087:  ℹ Wrote Chromatic diagnostics report to chromatic-diagnostics.json
    1088:  ##[error]non-zero exit code
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.

    See more information about the checks tool in the docs.

    Copy link

    CI Failure Feedback

    Action: Publish UI Storybook

    Failed stage: Run chromaui/action-next@v1 [❌]

    Failure summary:

    The action failed due to a timeout during the execution of the build:storybook script. This
    indicates an issue with the Storybook setup, which could not complete its build process within the
    allocated time. To resolve this issue:

  • Check the Storybook build log for errors or warnings that might indicate what went wrong.
  • Manually run npm run build:storybook or yarn build:storybook to verify if the Storybook builds
    successfully and to inspect the output for issues.
  • Consult the Storybook CLI options documentation for potential configuration issues or necessary
    adjustments.

  • Relevant error logs:
    1:  Job defined at: toeverything/AFFiNE/.github/workflows/publish-ui-storybook.yml@refs/pull/5917/merge
    2:  Waiting for a runner to pick up this job...
    ...
    
    629:  �[94m➤�[39m �[90mYN0000�[39m: └ Completed
    630:  �[94m➤�[39m �[90mYN0000�[39m: ┌ Fetch step
    631:  ##[group]Fetch step
    632:  �[94m➤�[39m YN0013: │ �[38;5;220m3030�[39m packages were added to the project (�[38;5;160m+ 366.53 MiB�[39m).
    633:  ##[endgroup]
    634:  �[94m➤�[39m �[90mYN0000�[39m: └ Completed in 35s 885ms
    635:  �[94m➤�[39m �[90mYN0000�[39m: ┌ Link step
    636:  ##[group]Link step
    637:  �[94m➤�[39m YN0007: │ �[38;5;166m@affine/�[39m�[38;5;173mtemplates�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/templates�[39m must be built because it never has been before or the last one failed
    638:  �[94m➤�[39m YN0007: │ �[38;5;173melectron�[39m�[38;5;111m@�[39m�[38;5;111mnpm:29.0.1�[39m must be built because it never has been before or the last one failed
    639:  �[94m➤�[39m YN0007: │ �[38;5;173mmsw�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.2.1 [a367a]�[39m must be built because it never has been before or the last one failed
    640:  �[94m➤�[39m YN0007: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m must be built because it never has been before or the last one failed
    641:  �[94m➤�[39m YN0007: │ �[38;5;173mesbuild�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.19.12�[39m must be built because it never has been before or the last one failed
    642:  �[94m➤�[39m YN0007: │ �[38;5;166m@nestjs/�[39m�[38;5;173mcore�[39m�[38;5;111m@�[39m�[38;5;111mnpm:10.3.3 [c1224]�[39m must be built because it never has been before or the last one failed
    643:  �[94m➤�[39m YN0007: │ �[38;5;166m@prisma/�[39m�[38;5;173mengines�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2�[39m must be built because it never has been before or the last one failed
    644:  �[94m➤�[39m YN0007: │ �[38;5;166m@apollo/�[39m�[38;5;173mprotobufjs�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.2.7�[39m must be built because it never has been before or the last one failed
    645:  �[94m➤�[39m YN0007: │ �[38;5;173mprotobufjs�[39m�[38;5;111m@�[39m�[38;5;111mnpm:7.2.5�[39m must be built because it never has been before or the last one failed
    646:  �[94m➤�[39m YN0007: │ �[38;5;166m@swc/�[39m�[38;5;173mcore�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.4.2 [9a545]�[39m must be built because it never has been before or the last one failed
    647:  �[94m➤�[39m YN0007: │ �[38;5;173mesbuild�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.17.19�[39m must be built because it never has been before or the last one failed
    648:  �[94m➤�[39m YN0007: │ �[38;5;173mesbuild�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.20.1�[39m must be built because it never has been before or the last one failed
    649:  �[94m➤�[39m YN0007: │ �[38;5;173mesbuild�[39m�[38;5;111m@�[39m�[38;5;111mnpm:0.18.20�[39m must be built because it never has been before or the last one failed
    650:  �[94m➤�[39m YN0007: │ �[38;5;173mcore-js-pure�[39m�[38;5;111m@�[39m�[38;5;111mnpm:3.33.3�[39m must be built because it never has been before or the last one failed
    651:  �[94m➤�[39m YN0007: │ �[38;5;173melectron-winstaller�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.2.1�[39m must be built because it never has been before or the last one failed
    652:  �[94m➤�[39m YN0007: │ �[38;5;173mejs�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.7.4�[39m must be built because it never has been before or the last one failed
    653:  �[94m➤�[39m YN0007: │ �[38;5;173mworkerd�[39m�[38;5;111m@�[39m�[38;5;111mnpm:1.20240208.0�[39m must be built because it never has been before or the last one failed
    654:  �[94m➤�[39m YN0007: │ �[38;5;166m@sentry/�[39m�[38;5;173mcli�[39m�[38;5;111m@�[39m�[38;5;111mnpm:2.28.6�[39m must be built because it never has been before or the last one failed
    ...
    
    764:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m       globalAgent: [Agent],
    765:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m       Server: [Function: Server],
    766:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m       createServer: [Function: createServer],
    767:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m       get: [Function: get],
    768:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m       request: [Function: request]
    769:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m     }
    770:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m   }
    771:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;173mnx�[39m�[38;5;111m@�[39m�[38;5;111mnpm:18.0.4 [a367a]�[39m �[31mSTDERR�[39m }
    772:  �[94m➤�[39m YN0007: │ �[38;5;166m@affine/�[39m�[38;5;173mmonorepo�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:.�[39m must be built because it never has been before or the last one failed
    773:  �[94m➤�[39m YN0007: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m must be built because it never has been before or the last one failed
    774:  �[94m➤�[39m YN0007: │ �[38;5;173mprisma�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2�[39m must be built because it never has been before or the last one failed
    ...
    
    786:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m [SUCCESS] Generate
    787:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m [SUCCESS] Generate to ./src/schema.ts
    788:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m [SUCCESS] Generate outputs
    789:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m Running lifecycle hook "afterStart" scripts...
    790:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m [CLI] Loading Schemas
    791:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m [CLI] Loading Documents
    792:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mgraphql�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/frontend/graphql�[39m �[32mSTDOUT�[39m [CLI] Generating output
    793:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mmonorepo�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:.�[39m �[31mSTDERR�[39m install command is deprecated
    794:  �[94m➤�[39m YN0007: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m must be built because it never has been before or the last one failed
    ...
    
    803:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +1ms
    804:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:get-platform The parsed libssl version is: 1.1.x +0ms
    805:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:loadEnv project root found at /home/runner/work/AFFiNE/AFFiNE/package.json +346ms
    806:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:tryLoadEnv Environment variables not found at null +8ms
    807:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:tryLoadEnv Environment variables not found at undefined +0ms
    808:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:tryLoadEnv No Environment variables loaded +0ms
    809:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m Prisma schema loaded from packages/backend/server/schema.prisma
    810:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getConfig Using getConfig Wasm +4ms
    811:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getConfig config data retrieved without errors in getConfig Wasm +18ms
    ...
    
    815:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m   "familyDistro": "debian",
    816:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m   "originalDistro": "ubuntu"
    817:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m } +2ms
    818:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +0ms
    819:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +2ms
    820:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:get-platform The parsed libssl version is: 1.1.x +0ms
    821:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:fetch-engine:download copying /home/runner/.cache/prisma/master/5a9203d0590c951969e85a7d07215503f4672eb9/debian-openssl-1.1.x/libquery-engine to /home/runner/work/AFFiNE/AFFiNE/packages/backend/server/node_modules/prisma/libquery_engine-debian-openssl-1.1.x.so.node +22ms
    822:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getConfig Using getConfig Wasm +38ms
    823:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getConfig config data retrieved without errors in getConfig Wasm +3ms
    824:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getDMMF Using getDmmf Wasm +1ms
    825:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getDMMF Using given datamodel +0ms
    826:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:getDMMF dmmf data retrieved without errors in getDmmf Wasm +105ms
    ...
    
    886:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m 
    887:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m ┌─────────────────────────────────────────────────────────────┐
    888:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m │  Deploying your app to serverless or edge functions?        │
    889:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m │  Try Prisma Accelerate for connection pooling and caching.  │
    890:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m │  https://pris.ly/cli/accelerate                             │
    891:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m └─────────────────────────────────────────────────────────────┘
    892:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[32mSTDOUT�[39m 
    893:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@prisma/�[39m�[38;5;173mclient�[39m�[38;5;111m@�[39m�[38;5;111mnpm:5.10.2 [c1224]�[39m �[31mSTDERR�[39m prisma:GeneratorProcess child exited with code null on signal SIGTERM +85ms
    894:  �[94m➤�[39m YN0007: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m must be built because it never has been before or the last one failed
    ...
    
    903:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +2ms
    904:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:get-platform The parsed libssl version is: 1.1.x +0ms
    905:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:loadEnv project root found at /home/runner/work/AFFiNE/AFFiNE/packages/backend/server/package.json +336ms
    906:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:tryLoadEnv Environment variables not found at null +8ms
    907:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:tryLoadEnv Environment variables not found at undefined +0ms
    908:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:tryLoadEnv No Environment variables loaded +0ms
    909:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m Prisma schema loaded from schema.prisma
    910:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getConfig Using getConfig Wasm +3ms
    911:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getConfig config data retrieved without errors in getConfig Wasm +15ms
    ...
    
    914:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m   "targetDistro": "debian",
    915:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m   "familyDistro": "debian",
    916:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m   "originalDistro": "ubuntu"
    917:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m } +2ms
    918:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:get-platform Trying platform-specific paths for "debian" (and "ubuntu") +0ms
    919:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:get-platform Found libssl.so file using platform-specific paths: libssl.so.1.1 +2ms
    920:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:get-platform The parsed libssl version is: 1.1.x +1ms
    921:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getConfig Using getConfig Wasm +38ms
    922:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getConfig config data retrieved without errors in getConfig Wasm +4ms
    923:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getDMMF Using getDmmf Wasm +0ms
    924:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getDMMF Using given datamodel +1ms
    925:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getDMMF dmmf data retrieved without errors in getDmmf Wasm +111ms
    ...
    
    983:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m 
    984:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m ┌─────────────────────────────────────────────────────────────┐
    985:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m │  Deploying your app to serverless or edge functions?        │
    986:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m │  Try Prisma Accelerate for connection pooling and caching.  │
    987:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m │  https://pris.ly/cli/accelerate                             │
    988:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m └─────────────────────────────────────────────────────────────┘
    989:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[32mSTDOUT�[39m 
    990:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getConfig Using getConfig Wasm +9ms
    991:  �[94m➤�[39m �[90mYN0000�[39m: │ �[38;5;166m@affine/�[39m�[38;5;173mserver�[39m�[38;5;111m@�[39m�[38;5;111mworkspace:packages/backend/server�[39m �[31mSTDERR�[39m prisma:getConfig config data retrieved without errors in getConfig Wasm +2ms
    ...
    
    1052:  → [               *    ]
    1053:  → [              *     ]
    1054:  → [             *      ]
    1055:  → [            *       ]
    1056:  → [           *        ]
    1057:  → [          *         ]
    1058:  → [         *          ]
    1059:  → [        *           ]
    1060:  The CLI tried to run your build:storybook script, but the command failed. This indicates a problem with your Storybook. Here's what to do:
    1061:  - Check the Storybook build log printed below.
    1062:  - Run npm run build:storybook or yarn build:storybook yourself and make sure it outputs a valid Storybook by opening the generated index.html in your browser.
    1063:  - Review the build-storybook CLI options at https://storybook.js.org/docs/configurations/cli-options/#for-build-storybook
    1064:  Operation timed out
    1065:  → Command failed: yarn run build:storybook --output-dir /tmp/chromatic--2544-mwrxieGmqh5n
    ...
    
    1082:  WARN https://storybook.js.org/docs/react/writing-docs/mdx#lack-of-github-flavored-markdown-gfm
    1083:  WARN 
    1084:  WARN Once you've made the necessary changes, you can remove the addon from your package.json and storybook config.
    1085:  info => Building manager..
    1086:  info => Manager built (169 ms)
    1087:  info => Building preview..
    1088:  info => Copying static files: /home/runner/work/AFFiNE/AFFiNE/node_modules/@storybook/manager/static at /tmp/chromatic--2544-mwrxieGmqh5n/sb-common-assets
    1089:  ℹ Wrote Chromatic diagnostics report to chromatic-diagnostics.json
    1090:  ##[error]non-zero exit code
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.

    See more information about the checks tool in the docs.

    @EYHN EYHN marked this pull request as ready for review February 26, 2024 16:48
    Copy link

    PR-Agent was enabled for this repository. To use it, please link your git user with your CodiumAI identity here.

    PR Description updated to latest commit (de296a6)

    Copy link

    PR-Agent was enabled for this repository. To use it, please link your git user with your CodiumAI identity here.

    PR Review

    ⏱️ Estimated effort to review [1-5]

    2, because the changes are straightforward and localized to development container scripts. The modifications include adding a default user creation command and enhancing error handling and git fetch strategy in setup scripts. These changes are not complex and should be relatively easy to review for someone familiar with shell scripting and the project's development environment setup.

    🧪 Relevant tests

    No

    🔍 Possible issues

    The hardcoded user creation command in .devcontainer/build.sh might not work if the database schema changes in the future. It's recommended to ensure this script is updated in tandem with schema changes or consider a more dynamic way of handling default user creation.

    The use of set -e in .devcontainer/setup-user.sh is good for stopping the script on errors, but it might mask issues if subsequent commands depend on the successful completion of previous ones. Ensure that all commands in the script are idempotent and can handle partial failures gracefully.

    🔒 Security concerns

    No


    ✨ Review tool usage guide:

    Overview:
    The review tool scans the PR code changes, and generates a PR review. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
    When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:

    /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
    

    With a configuration file, use the following template:

    [pr_reviewer]
    some_config1=...
    some_config2=...
    
    Utilizing extra instructions

    The review tool can be configured with extra instructions, which can be used to guide the model to a feedback tailored to the needs of your project.

    Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify the relevant sub-tool, and the relevant aspects of the PR that you want to emphasize.

    Examples for extra instructions:

    [pr_reviewer] # /review #
    extra_instructions="""
    In the 'possible issues' section, emphasize the following:
    - Does the code logic cover relevant edge cases?
    - Is the code logic clear and easy to understand?
    - Is the code logic efficient?
    ...
    """
    

    Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable.

    How to enable\disable automation
    • When you first install PR-Agent app, the default mode for the review tool is:
    pr_commands = ["/review", ...]
    

    meaning the review tool will run automatically on every PR, with the default configuration.
    Edit this field to enable/disable the tool, or to change the used configurations

    Auto-labels

    The review tool can auto-generate two specific types of labels for a PR:

    • a possible security issue label, that detects possible security issues (enable_review_labels_security flag)
    • a Review effort [1-5]: x label, where x is the estimated effort to review the PR (enable_review_labels_effort flag)
    Extra sub-tools

    The review tool provides a collection of possible feedbacks about a PR.
    It is recommended to review the possible options, and choose the ones relevant for your use case.
    Some of the feature that are disabled by default are quite useful, and should be considered for enabling. For example:
    require_score_review, require_soc2_ticket, and more.

    Auto-approve PRs

    By invoking:

    /review auto_approve
    

    The tool will automatically approve the PR, and add a comment with the approval.

    To ensure safety, the auto-approval feature is disabled by default. To enable auto-approval, you need to actively set in a pre-defined configuration file the following:

    [pr_reviewer]
    enable_auto_approval = true
    

    (this specific flag cannot be set with a command line argument, only in the configuration file, committed to the repository)

    You can also enable auto-approval only if the PR meets certain requirements, such as that the estimated_review_effort is equal or below a certain threshold, by adjusting the flag:

    [pr_reviewer]
    maximal_review_effort = 5
    
    More PR-Agent commands

    To invoke the PR-Agent, add a comment using one of the following commands:

    • /review: Request a review of your Pull Request.
    • /describe: Update the PR title and description based on the contents of the PR.
    • /improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
    • /ask <QUESTION>: Ask a question about the PR.
    • /update_changelog: Update the changelog based on the PR's contents.
    • /add_docs 💎: Generate docstring for new components introduced in the PR.
    • /generate_labels 💎: Generate labels for the PR based on the PR's contents.
    • /analyze 💎: Automatically analyzes the PR, and presents changes walkthrough for each component.

    See the tools guide for more details.
    To list the possible configuration parameters, add a /config comment.

    See the review usage page for a comprehensive guide on using this tool.

    Copy link

    codiumai-pr-agent-pro bot commented Feb 26, 2024

    PR Code Suggestions

    Suggestions                                                                                                                                                     
    security
    Improve security by avoiding hardcoding sensitive information.               

    Consider using a more secure method for inserting the default user into the database.
    Directly echoing the insert statement with a hardcoded password poses a security risk.
    Instead, use environment variables for sensitive information and ensure the password is
    hashed securely in the database.

    .devcontainer/build.sh [18]

    -echo "INSERT INTO \"users\"(\"id\",\"name\",\"email\",\"email_verified\",\"created_at\",\"password\") VALUES('99f3ad04-7c9b-441e-a6db-79f73aa64db9','affine','affine@affine.pro','2024-02-26 15:54:16.974','2024-02-26 15:54:16.974+00','\$argon2id\$v=19\$m=19456,t=2,p=1\$esDS3QCHRH0Kmeh87YPm5Q\$9S+jf+xzw2Hicj6nkWltvaaaXX3dQIxAFwCfFa9o38A');" | yarn workspace @affine/server prisma db execute --stdin
    +# Use environment variables and secure hashing mechanisms
     
    best practice
    Ensure script exits on command failure to prevent inconsistent states.       

    Ensure that the script exits immediately if the git fetch or git branch commands fail.
    This can be achieved by checking the exit status of these commands or setting the -e
    option at the beginning of the script.

    .devcontainer/setup-user.sh [7-8]

    +set -e
     git fetch origin canary:canary --depth=1
     git branch canary -t origin/canary
     

    ✨ Improve tool usage guide:

    Overview:
    The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.
    When commenting, to edit configurations related to the improve tool (pr_code_suggestions section), use the following template:

    /improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
    

    With a configuration file, use the following template:

    [pr_code_suggestions]
    some_config1=...
    some_config2=...
    
    Enabling\disabling automation

    When you first install the app, the default mode for the improve tool is:

    pr_commands = ["/improve --pr_code_suggestions.summarize=true", ...]
    

    meaning the improve tool will run automatically on every PR, with summarization enabled. Delete this line to disable the tool from running automatically.

    Utilizing extra instructions

    Extra instructions are very important for the improve tool, since they enable to guide the model to suggestions that are more relevant to the specific needs of the project.

    Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify relevant aspects that you want the model to focus on.

    Examples for extra instructions:

    [pr_code_suggestions] # /improve #
    extra_instructions="""
    Emphasize the following aspects:
    - Does the code logic cover relevant edge cases?
    - Is the code logic clear and easy to understand?
    - Is the code logic efficient?
    ...
    """
    

    Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable.

    A note on code suggestions quality
    • While the current AI for code is getting better and better (GPT-4), it's not flawless. Not all the suggestions will be perfect, and a user should not accept all of them automatically.
    • Suggestions are not meant to be simplistic. Instead, they aim to give deep feedback and raise questions, ideas and thoughts to the user, who can then use his judgment, experience, and understanding of the code base.
    • Recommended to use the 'extra_instructions' field to guide the model to suggestions that are more relevant to the specific needs of the project, or use the custom suggestions 💎 tool
    • With large PRs, best quality will be obtained by using 'improve --extended' mode.
    More PR-Agent commands

    To invoke the PR-Agent, add a comment using one of the following commands:

    • /review: Request a review of your Pull Request.
    • /describe: Update the PR title and description based on the contents of the PR.
    • /improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
    • /ask <QUESTION>: Ask a question about the PR.
    • /update_changelog: Update the changelog based on the PR's contents.
    • /add_docs 💎: Generate docstring for new components introduced in the PR.
    • /generate_labels 💎: Generate labels for the PR based on the PR's contents.
    • /analyze 💎: Automatically analyzes the PR, and presents changes walkthrough for each component.

    See the tools guide for more details.
    To list the possible configuration parameters, add a /config comment.

    See the improve usage page for a more comprehensive guide on using this tool.

    @forehalo
    Copy link
    Member

    You could do it this way:

    async onApplicationBootstrap() {
      if (this.config.node.dev) {
        await this.signUp('Dev User', 'dev@affine.pro', 'dev').catch(() => {
          // ignore
        });
      }
    }

    Copy link

    graphite-app bot commented Feb 27, 2024

    Merge activity

    ## **Type**
    enhancement
    
    ___
    
    ## **Description**
    - Added a command to `.devcontainer/build.sh` to create a default user (`affine`) in the database for development purposes.
    - Introduced error handling in `.devcontainer/setup-user.sh` to ensure the script stops on the first error.
    - Modified the git fetch command in `.devcontainer/setup-user.sh` to fetch the `canary` branch from `origin` with a depth of 1, optimizing the setup process.
    
    ___
    
    ## **Changes walkthrough**
    <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement
    </strong></td><td><table>
    <tr>
      <td>
        <details>
          <summary><strong>build.sh</strong><dd><code>Add Default User Creation to Dev Container Build Script</code>&nbsp; &nbsp; </dd></summary>
    <hr>
    
    .devcontainer/build.sh
    
    <li>Added command to create a default user with username and password <br>'affine'.<br> <li> Ensured database push command is followed by a newline.<br>
    
    </details>
    
      </td>
      <td><a href="https://pull/5917/files#diff-165b66803397b501866b23a0532418e9ad3eb2ab642274f9679383c76d18136f">+4/-1</a>&nbsp; &nbsp; &nbsp; </td>
    
    </tr>
    
    <tr>
      <td>
        <details>
          <summary><strong>setup-user.sh</strong><dd><code>Enhance User Setup Script with Error Handling and Specific Git Fetch</code></dd></summary>
    <hr>
    
    .devcontainer/setup-user.sh
    
    <li>Introduced error handling with 'set -e' to stop on first error.<br> <li> Modified 'git fetch' to specifically fetch 'canary' branch from <br>'origin' with depth of 1.<br>
    
    </details>
    
      </td>
      <td><a href="https://pull/5917/files#diff-8c5e76719e2ff0a3bf2b59d108dc9cf88bdae00c317728454cfa5108f2fc76af">+3/-1</a>&nbsp; &nbsp; &nbsp; </td>
    
    </tr>
    </table></td></tr></tr></tbody></table>
    
    ___
    
    > ✨ **PR-Agent usage**:
    >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions
    @graphite-app graphite-app bot merged commit 0dabb08 into canary Feb 27, 2024
    34 of 36 checks passed
    @graphite-app graphite-app bot deleted the eyhn/chore/default-uesr branch February 27, 2024 03:42
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    None yet

    3 participants