Skip to content
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

Improve workflow for updating slice subtree #3584

Open
pepone opened this issue Aug 8, 2023 · 5 comments
Open

Improve workflow for updating slice subtree #3584

pepone opened this issue Aug 8, 2023 · 5 comments
Milestone

Comments

@pepone
Copy link
Member

pepone commented Aug 8, 2023

          I was just talking with @bernardnormier and @InsertCreativityHere and we were wondering if we could do the following:
  1. If possible update the subtree action to check for a "subtree like commit message" if there are any files changed in slice/ in a commit. A PR can have multiple commits that change other files. Not sure how doable this is.
  2. The new recommendation would be to open a PR with two commits. The first commit for the subtree, then a second commit for the C# changes.
  3. We wouldn't squash merge this, just a regular rebase merge.

Originally posted by @externl in #3583 (comment)

@pepone
Copy link
Member Author

pepone commented Aug 8, 2023

If we want to keep the icerpc-slice history we just need to preserve the merge commit created by git subtree pull.

As long as we preserve the merge commits it should be fine,

Here the workflow action is too restrictive, to avoid accidentally squashing the changes (which is the default for our PRs) and screwing the slice history.

@externl
Copy link
Member

externl commented Aug 8, 2023

@pepone Some of our previous subtree commits have nice commit messages:

commit 4649f34ff16c14fdc05f34692ade4edac69de959
Merge: 311c23542 30382bdb6
Author: Jose <[email protected]>
Date:   Tue May 9 17:41:27 2023 +0200

    Add 'slice/' from commit '30382bdb64962d184be220f89259b23904f443a3'

    git-subtree-dir: slice
    git-subtree-mainline: 311c235426c182fdbd0633f451a79a1b2cc61d80
    git-subtree-split: 30382bdb64962d184be220f89259b23904f443a3

Our later ones seem to just look like regular run-of-the-mill merge commits.

commit 5f34dee316237630ea138b3887b4e6fa6b36d299
Merge: 334042401 a15d2136c
Author: Bernard Normier <[email protected]>
Date:   Tue Aug 8 11:44:36 2023 -0400

    Merge commit 'a15d2136c1696af85a3e46defcbd8099054486c4' into update-status-codes2

Any idea what the difference is here that causes different messages?

The first one is much more informative.

@pepone
Copy link
Member Author

pepone commented Aug 8, 2023

The first one is for git subtree add the others are for git subtree pull, seems git subtree pull doesn't add special metadata

@externl
Copy link
Member

externl commented Aug 8, 2023

Can we use add, seems to have much nicer messages?

@pepone
Copy link
Member Author

pepone commented Aug 8, 2023

Can we use add, seems to have much nicer messages?

No, you use add only to add the initial subtree, and then you just use pull to upgrade it.

@bernardnormier bernardnormier added this to the 0.2 milestone Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants