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

Tutorial: How to align or update the Physics system with upstream #315

Open
diegoferigo opened this issue Mar 31, 2021 · 2 comments
Open
Assignees

Comments

@diegoferigo
Copy link
Member

diegoferigo commented Mar 31, 2021

In order to implement some of the gym-ignition features, we had to vendor the Physics system with our own.

In the past, we started with the files that were upstream, and then, every alignment, took commit after commit (usually are not many) and replicate them on our vendored files. In the past few weeks, a lot of changes hit upstream, and the manual replication became time consuming and error prone.

This issue describes the new process I thought to keep the vendored system updated.

In a standalone PR, for aligning with upstream follow all the steps, for updating the vendored system follow 5-6.

  1. Replace all the sources of the scenario/src/plugins/Physics with the updated upstream version making sure to select the correct branch. The table contains the link to the upstream folder history and the commit used in the last alignment.
  2. Commit the unmodified files.
  3. Cherry pick the commits from the table below.
  4. Solve potential conflicts.
  5. If there are conflicts or modifications, create a new commit squashing the Custom Physics features commit with the new edits.
  6. Update the table data.
  7. In order to minimize the git history size, squash and merge the PR. The commit will show only the real modifications of the alignment.

This way, conflicts are handled with git and they can be solved nicely.

Branch Aligned with Cherry-pick
main (Fortress) gazebosim/gz-sim@4c35f6c 514532d 2a57f5e

I also considered the other way: generating a patch from upstream by diffing two commits, but it turned out being a more difficult process. What described here is easier and it ensures that we don't forget pieces.

@FirefoxMetzger
Copy link
Contributor

Wouldn't this be better located (and easier to find) inside the Discussions tab? https://github.com/robotology/gym-ignition/discussions/categories/tutorials

@diegoferigo
Copy link
Member Author

I often find these piece of information scattered in multiple places:

  • Issues
  • Wiki
  • CONTRIBUTING.md
  • ...

Before enabling discussions, we were using issues just because we're used to. Now that we have discussion, I agree that it seems the best location. One drawback is that there are not (yet) cross references between issues/pr and discussions, though afaik they are a planned feature that will come at one point.

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

2 participants