Skip to content

Commit

Permalink
Add section for proposed changes in the docs
Browse files Browse the repository at this point in the history
Fixes #1336
  • Loading branch information
ogenstad committed Nov 9, 2023
1 parent 7f98953 commit 8b0ecf9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ coverage.xml
*.env
script.py
.vscode/settings.json
.retype/*
node_modules/*
development/docker-compose.override.yml
development/docker-compose.dev-override.yml
Expand All @@ -15,6 +14,11 @@ development/docker-compose.dev-override.yml
.direnv/
.envrc

# Retype App
.retype/*
docs/.retype
retype.manifest

storage/*
.coverage.*
python_sdk/dist/*
18 changes: 18 additions & 0 deletions docs/knowledge-base/proposed-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
label: Proposed Change
layout: default
order: 150
---
A proposed change provides a way to review and discuss how two branches differ from each other and to merge a source branch into the target branch. For people with a development background, this will sound very familiar. It’s like a pull or merge request. The proposed change lets you compare two branches, run tests, and finally merge one branch into another.
## Discussions and issues as part of the review
A reviewer of the proposed change can open discussions and write comments, request changes. Once you resolve any requested change, the reviewer would approve the proposed change before they merge it.
## An alternative approach to diff
In a pull request in GitHub, the diff between two branches is a diff seen from a plain text point of view. A proposed change in Infrahub allows you to see changes in data, as well as the type of diff you’d see in Git. By combining the two, someone reviewing a proposed change in Infrahub can view the diff between [artifacts](artifact) on each branch.
With this feature, you can create a new branch, change a node attribute in the database, and see how your modifications impact the rendered artifacts. It includes a diff view to see exactly how a configuration might change if the proposed change were to be accepted and merged.

## Continuous Integration - CI
Just like you’d expect for a GitHub pull request, you can run checks on a proposed change during the review process and before merging. Infrahub will run data integrity checks between the proposed change branches. Besides this, Infrahub reports any merge conflicts for connected Git repositories.
Infrahub handles custom checks with code through Git repositories. These Checks let you verify the integrity of the database using your custom business logic. A check of this type could be anything you can imagine. An example could be to ensure that at least one router on each site is in an operational status as opposed to being in maintenance mode.

## Conflict resolution
Infrahub will prevent merging a proposed change if there is a data conflict between the branches. An example of such a conflict could be if someone were to update the same attribute of an object in both branches. In order to merge a proposed change that has conflicts, they need to be resolved. To resolve conflicts, you need to review data integrity checks and choose which branch to keep in the change checks section.

0 comments on commit 8b0ecf9

Please sign in to comment.