-
Notifications
You must be signed in to change notification settings - Fork 8
Closes #201: Branch cloning #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a bug here - if you do pull it does not pick up synced changes from the other branch. After noticing this I use the following test and ran into a error:
- create branch A
- create branch B
- in main create a new site "site-main"
- activate branch A
- sync branch A (so it picks up "nsite-main")
- create a device on branch A using "nsite-main"
- switch to Branch B
- Pull from Branch A
- Error.
I think there are other errors as when I created the device in A it auto-created some power ports from the device type I created, the error seems to be coming from those:
{
"log": [
"Pulling changes from branch aaa into bbb",
"Found 10 changes to pull",
"Applying change 16: tdevaaa created by ahanson using schema_branch_uardeem4",
"Creating device <DeserializedObject: dcim.Device(pk=107)>",
"Applying change 17: Input created by ahanson using schema_branch_uardeem4",
"Creating power port <DeserializedObject: dcim.PowerPort(pk=82)>",
"{'device': ['device instance with id 107 does not exist.']}"
]
}
The device I created (using demo data) was:
Name: tdevaaa
Role: Access Switch
Device type: AP7901
Site: nsite-main
Closes: #201
Implements the ability to pull changes from one branch into another by replaying the change records from the source branch onto the destination.
related_branch
ForeignKey onBranchEvent
modelpull()
method on the Branch model to effect the replaying of changespre_pull
&post_pull
signalspull_validators
configuration parameter