docs(git-integration): clarify one-way model, repo types, and sync_with_git - #10035
docs(git-integration): clarify one-way model, repo types, and sync_with_git#10035iddocohen wants to merge 1 commit into
Conversation
…th_git The overview described the read-write Repository type as "full bidirectional integration" with data flowing back to Git. That is inaccurate and contradicted the page's own ff-only merge statement, and it is a frequent customer misconception. Add a two-planes mental model, a sync_with_git subsection, and a common misconceptions section. All new claims verified against backend code (core/branch/models.py, git/tasks.py, git/repository.py, core/merge/branch_merger.py).
36cc9c8 to
3151921
Compare
There was a problem hiding this comment.
2 issues found and verified against the latest diff
Confidence score: 4/5
- In
docs/docs/git-integration/overview.mdx, the write-back behavior is currently described as if every Proposed Change merge updates Git, but branches withsync_with_gitdisabled stay graph-only; this can mislead operators into expecting commits that never occur and cause workflow confusion—update the wording to explicitly gate Git write-back on the source branch’ssync_with_gitstate. - In
docs/docs/git-integration/overview.mdx, terminology for Infrahub features is inconsistently cased ("transformations"/"generators"), which risks style-guide drift and inconsistent docs voice—capitalize these feature names to matchAGENTS.mdguidelines.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/docs/git-integration/overview.mdx">
<violation number="1" location="docs/docs/git-integration/overview.mdx:7">
P3: The Infrahub style guide requires capitalizing "Transformations" and "Generators" when referring to these features (see AGENTS.md → Style Guidelines → Infrahub Terminology). In the new introductory text and the "Two version-control planes" section, both terms appear lowercase, which is inconsistent with the guide and with how they are styled in the rest of the docs (e.g., `connect-repository.mdx` uses "Transformations, Generators").</violation>
<violation number="2" location="docs/docs/git-integration/overview.mdx:35">
P2: A read-write repository does not update Git on every Proposed Change merge: branches with `sync_with_git` disabled remain graph-only. These statements should condition the write-back behavior on the source branch's `sync_with_git` value so the overview does not contradict its own branch-control section.</violation>
</file>
Shadow auto-approve: would not auto-approve because issues were found.
Re-trigger cubic
| ### Repository: read-write integration | ||
|
|
||
| The standard **Repository** type provides comprehensive, bidirectional integration between Infrahub and Git. This design choice fulfills the need for truly unified version control across infrastructure data and code. | ||
| The standard **Repository** type gives Infrahub read-write access to Git. Infrahub imports code from every branch automatically, and on a Proposed Change merge it updates the repository's default branch in Git. |
There was a problem hiding this comment.
P2: A read-write repository does not update Git on every Proposed Change merge: branches with sync_with_git disabled remain graph-only. These statements should condition the write-back behavior on the source branch's sync_with_git value so the overview does not contradict its own branch-control section.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/docs/git-integration/overview.mdx, line 35:
<comment>A read-write repository does not update Git on every Proposed Change merge: branches with `sync_with_git` disabled remain graph-only. These statements should condition the write-back behavior on the source branch's `sync_with_git` value so the overview does not contradict its own branch-control section.</comment>
<file context>
@@ -23,15 +30,15 @@ Modern infrastructure management requires both structured data (network configur
+### Repository: read-write integration
-The standard **Repository** type provides comprehensive, bidirectional integration between Infrahub and Git. This design choice fulfills the need for truly unified version control across infrastructure data and code.
+The standard **Repository** type gives Infrahub read-write access to Git. Infrahub imports code from every branch automatically, and on a Proposed Change merge it updates the repository's default branch in Git.
**Design principles:**
</file context>
| import ReferenceLink from "../../src/components/Card"; | ||
|
|
||
| Git Integration in Infrahub connects your data layer to external Git repositories, letting you store and version-control the code that drives Infrahub — transformations, generators, checks, and other automation resources — alongside your infrastructure data. This page covers the underlying concepts; specific tasks like [connecting a repository](./connect-repository.mdx), [configuring `.infrahub.yml`](./infrahub-yml.mdx), and [filtering which branches sync](./branch-synchronization.mdx) live in the pages below. | ||
| Connect an external Git repository to keep the code that drives Infrahub — schemas, transformations, generators, checks, GraphQL queries, and artifact definitions — under version control, next to your infrastructure data. Infrahub imports that code and keeps it in sync as the repository changes. |
There was a problem hiding this comment.
P3: The Infrahub style guide requires capitalizing "Transformations" and "Generators" when referring to these features (see AGENTS.md → Style Guidelines → Infrahub Terminology). In the new introductory text and the "Two version-control planes" section, both terms appear lowercase, which is inconsistent with the guide and with how they are styled in the rest of the docs (e.g., connect-repository.mdx uses "Transformations, Generators").
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/docs/git-integration/overview.mdx, line 7:
<comment>The Infrahub style guide requires capitalizing "Transformations" and "Generators" when referring to these features (see AGENTS.md → Style Guidelines → Infrahub Terminology). In the new introductory text and the "Two version-control planes" section, both terms appear lowercase, which is inconsistent with the guide and with how they are styled in the rest of the docs (e.g., `connect-repository.mdx` uses "Transformations, Generators").</comment>
<file context>
@@ -4,11 +4,18 @@ title: Git Integration
import ReferenceLink from "../../src/components/Card";
-Git Integration in Infrahub connects your data layer to external Git repositories, letting you store and version-control the code that drives Infrahub — transformations, generators, checks, and other automation resources — alongside your infrastructure data. This page covers the underlying concepts; specific tasks like [connecting a repository](./connect-repository.mdx), [configuring `.infrahub.yml`](./infrahub-yml.mdx), and [filtering which branches sync](./branch-synchronization.mdx) live in the pages below.
+Connect an external Git repository to keep the code that drives Infrahub — schemas, transformations, generators, checks, GraphQL queries, and artifact definitions — under version control, next to your infrastructure data. Infrahub imports that code and keeps it in sync as the repository changes.
-## Understanding Git repositories in Infrahub
</file context>
| Connect an external Git repository to keep the code that drives Infrahub — schemas, transformations, generators, checks, GraphQL queries, and artifact definitions — under version control, next to your infrastructure data. Infrahub imports that code and keeps it in sync as the repository changes. | |
| Connect an external Git repository to keep the code that drives Infrahub — schemas, Transformations, Generators, checks, GraphQL queries, and artifact definitions — under version control, next to your infrastructure data. Infrahub imports that code and keeps it in sync as the repository changes. |
Summary
Correct and expand the Git Integration overview so it matches how the integration actually behaves. The page previously described the read-write Repository type as "full bidirectional integration" with data flowing "from Infrahub back to Git" — this is inaccurate (and contradicted the page's own ff-only merge statement), and it is the single most common customer misconception hit in the field (Sony, Link11, and others).
Use case: smaller update / feature improvement (no structural change).
Content changes (all in
git-integration/overview.mdx)refchange or Import latest commit.sync_with_gitflag and the common misreading of its name.What needs reviewer attention
New prose to read carefully (the rest is small edits to existing lines):
core/branch/models.py,git/tasks.py:696(merge_git_repository),git/repository.py:271(merge+ push).sync_with_gitsubsection. Matches the field description incore/branch/models.py:40-42and the PC-merge gate incore/merge/branch_merger.py:286.ic-clarify-sync-with-git-label(changelog +9883).What didn't change
~60spoll interval from field notes was intentionally not added — it isn't sourced from code, and the page already hedges ("multiple times per minute").Out of scope (deferred, not touched)
Verification
markdownlint-cli2(repo.markdownlint-cli2.yaml): 0 issues.simple/easy/just): none in new content.cd docs && npm run buildnot run locally — docs deps not installed in this checkout; relying on CI for the render check.