
Git with branches and extensions
Bunch of work to enable great git work flows in the most complex deployments (like extension models), plus some conversation on future there.
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
Okay, I've got two things that I will do my best to keep quick. Um, one is actually arguably a bug fix, which I don't always demo bug fixes, but this one's fun because we kind of identified it uh about a little over a year ago, right before we went to Cabo last year. uh and has to do with model history and the draft uh publish workflow.
So uh you can see I've got this workbook model. I've added an age average um some modeling to it. Here's the history of that. If I jump in here and I go to edit that um that document, I'll go to uh the workbook layer for my draft document if I can. And uh I'm just going to go into the history of this.
This doesn't have history. Okay, I am gonna pretend this didn't happen and take a look at this after and jump over to my other demo. Um, bum bum. Okay, so here I've got a model extension. Uh, I'll create a new branch and create that branch. Now I've got uh my extension. I'll make some changes here. I'll just change this label.
Um, I'll go ahead and create a pull request. Right now in production extension models are not tracked in git but once this ships we'll see that we uh are now tracking extension models in git. You can see the naming convention. We make this extension model which is French is the name of this extension model. This is in my localize me demo uh model.
So um this is a sibling to the localize me model which is also in git and I do the separator with a dot um so you see that it's associated with its shared model and not with uh but it's distinct from the files won't get conflated in git. Um we can see like just for more fun we'll go in I'll jump up to the actual shared model which is the parent of that extension model and uh you know I can make another change in there.
We'll say you know change this label. Now I can actually update the PR um do. Okay, finished updating the PR. If I jump over here, you can see there's updates in the pull request. And uh both of those models are are tracked in the in the in this one pull request. both those model changes for the for this branch because as if you remember from last week we have isolated branches and combined branches or kind of grouped branches for extension models.
Uh and if I go ahead and merge this just to kind of close the loop. Um wait a second for the web hook to fire. And if I come back here u I'm just going to refresh. It should show that that branch was deleted because it's it's done. It merged the last version of the branch when the pull request fired.
No longer in a branch. You can see that my change to the shared model got applied. And I'm going to have to refresh this one too since it session still thinks it's in the branch. And you can see that I also applied this. So both um both the shared and the shared extension model branches got merged and the they're now tracked in git.
So um this is kind of the first step of getting extension models into git. The next thing will be um being able to kind of for the departmental use case of extension models track extension models independently. So the independent branches work that I showed last week being able to to put those into their own git repository so that like one department's allowed to see and modify um you know their department models in git uh and you know you can keep them all independent.
So uh making some progress towards having extension models backed in git. Nice. Um thanks this was super cool. Uh I just have a question. So, um, in the actual like git file structure, I was wondering if you could actually show us what like the extension looks like in Git and how it's actually like structured. Um, would be kind of curious how we're planning to like, uh, I guess like yeah, show that.
Yeah. And actually, that's a good point and I I I should have um should have shown this. So, if we go this is the git repository where I'm tracking these things. And um if we go into here, you can see that I've got the main model localized me um tracked here in was already here. And then like I say, sibling directories.
I have my Spanish extension. I have my French extension and my whatever. There's a bunch of extensions because I kind of polluted this model. Um, but they're all these directories are sort of siblings to the parent. They're identified there. Um, and then the other thing that's sort of worth noting uh about the way that we're tracking extension models in git is that um it doesn't actually come across super clearly here, but you know that in the IDE we have um combined mode and model only mode.
Uh, and so extension models are tracked just in in model only mode. So, so what you'll see in git when you're looking at an extension model is the same thing that you would see in the IDE if you went into extension only mode. And the idea behind that is that the extensions are sort of smaller shims that that we don't they it would be too messy if we were like and combine this with the shared model and the schema model which is what we do for the the basic shared model is in combined mode.
Um so that does that address your question there Jade? Yeah it does address my question there and also adds more but we can talk about later. Um, but kind of curious like is the structure something that like we can dictate cuz I think one of the things that I imagine a lot of the users who will be using this will want is sort of control over like how the git structure actually looks and so like right now we yeah like the file structure the directory structure itself um I mean we can talk about it to some extent right now I've made you know sort of an arbitrary decision about the the dot separator.
Um and and basically using the um you know the the however git is set up for the shared model in terms of what the the root name of the shared model is which then applies to all of the extension models. And you can customize the root the the folder name for the shared model or even its um its path like its full path in the in the um model uh in the git repository uh with the git setting of the model path.
So I can change just the name of it or if I want I could put a leading slash and I can change the full path to it and that would then apply to all of the extension models. But there's no way and I don't currently plan on having a way to um to customize like oh I want to make the extension model nested within the shared model because we do some stuff where we we kind of have some expectations that we know that the that the shared model directory maps like to knows kind of owns all of the the f the shared models fully contained and isolated within its within its directory.
Um and then also like the use case that we envision for these sort of grouped extension models is this dynamic extension uh where you're likely to have like an extension. I mean there is this localiz use case which I've used for demo purposes but but really the common use case is more like per uh embed entity which you know you could get into the thousands of those you've got some customizations that are specific to them and so managing their location in the git repository um for every single one of those feels ownorous and and so I mean obviously we and have a chat about it and talk about if there's a need to be able to to kind of do custom things about the git
configuration for the grouped extension models. But but currently no. They just defer to their shared parent for for the purpose of of figuring out their path etc.