
Git Integration Proof of Concept
A proof of concept for a friendlier Git integration flow that stops Omni from auto-reverting commits on invalid YAML or unpulled changes, instead surfacing clear validation feedback and…
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
OK. Um, let me share the screen. Do you see my Chrome? OK. So, I've been working on ideas for the next iteration of our Git integration and trying to fix some of the current issues. So I'm going to show you a concept I've been working on of what I think this process should look like. These are changes to the current functionality.
This concept focuses on two problems: if you are working in Git and create a commit with invalid YAML, Omni will see it and will not be able to accept it. So it will simply make its own commit on top of yours, which will undo your last commit. Similarly, if you make a commit in Git and Omni has changes that you have n't pulled yet, it will do the same.
It will see this and simply make a commit that will undo everything you just did. This is the first problem: Omni automatically undoes actions you've already performed in Git, which isn't ideal. Another problem is that there is no proper visibility into why this happened or what to do about it. To see this, you need to go into the commit history and look for Omni generated commits marked "rejected" or something similar.
OK. These are the problems I mainly tried to solve. This is an example of a pull request on GitHub where I make changes to a model file . Let's say I go in here and change the name of the first day of the week. Let's say I want to make a change here. I proceed to edit the file, well , as usual.
Okay, I'll commit the changes. Um, now if you look at the pull request, give it a second, it will run the task . You will see this pending task, it will perform validation and publish the results here. So, you will see either a failed check or a successful check, which will give you some feedback about the changes you made.
Uh, and then will post a little update here on that. So you see, in this case the change was correct, the YAML was valid, we were able to save the change, and we did it. But there are validation errors. So you can expand this and see exactly what errors occurred, or follow the link back to Omni to make changes.
So, first—every time you make a commit, this task is run , the status is published, and then you get feedback here. Uh, if you went in and, say, committed some invalid YAML, it's like your brain went off for a second. So you have this, and it's just invalid. This would not be a legitimate Omni model. What's going to happen now—before this change, Omni simply saw that it couldn't keep it and immediately rejected it.
So he would push a commit over that commit to simply undo it. And then you had to deal with it and make your own changes. In this new process, we no longer do that. We leave your commits. We don't create new ones. But you may see an error in the form of a failed sync task. So you know what the system saw: you tried to save the model file, but the YAML was invalid.
Here is the error message. And then the check is simply skipped because there is nothing to do there. The idea here is to make the workflow more similar to a typical developer workflow. When you push changes, if your code doesn't compile, there's no process in GitHub that just discards all your changes, right? You can push partially completed work to GitHub and it won't block you or try to undo everything.
So the idea here is not to cancel, but to provide feedback on what went wrong and how to fix it. Uh, well , exactly, exactly. And so right now these changes—they're just proof of concept, these changes just issue warnings, so they don't block anything. But you can set it up so that they throw an error, and then ideally you should have branch protection rules enabled so that they block the merge and you wouldn't be able to merge if there were any critical errors.
Similarly, if you merge with the master branch, we will also have a task running there. And you will be able to see if the merge with the master branch was successfully reflected in Omni. That is, is it correct? Okay, now let's think about configuration, here's this example configuration file. It is currently not being read from here. We simply hard-coded the execution of these checks into the program.
But I was thinking about having some kind of Omni configuration file where you would set up your git configurations. Let's say some general checks that run automatically, and then you can override them for individual models— exactly which checks to run and what to do if they fail. So, if you want this to throw an error, you can configure branch protection to block the merge, which is exactly what we want people to do.
So the general idea is to have a common omniconfig file. You can list your universal configurations, and also create a section for individual models where you can override them. But it's also worth moving all of our git configurations into this configuration file. We now have a settings page for each model where you set these parameters. So if you want to change settings for all your models, like enabling git tracking, you'll have to go to each settings page and make the changes there.
Whereas here it's a centralized place where you see everything, even though there are a million switches, and they depend on each other to some extent. So, I think a cleaner approach, which again, I think, is more familiar to developers in terms of the workflow that we're used to. So the idea is that you'll have a configuration file where you set all the git-specific settings, checks, and everything else , and it'll all be here.
Um, finally, in the same vein as here, there are some more changes that I'll get to, but which I didn't even prepare for this proof of concept, but let's just say I'll reboot this. Good. Um, okay. So, if I want to submit changes from here. So one of the other problems that we have is kind of the other side of this "Omni ahead of Git" situation, which is that it's pretty easy to get into a situation where Omni is ahead of Git, because if you make changes here and save them, you have to remember to hit "Update PR " to actually push that change.
Um, so it's not hard to get into that kind of workflow where you forget to do it. Um, so the other thing I was thinking about is maybe you could make it an option to just select " save and submit," and then if you have it set up that way, it automatically sends those changes there. Ahem. Yes, there are some other things I'm thinking about, but, you know, for the future.
Um, but I wanted to at least give a general idea of what , at least I think we see it looking like. Um, and, you know, get feedback or something, if that's, you know, if anyone has any thoughts. Uh, that's all.