Hello there and Merry Christmas,
I’m setting up a new side project and use the latest Tuist version 4.115.1 . I have an issue where the Github Action is stuck when running tuist test
Warning: CAS error: deadlineExceeded(connectionError: Optional(connect(descriptor:addr:size:): No such file or directory (errno: 2)))note: cache key query failed
If I set enableCaching: false, the test run and the selective testing works
GH Action Log:
Generating project OCFoundation
Generating project MyApp
There are no tests to run, finishing early
Uploading run metadata...
but I get the message basically telling me that I should set the property to true:
GH Action Log:
Run tuist setup cache
Tuist Cache setup is almost complete!
To enable caching for this project, set the enableCaching property in your Tuist.swift file to true:
enableCaching is exclusively for the Xcode Cache. You can use both the Xcode Cache and Module Cache simultaneously – or just one of these, depends on your preferences.
Warning: CAS error: deadlineExceeded(connectionError: Optional(connect(descriptor:addr:size:): No such file or directory (errno: 2)))note: cache key query failed
This is expected if set enableCaching: true without running tuist setup cache. The Xcode Cache needs to have a local socket running which is started as part of the setup command.
My Github Action yaml does have a tuist setup cache though.
I noticed this message on the CI though
Run tuist setup cache
Tuist Cache has been enabled 🎉
Uploading run metadata…
Failed to upload run metadata: forbidden("<my tuist handle> is not authorized to create run")
I would suggest to remove TUIST_TOKEN: ${{ secrets.TUIST_TOKEN }}. It doesn’t make sense to use an OIDC token (tuist auth login) and the token-based configuration.
I would suggest to remove TUIST_TOKEN: ${{ secrets.TUIST_TOKEN }}. It doesn’t make sense to use an OIDC token (tuist auth login) and the token-based configuration.
I did read that documentation and was initially using only OIDC but then I read the docs about Xcode Cache and understood that for Xcode cache, the TUIST_TOKEN has to be set
Additionally, you need to ensure the TUIST_TOKEN environment variable is set.
Btw, in the case enableCaching: false, isn’t this message a bit misleading? It seems like a misconfiguration message but from what you say, it’s only specific to the XC cache (so not needed when using Tuist Module cache)
tuist setup cache
Tuist Cache setup is almost complete!
To enable caching for this project, set the enableCaching property in your Tuist.swift file to true:
let tuist = Tuist(
fullHandle: "user/app",
project: .tuist(
generationOptions: .options(
enableCaching: true
)
)
)
The tuist setup cache is only mentioned in the Xcode Cache guide and we do mention it’s Xcode Cache only in the --help, although I suppose we could also be explicit in that message as well
tuist setup cache --help
OVERVIEW: Set up the Tuist Xcode cache
USAGE: tuist setup cache [--path <path>]