Git-Backed EnvironmentsEnterprise
How a git-backed environment works in Credible (drafts in the app, each publish opened as a GitHub pull request, merge publishes the version), what changes in the environment, and how to request one
In a git-backed environment, every package is stored in a GitHub repository: its data models, dashboards, notebooks, data apps and agents. Changes are still made in drafts, and each publish opens a pull request, so every change is reviewed and versioned in Git.
The setting is labeled Git-backed modeling in the environment's settings. Credible sets up the repository on request, an organization admin enters it, and an organization or environment admin turns the setting on (see Request It). Without it, modelers build and publish straight from the app.
How It Works
- Drafts stay in Credible. A modeler works with the agent in the app as usual. The draft is saved in Credible, and nothing reaches Git until it is published. A draft that is never published leaves nothing in the repository.
- Publish opens a pull request. Publishing pushes the draft to a branch cut from the repository's base branch and opens a pull request whose title names what changed. Each publish is one commit, authored by the person who published.
- The pull request is checked. Credible compiles the change and posts the result on the pull request as the check
Credible / package checks. The agent also compiles on every edit, so most problems are caught while the draft is being written. - Merging publishes. When the pull request merges into the base branch, Credible publishes the package from the merge commit, and the new version records the commit it came from. A pull request an engineer opens from their own branch publishes the same way when it merges.
- The draft closes. After its publish succeeds, the draft closes, and the next change starts a new draft from the base branch.
In the app, the agent reports whether a publish is waiting on review, checks or a merge, and the version is published when the pull request merges.
Keeping Drafts Up to Date
When the base branch moves on, Credible brings open drafts up to date automatically. Changes that don't overlap are absorbed without asking anyone. When two changes touch the same lines, the agent reconciles them in the chat and says what it did.
Who Does What
- Analysts and domain experts ask for changes in plain language: a new metric, a corrected definition, a business rule. The agent makes the change in a draft, so they don't need to write Malloy or use Git.
- Reviewers read each change as a pull request, with the check result and the name of the person who asked for it, and approve or comment in GitHub.
- Engineers can also work in the repository directly: pull a branch, edit it in their own editor, push it, and open their own pull request.
What Changes in a Git-Backed Environment
- One repository per environment. Each package is a top-level directory in it.
- Text files go to Git. Binary files and large files are kept in Credible and carried into each new version. Symbolic links and submodules are refused.
- Uploads are refused for git-published packages. After a package has published from a merge,
cred publishand CI/CD uploads to it are refused, unless an environment admin turns on Allow direct uploads over git-published packages in the environment's settings. - Only git versions can be made latest. After a package has published from a merge, a version with no git commit behind it, such as one published before the environment was git-backed, can't be made latest, by hand or by auto-promote, unless Allow direct uploads over git-published packages is on. You can still roll back to any earlier version that git published.
- History is permanent. Each change records who it was made for, and history is not rewritten afterwards.
- Existing drafts keep working the way they were created.
Environments that are not git-backed are unaffected.
Request It
- Contact support or your account team with the organization and environment you want git-backed, and who should review pull requests on GitHub.
- Credible sets up the repository. Credible creates a private repository for the environment, registers it, and sends you its details.
- Turn it on. An organization admin opens the environment's settings (Manage environment) and enters the repository details. Then an organization or environment admin turns on Git-backed modeling and saves. From then on, publishing a draft in that environment opens a pull request.
Turning the setting on publishes every changed package on the base branch. Check that the base branch holds what you want served before you turn it on.
To require review before anything publishes, ask Credible to make the Credible / package checks check and an approving review required on the repository's base branch.
To keep a model's files in your own repository instead, build with your coding agent and publish from it, the Cred CLI or CI/CD. See Local Development.