Git, environments and protected instances
Nội dung này hiện chưa có sẵn bằng ngôn ngữ của bạn.
A project’s workflows can live in a Git repository. You build on a development instance, push, and a production instance pulls the same workflows, so every change to what runs on the line has an author, a message and a commit you can review. A production instance can be protected, so its workflows change no other way.
Connect a project
Section titled “Connect a project”On the Projects screen, open a project and use its Git card: the repository
address, the branch, a folder in the repository, and a login. Through the API
it is PUT /api/v1/projects/{project}/git, and through MCP connect_git.
- The address is
https://, with no login in it. HTTP works for a server on your own network. SSH addresses are refused. - The login is a credential of type Git repository login: a username and a token or password, sealed in the vault. A repository that needs no login takes none. The credential has to be in the project or shared into it.
- The branch defaults to
main, and a branch that doesn’t exist yet is made by the first push. The folder is where the project’s files go: empty is the top of the repository. - Every call goes through the egress policy, so a Git server on your plant
network has to be allowed by host name or address
(
HOTLOOP_CASCADE_EGRESS_ALLOW).
Connecting a project to a different repository or folder forgets what was in step with the old one.
What is in the repository
Section titled “What is in the repository”One file per workflow, in the folder: oven-setpoint--0197b2a4-....yaml, the
workflow’s name and its id. The file is the workflow as Cascade stores it. The
id is what makes it the same workflow on every instance, so a workflow pulled
into production keeps its id, and renaming it in the editor moves its file.
Credentials never go in the repository, and neither do variables, runs or who
is a member of the project: they differ between environments, and a workflow
refers to a credential by the slot it fills.
A hand written file works too. Name it anything--<a new uuid>.yaml, or just
<uuid>.yaml, and the next pull makes it a workflow.
Status, push, and pull
Section titled “Status, push, and pull”GET .../git/status (git_status) puts each workflow beside the repository:
| State | Meaning |
|---|---|
| in sync | Same on both sides. |
| only here | Never pushed. |
| only in the repository | Never pulled. |
| changed here | Changed here since the last sync; push it. |
| changed in the repository | Changed there since the last sync; pull it. |
| changed on both sides | A conflict. |
| different, never synced | On both sides, different, and never in step. |
| deleted in the repository, deleted here | Gone on one side since the last sync. |
Push (POST .../git/push, git_push) writes every workflow that isn’t
already in the repository, commits them as the person who pushed, with the
message they gave, and pushes. A workflow deleted here has its file removed.
Pushing again with nothing changed makes no commit. A workflow someone changed
in the repository since the last sync is left alone and reported, because
pushing it would erase their change: pull first, or push with force to make
this instance win.
Pull (POST .../git/pull, git_pull) makes the project match the
repository. New files become workflows, turned off until someone turns them on.
Files that changed become new versions, in the workflow’s history, with the
version it replaced. Nothing is lost on the way: a workflow changed here and
not pushed is kept, a conflict is reported and left alone unless force says
the repository wins, and a workflow deleted in the repository is deleted here
only when you pass prune. A new version of an active workflow that wouldn’t
run is refused and reported instead of being put in place.
Each answer lists every workflow with what was done to it: created, updated, deleted, pushed, removed, kept, or refused with the reason.
Pushing and pulling need to edit workflows in the project (pulling needs to
create them, and prune to delete them). Status needs to read them.
Connecting and disconnecting need project.update. The audit log records
git.connected, git.pushed, git.pulled and git.disconnected.
Environments
Section titled “Environments”An instance has a name for what it is, like development or production,
shown in a badge at the top of every screen. Set it on the Settings page, or
with HOTLOOP_CASCADE_ENVIRONMENT (the chart’s environment value), which
wins and can’t be changed from the editor.
The way to run environments is one repository and one branch per promotion path: the development instance pushes to a branch, the change is reviewed and merged in Git by whatever process you already have, and the production instance pulls the branch it follows. Different environments have their own credentials, variables and projects, because those are not in the repository.
Protected instances
Section titled “Protected instances”A protected instance refuses to have its workflows changed by hand. Creating, saving, restoring and deleting a workflow are refused in the editor, the API and MCP, with a message that says why, and the editor stops offering them. The instance still pulls from Git, because that is how its workflows change, and it does not push to it. Everything that differs between environments stays open: credentials, variables, running workflows and reading runs, and turning a workflow on or off.
Turn it on from the Settings page (an owner or admin), or set
HOTLOOP_CASCADE_PROTECTED=true (the chart’s protected value). The
deployment’s value is the instance’s own: no setting, route or tool can turn it
off.