
Pull requests and Git
More development on pull requests and git in Omni
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
OK. That's it. OK. So you've seen this before when Stephen was demonstrating the basics of uh get integration. So we'll just go through the settings again. Emm. Oho. You will need to log in quickly. Yes, I think that's exactly what's happening. Yes, that's ...uh, I'm going to add a link. So , let's see. This will take us back.
My God . Try again . Uh, this is my Git repository. Oh, that looks better. So, the Git repository has been created, the repository deployment key has been added, and the pull request webhook has been configured. So, this part is new. And, uh, we'll quickly go through this setup. So, I need to add a deployment key. Make sure we give it the correct access.
And then we're also going to add a webhook in my repository setup. We will add a webhook. Uh, I just copied the URL from there. And since I'm working locally, I actually need to... I run through ngrok to open my localhost. So, I need to change this so I can connect to my localhost. But , you know, in a publicly available instance, the URL provided will be correct from the start.
We also generate a secret that we use to authorize webhook requests. It is stored encrypted, uh, on our server and is only displayed on the settings page. So, we need to choose which event we want, uh , wait. These are push events. What webhook do I need? Where is he? Send me everything. Let me pick out a specific person.
This is what I wanted. Uh, we go down and select the pull request event. And this will trigger every time something happens to the pull request. So now we've added, uh , this. So, we've got everything set up here, and we just need to click the Verify Sync button. This will, uh , update the Git repository with the master branch titled shared or the current shared version.
So now we're all connected to Git. We don't need this anymore . Now I'm coming here. I'll just refresh the page so it knows that it's, um, Git is connected and I can go in and make changes to the shared model. And it doesn't actually let me commit or save changes directly to the shared model. So I actually need to create a branch.
Oh, branches cannot contain spaces. Are branches required when you are in this mode? Yes. Uh, we're...we're going to be working on something, you know, where we can specify whether pull requests are needed. And if pull requests are not needed, then we should be able to work in a different thread. And probably when we do that, it will be a kind of permission to make changes to the shared model without having to revise it.
And then the pull request would essentially just be a backup at this point? Or as an assessment of major changes? Yeah, I mean, that's pretty much how you think about it. What we store in get is not exactly a merged YAML, i.e. not separate models. Theoretically we can go back to the Omni model from this, but it's not like that at first ...I wouldn't think of it as a backup, but I think we'll probably get to that point.
Yes, and go ahead. Branches are simply needed in the IDE. They are not needed when advancing from the book. It's about creating a fixation. Because you can't just force the user to commit every save. Hmm, you need to write a commit message. So you need to somehow merge your changes to make a commit. And now it's a branch.
Got it. Does this mean that this branch will absorb all recent, for example, book promotions? No. Or book promotions can go straight to sharing. You just need to write a commit message until we create this other... Oh, you also need to write a commit message for the promotion. Good. Yes. Yes. I...And as Stephen says, until we create this other, you know, setting that will be mandatory for pull requests.
In that case, yes, we will push people through the branches to create their pull requests. So, I, you know, created a new branch. My edits are not saved there. I click "Save". We probably want to automatically save them. So, now I'm here. I have changes to my branch model that are not shared. And I come here, create a request to remove changes.
Um, this loads GitHub. Hooray for demos. Um, I'm creating my pull request. And this step actually triggered the webhook request. Um, which we can pass to webhooks if we want . And if I go to this, uh, this webhook, I might have to click Edit. I can go to the latest deliveries and we can actually see the "oh-oh".
Well, that's not good. Seriously? It all worked. Okay, Paul. We can try, but I think my demo is shot at this point. Why is that? And the user wouldn't necessarily need to actually go to that page, right, Connor? I was just trying to show you what happens. OK. And this event was supposed to set, you know, the web merge request open in Omni, and then if the merge request merges, it should also send a webhook that gets picked up, but I guess the demo gods were against me today.
I would ask the same question as Ariel, but I'm not sure. Uh , the idea is that all these merge request reviews and things like that will be on GitHub, or some of that will be... Yeah. Good. Is there a world where we could store all of this in an app in the distant future? So, GitHub just stays silent behind the scenes unless you really want to be there?
Uh, I mean, actually...I guess there's a world, but what we were really trying to achieve was to get all the rich, uh, merge request features that you get from GitHub without having to implement them yourself. Okay, that's fair . I don't even think about feature rich. I'm just thinking about something like a radical change, press Enter, but maybe it's not, I do n't know.
My point is that when I 'm in an application where this happens, like in Looker and DBT, I find it very pointless to jump on GitHub to do something if it's just to review changes, for example. It's not a high priority issue because people obviously like it, but it is . I would like to keep trivial things in the app if possible, just from an ergonomics perspective.
Yes, that makes sense. I mean, I think for that you should probably be in that mode where withdrawal requests are not needed. Yes, both this and this could be the answer. It's just that if you 're in a situation where a pull request is mandatory and you have to click nine times to merge a label change with a typo, for example, these are the kinds of workflows that just say, "Why am I doing this?
Can't I just press Enter in the app?" Yes, we often encounter this in our DBT workflow today. Yeah, so I mean, for this, theoretically, you could...you could say, "Um, we could add a 'merge this merge request' button in Omni and run the merge." And that...that would just mean that, well, you don't have to set up protected branches, or someone has to go and approve this merge request.
If that makes sense. Yes, that's absolutely correct . For example, if we decide we don't care about the richness of that review experience, etc., and it's much more about speed . Obviously you have to make sure the permissions part is correct, but that would just be an inversion, right? Instead of waiting for GitHub merge, we would trigger GitHub merge and we just need permission to do so, but otherwise it's just a UX issue.
Is that accurate? Excuse me, one more time? As for the scope of work, if we decided that the goal wasn't to have a cross-functional pull request review experience, then it would just be, " Hey, if anyone wants something fast and complex, they can contact you, do what you just described." That is, click the " Merge Now" button if they have permission to do so.
As for the plumbing, it wouldn't be a huge lift because we already have all the ducts in place, and it might even be easier because we don't have to wait for a webhook. Yeah, I mean, I think so, but I don't know what value you'd get from linking to your model. I mean : Yes, yes, yes. It would be more logical to just have a button.
For example, I am an administrator, ignore the save directly to share setting. It wouldn't be necessary to build all this junk just like that: I'm Colin, I move fast, buddy. I mean, it's literally like how I write documentation, which is n't always right, but I always just compress everything for merging. I guess I'll go and protest it in production.
Again , we don't understand that the reason people want this is because they mostly don't . When you're fixing a typo or something like that, having to go through nine clicks to merge is annoying, if not the most important thing. I want to clarify this. It's just a quality of life thing that I think people would benefit from under certain circumstances.
Yes, and that's fair. And that would be what we would open as a permission to bypass that workflow. And everything would continue to work. We would still get a record of this change in your master branch because we see the value " True". So you still get that history log there. And theoretically we can move to a world where we actually use what we can recover from what we have stored in Git.
But it's a little funny because we then have to split it into different layers of the model, right? Because we are showing a shared YAML. This is definitely not the most important thing. It's just one of those things that has always annoyed me. And I think another example here, just to emphasize, is that you don't need to pull the master branch when you do this, because you always have it sitting there; this is another great feature that abstracts away things in Git that I personally don't want to deal with because I never find myself in one of those extreme divergences.
Absolutely. And we have things set up that I didn't show where we know the state of your branch if it's dirty, and we have a mechanism for updating, you know, pulling changes from the master branch that might have been merged through another merge request. So, all of this is already there, and we will have to work on the UX, but I think we are already close to the goal.
I'll, um, take a screenshot of the demo once I figure out what went wrong, fix it, and pass it on to you. My demo.