Flipbook → Roblox Internal Deployments
Problem
I’m not happy with the way changes get merged into the Roblox mirror. Flipbook should really just create a build artifact in the upstream repo that can be validated on the Roblox side and then deployed to Rotriever/Artifactory.
Current Deployment Flow
Update loop:
- CRON job runs daily on
Roblox/flipbook - Pull in upstream changes to
flipbook-labs/flipbook - Use the same tools to build FlipbookCore
- This step bundles up all of Flipbook’s package dependencies from Wally along with its source code to produce the final build artifact
- Flipbook uses Rokit, so we mirror each of the tools in Rokit to a foreman.toml. This is super brittle and has caused failures in the workflow a few times already
- Flatten the directory structure so only FlipbookCore remains, stripping out all other source code
- Implicitly bump the version in
rotriever.tomlso we always have something unique to publish, even when Flipbook hasn’t released anything on prod - Create a PR with the changes to be manually reviewed and merged
How deployments work now:
- Update loop PR manually merged
- Automatically deploy to Rotriever registry
- Manually update
rotriever.tomlin StudioPlugins to point to the new FlipbookCore version
flowchart LR
subgraph Public
direction TB
FlipbookRepo(["flipbook-labs/flipbook"])
FlipbookRepo --> ChangesMade["Changes get made to the community plugin like normal"]
end
subgraph Mirror
direction TB
FlipbookInternalRepo(["Roblox/flipbook"])
CronJob["CRON job runs every day"]
WorkflowDispatch["Manual workflow dispatch"]
PullUpstream["Pull in upstream changes from main branch of flipbook-labs/flipbook"]
Build["Build using the same tools, but mirrored to foreman.toml since Flipbook uses Rokit"]
LuauCompat["Rename .luau files to .lua to work with internal tooling"]
ImplicitlyBumpVersion["Implicitly bump version in rotriever.toml to create a new release"]
CreatePR["Create a PR to be manually reviewed"]
WaitForManualMerge(["Wait for PR to be merged"])
FlipbookInternalRepo --> CronJob & WorkflowDispatch --> PullUpstream --> Build --> LuauCompat
--> ImplicitlyBumpVersion --> CreatePR --> WaitForManualMerge
end
subgraph Plugins
direction TB
StudioPluginsRepo(["Roblox/StudioPlugins"])
ManualRotrieverUpdate["Manually update internal Flipbook's rotriever.toml to point to new FlipbookCore version"]
StudioPluginsRepo --> ManualRotrieverUpdate
end
Public --> Mirror --> Plugins
Proposed Deployment Flow
- We’re going to have the three groups but the goal is to simplify how much has to be done on the mirror. Ideally it just needs to verify the artifact from upstream and send it on its way to Artirfactory
- Look up later: is there a nice way to make the blocks different colors so I can show the new additions I’m proposing to
publicfor instance? i.e. “Changes get made […]” → “Builds a new Rotriever target” → “attests FlipbookCore package for verification on mirror” where everything after the first arrow could be green
flowchart LR
subgraph Public
direction TB
FlipbookRepo(["flipbook-labs/flipbook"])
FlipbookRepo --> ChangesMade["Changes get made to the community plugin like normal"]
ChangesMade --> BuildArtifacts["Build FlipbookCore artifact for Rotriever"]
BuildArtifacts --> UploadArtifact["Upload artifact to GitHub"]
UploadArtifact --> Attest["Provide a build attestation"]
end
subgraph Consumer
direction TB
FlipbookInternalRepo(["Roblox/flipbook"])
CronJob["CRON job runs every day"]
WorkflowDispatch["Manual workflow dispatch"]
PullArtifact["Download FlipbookCore artifact"]
ValidateArtifact["Validate that the artifact is trustworthy based on build attestation"]
RotrieverPublish["Publish to Rotriever registry"]
FlipbookInternalRepo --> CronJob & WorkflowDispatch --> PullArtifact --> ValidateArtifact --> RotrieverPublish
end
subgraph Plugins
direction TB
StudioPluginsRepo(["Roblox/StudioPlugins"])
ManualRotrieverUpdate["Manually update internal Flipbook's rotriever.toml to point to new FlipbookCore version"]
StudioPluginsRepo --> ManualRotrieverUpdate
end
Public --> Consumer --> Plugins
We will always need some layer in between to consume, vet, and deploy the public artifact. Which doesn’t necessarily have to be a mirror. Maybe this could be a LaaS project? Or a BEDEV2 service, but that feels heavy
References
- Artifact attestation
- https://roblox.atlassian.net/wiki/spaces/foundation/pages/3878912708/Flipbook+for+Builders#Consuming-Flipbook-through-Rotriever
- Publishing to Rotriever
- https://github.com/actions/attest-build-provenance
Todo
- Create a diagram of the current flow so I can get feedback (from EE? Security?) on best practices for consuming Flipbook
Questions to Ask Security/EE
- As the author of an upstream repo that we mirror, are there ways to make it safe enough that the upstream repo can handle all of the artifact building in such a way that we can verify as a consumer that it is safe?
- Is there a future where we wouldn’t need a mirror repo in between?
- We’ll always need some layer in between to consume, vet, and deploy the public artifact. Which doesn’t necessarily have to be a mirror. Maybe this could be a LaaS project? Or a BEDEV2 service but that feels heavy