Factories > Factory configuration
Creating a factory from an existing definition
Create a factory from an existing definition in GitHub, GitLab, or Azure DevOps. The repository remains the source of truth for the factory's configuration.
If you already have a factory definition in a repository, you can create a factory from it instead of building one from scratch. For example, you might use a definition from warp-factory-examples or one stored in your team’s repository. Warp reads factory.yaml and worker definitions to create a factory linked to the repository. Merges to the linked branch update the factory.
The factory takes its name, description, alias, credential strategy, and repositories from factory.yaml. The repository that holds the definition is always one of the factory’s repositories, even if repositories doesn’t list it.
Prerequisites
Section titled “Prerequisites”- A Warp account and membership in a Warp team.
- Team or workspace admin access, or the team-wide factory Editor role.
- A paid Warp Factories plan. Definitions hosted in your own repository aren’t available on the free plan.
- Access to a GitHub, GitLab, or Azure DevOps repository containing a valid
factory.yaml. Validate the definition before linking it. - A top-level
aliasinfactory.yamlthat no other factory in your workspace uses. You can’t add it after the factory is created.
Creating the factory
Section titled “Creating the factory”Start from the Warp Factories web app sidebar. Linking an existing definition isn’t available during first-time onboarding.
- Open the Warp Factories web app. In the sidebar, click Create factory.
- Select Link an existing factory definition, then click Continue.
- Select GitHub, GitLab, or Azure DevOps, depending on where the definition is stored. If prompted, connect your account.
- Select the organization or group that contains the repository. For Azure DevOps, also select the project. Then select the repository containing
factory.yaml. - Enter the definition’s location:
- In “Factory folder,” enter the repository-relative folder containing
factory.yaml, such asfactories/payments. Leave this blank if the file is at the repository root. - In “Branch,” enter the branch containing the definition. Leave this blank to use the repository’s default branch. Merges to the selected branch update the factory.
- In “Factory folder,” enter the repository-relative folder containing
- Click Link and create factory.
Warp validates the definition, then creates the factory and syncs its worker definitions. The setup summary shows the sync’s progress. Confirm that the sync succeeds before connecting a source to send work to the factory.
If validation fails, Warp displays errors on the form without creating a factory. If the first sync fails, the factory exists, but its workers aren’t available until a sync succeeds. See Troubleshooting.
To update the factory later, edit the definition in its repository and merge to the linked branch. See Factory definition as code.
Troubleshooting
Section titled “Troubleshooting”No factory.yaml at the repository root. If it’s in a subfolder, enter that folder.
factory.yaml isn’t at the root of the repository. Enter the folder that contains it in “Factory folder”.
No factory.yaml in “FOLDER”.
The folder doesn’t exist on the selected branch, or it doesn’t contain factory.yaml. Check the folder path and the branch.
Branch “BRANCH” not found.
The branch doesn’t exist in the repository. Check the spelling, or leave “Branch” empty to use the default branch.
Can’t access OWNER/REPOSITORY. Check that Warp has access to it.
Warp can’t read the repository through the connected code host. Make sure the Warp app has access to the repository: see GitHub, GitLab, or Azure DevOps.
The factory definition has errors: …
factory.yaml or its worker files don’t pass validation. The message lists up to five problems with their file and line. Fix them in the repository, then try again. To find every problem at once, validate the definition locally.
factory.yaml must declare an alias; add a top-level alias to the definition, then try again
Add a top-level alias to factory.yaml on the branch you selected, then try again.
The alias in this definition is already used by another factory in your workspace.
Change alias in factory.yaml to a value no other factory in your workspace uses, then try again.
The first sync fails or doesn’t finish
The factory was created, but it has no workers until a sync succeeds. Check the repository contents, then click Try again on the setup summary to start a new sync.
Related pages
Section titled “Related pages”- Factory definition as code - Look up the fields
factory.yamlaccepts - Warp Factories quickstart - Create a factory from scratch instead
- Connect your factory - Route work from Slack, issue trackers, and code hosts to the new factory