-
Notifications
You must be signed in to change notification settings - Fork 4
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
Dev -> Main: Prep for CI/CD roles refactor #138
Conversation
Are we sure this is the best way to pull in these changes? Look at the network: ![]() dev is just one commit ahead of main, yet this PR proposes merging 11 commits into main. Could we potentially rebase dev on the left-most commit in the network above, drop duplicated commits (giving preference to the commits in main), drop unnecessary merge commits, and force push this new, clean, and linear commit history to dev? The only side effect I can see is that by giving preference to the commits in main, the drop-unused-resources branch will need to be fixed, which shouldn't be too difficult. @jaymedina thoughts? |
* Create proxy admin database role * Grant proxy admin role ownership of *ALL_ADMIN roles * Transfer ownership of current and future internamespace objects * address PR comments * bump version to avoid conflict * grant execute managed task privilege to proxy admin
It's not as pretty in the network diagram as I had hoped, but I can break down what's happening: ![]()
Go ahead and do a diff between dev and clean-dev. They are identical! Since there are some redundant commits from main which we didn't use, we can force push clean-dev (minus its HEAD commit) to main. You can verify yourself that the commit 890f1ac, which is the commit before HEAD in clean-dev, is identical to main. Fortunately, there are no feature branches split from these redundant commits, so there's nothing to fix afterwards. Then we can force push the HEAD of clean-dev to dev. The order doesn't actually matter, but fixing main (as the upstream branch) before dev (the downstream branch) feels right. |
@philerooski thanks for the clear explanation. I'm not very clear about when to use clean-dev. Just wanted to double check that I understand the situation. So basically, clean-dev is one commit ahead of main (Create proxy admin database role) and dev is two commit ahead of main (Create proxy admin database role + Tom's change). You would like to merge changes before "Create proxy admin database role" in clean-dev to main. Then, treat dev as the newest source of truth for changes need to be merged? |
@danlu1 The clean-dev branch is just for demonstration purposes. It's literally a "clean" version of the dev branch if we were to merge the commit histories of dev and main. The idea is that rather than including every commit in dev and main in some "merged" version of dev and main (imagine combining the main line in the diagram below with the dev line, even though we know many of those commits are duplicates/redundant) we create a cleaner commit history by picking all the unique / non-redundant commits and overwriting the commit history of both dev and main with this clean history. ![]() This is what I did with clean-dev. I picked out the unique commits and discarded the redundant commits. |
@philerooski gotcha. Then I think this makes sense to me. |
@philerooski I love the breakdown with your diagrams, thanks very much for spending time on this!
Yes, in the network, that would be b215f57 and 86117a6, correct? Indeed these are redundant to 508a82e and can be removed.
Right, so by doing this, we are matching up 5144fbf (from main) and 890f1ac (from clean-dev) Just to be sure, once you've force-pushed the HEAD of clean-dev to dev, you will then rebase dev onto main so that these changes can take effect, correct? Just want to make sure this gets through the finish line so I can start validating it. Other than that, all this makes sense to me and I agree with Dan, please move forward with this plan! |
It's even simpler than a rebase. We are force pushing a.k.a overwriting and wholesale replacing the commit history of dev with the commit history of clean-dev. Afterwards, there's a few things we need to do so that our feature branches branch off from this new commit history:
|
OK that sounds good, let me know when it's time for me to do step 1. But I think I need to reword my question because I'm not sure this answers it: At what point in the branch cleanup does 115f5ba end up in |
Once I force push to main. I'll let you know once I've cleaned up. |
|
Push dev into main