[Beta] Open Cloud Engine API for Executing Luau

I’m very interested in this as well! currently I have my own custom UI input logic and could be modified to handle fake interactions for testing purposes as well

cc @DevelopmentDeadline

My understanding is there is a fix for the debug.loadmoudle dependency in the upstream jest, but this has not been merged in the jsdotlua fork yet: Merge latest upstream changes by vocksel · Pull Request #16 · jsdotlua/jest-lua · GitHub

2 Likes

Would it be possible to enable FFlagEnableLoadModule on the runner so that debug.loadmodule works?

Sorry for the delay!

This is not currently planned, though my understanding is the latest version of Jest-Lua has merged in upstream Jest so now no longer has a dependency on loadmodule for module mocking.

I’ve made a GitHub action for running Luau from a file (and outputting the results to another)!

2 Likes

Hello everyone! Based on feedback, we’ve increased the task time limit from 30 seconds to 5 minutes.

7 Likes

My game has custom attacks and abilities that are based on the position of the character. Simulating physics is crucial for my game to detect when an attack lands. This new feature can help my team easily test abilities using through GitHub Actions, as it can raise a flag if something’s wrong. Even though players won’t be present during the execution, I can mock a player by using an NPC; but currently, I can’t properly mock physics.

1 Like

Thanks for sharing your use case for enabling physics!

If you get the time, I’d love to see some pseudo code of what one of these tests might look like. My DMs are open!

1 Like

Hello everyone! I’m happy to announce two new enhancements we’ve made: structured logs and custom timeouts.

We’re working on getting the documentation updated, but in the meantime you can follow the examples in the rest of this post to use the new features.

Structured Logs

Currently, when retrieving task logs, only the log messages are available. We’ve added a new option to retrieve structured logs that also include metadata, namely the timestamp as well as MessageType of the log entry.

To retrieve logs in the new format, add the URL parameter ?view=STRUCTURED. Here’s an example full URL: https://apis.roblox.com/cloud/v2/universes/6389275850/places/18863827952/versions/34/luau-execution-sessions/a3499fa8-645a-4856-b929-106dd1420b31/tasks/a3499fa8-645a-4856-b929-106dd1420b31/logs?view=STRUCTURED

The structured logs will be in a new field in the response, called structuredMessages. An example response is below:

{
  "luauExecutionSessionTaskLogs": [
    {
      "path": "universes/6389275850/places/18863827952/versions/34/luau-execution-sessions/a3499fa8-645a-4856-b929-106dd1420b31/tasks/a3499fa8-645a-4856-b929-106dd1420b31/logs/1",
      "messages": [],
      "structuredMessages": [
        {
          "message": "TestService: this action is invalid",
          "createTime": "2025-02-13T20:32:41.069Z",
          "messageType": "WARNING"
        }
      ]
    }
  ],
  "nextPageToken": ""
}

Note that using the STRUCTURED view is optional. To continue using the existing behavior, simply leave out the view parameter or set it to FLAT.

Custom Timeouts

You can now customize the task script timeout using a new parameter called timeout in the CreateLuauExecutionSessionTask API.

Here’s an example request body:

{"script": "wait(10)", "timeout": "1s"}

The above will cause the script to timeout after 1 second (instead of the default 5 minutes).

The timeout can be set to any value between 1 second and 300 seconds (5 minutes).

See the documentation for Duration for the formatting of the timeout value.

4 Likes