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

Sync Version 1.4.0 rc to main #498

Closed

Conversation

chrispsommers
Copy link
Collaborator

Sync version-1.4.0-rc to main prior to making more changes to tie up loose ends. Splitting closed #496 into separate "sync" and "update changelog" PRs.

duskmoon314 and others added 6 commits June 6, 2024 18:30
Add 'Otherwise' to clarify how `id` and `index` are used in wildcard
read of counter and meter.

Close p4lang#478
* Add all changes from PR#473

* Add generated files.

* Remove redundant paragraph.

* Add note about how changing MeterConfig is a non-breaking change.
Signed-off-by: Dscano <[email protected]>
Signed-off-by: Davide Scano <[email protected]>
@smolkaj
Copy link
Member

smolkaj commented Sep 3, 2024

Instead of merging/squashing, I wonder if we should we be rebasing instead?
I'm a bit worried about potentially losing history otherwise?

@chrispsommers
Copy link
Collaborator Author

Thanks for bringing this up. In hindsight, I think we should omit the squashing and preserve the same commits as main.
What benefit would rebasing have?

@chrispsommers
Copy link
Collaborator Author

Also, arggghh: Look slike I inherited 4 missing signoffs:
https://github.com/p4lang/p4runtime/pull/498/checks?check_run_id=29638974713

@smolkaj
Copy link
Member

smolkaj commented Sep 4, 2024

Rebasing does exactly that -- preserve all the commits from main without change.

It also puts your extra commits on top and gets rid of the merge commit, so less noise in the history.

And of course, that means you don't inherit things like missing sign offs :)

But it does mean you may have to deal with some merge conflicts when rebasing.

chrispsommers and others added 2 commits September 4, 2024 14:37
* Added missing "Added/deprecated in v1.4.0" comments per convention.

* Added missing "Added/deprecated in v1.4.0" comments per convention.

* Refresh generated go files.

Signed-off-by: chris <[email protected]>
@chrispsommers
Copy link
Collaborator Author

@smolkaj I rebased and force-pushed, check out the commits and see if it satisfies. Thanks for the idea. I also did commit --amend -s to fix one missing signoff of my own, but there are four remaining, see checks. What do you think the best way to handle this is? There are caveats about rewriting history which I'm unsure about.

@chrispsommers
Copy link
Collaborator Author

@smolkaj @jafingerhut Any suggestions how to resolve the unsigned commits? Conventional wisdom is to rebase -s but also warns about force-pushing public commits. Shall I just go ahead and back-sign those commits anyway?

@antoninbas
Copy link
Member

@chrispsommers you shouldn't force push to a branch that's not in your own repo (fork) usually. The unsigned commits predate the addition of the DCO check to this repo AFAIK. These 4 commits were also not authored by you, so you should not be signing them anyway. This is also mentioned in the DCO help page:

You should only do this if:

  • You are the only author of the commits in this branch
  • You are absolutely certain nobody else is doing any work based upon this branch

The best thing to do is to ignore the DCO check here. The check should only apply to new contributions, it is not relevant to previous contributions that you are cherry-picking / merging into another branch.

@chrispsommers
Copy link
Collaborator Author

@antoninbas Thanks for jumping in! I am working from a forked branch in my repo, so any forcing would be done on that branch.

Assuming I follow your advice and ignore the DCO check, should I be able to merge into version-1.4.0-rc w/o problems?

@jafingerhut
Copy link
Contributor

I am not certain, but the DCO settings on this repo might be still "DCO optional", meaning that people with the right permissions can merge PRs that fail the DCO checks anyway if they wish. Some p4lang repos (maybe only p4c right now?) are "DCO mandatory", and do not permit that.

If this repo is still in "DCO optional", I'd say go for forcing the merge regardless of DCO failures for now, but plan ahead for a few months from now that you might want to try getting all PRs passing the DCO check, in case you want to do branching/merging stuff that would be blocked by failing DCO checks.

@fruffy
Copy link
Contributor

fruffy commented Sep 11, 2024

As maintainer you should also see a little escape hatch :)

image

@smolkaj
Copy link
Member

smolkaj commented Sep 11, 2024

Sorry for leading you astray here, Chris. I'm not used to this "fork of a fork of main" workflow, I guess rebase + force push is not recommended in that case. If we're okay with making an exception this time around, you should be able to do

git push -f origin version-1.4.0-rc

but of course that bypasses the review process.

(I double checked that force push to the main branch is disabled, so at least there should be no danger of accidentally corrupting main.)

What is the typical review process in this "fork of a fork of main" model? Do people review once when things get merged into the feature branch, and then again when the feature branch gets merged into main?
(This is probably a stupid question, but since we don't use this workflow at Google I don't have experience with it.)

@chrispsommers
Copy link
Collaborator Author

As maintainer you should also see a little escape hatch :)
@fruffy Nice, thanks for pointing this out!

@chrispsommers chrispsommers changed the title Version 1.4.0 rc Sync Version 1.4.0 rc to main Sep 12, 2024
@chrispsommers
Copy link
Collaborator Author

Closed, superseded by #499

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

Successfully merging this pull request may close these issues.

8 participants