Skip to content

Merge of navigation repository - #2071

Merged
karussell merged 159 commits into
masterfrom
gh_navigation_merge
Jul 10, 2020
Merged

karussell merged 159 commits into
masterfrom
gh_navigation_merge

Conversation

@karussell

@karussell karussell commented Jun 23, 2020 •

Copy link
Copy Markdown
Member

Due to the maintenance and development overhead here is the PR to reduce this via merging the navigation repository. Ping @boldtrn @easbar.

Related to #1422.

It seems I was able to successfully merge the master branch of https://github.com/graphhopper/graphhopper-navigation into this repository :). At least here and on command line it looks fine:

image

Before I did this I moved everything into the subfolder "navigation" to avoid conflicts when merging. I did not use any special tricks or subtrees, see this SO answer.

In more details I did the following in the graphhopper-navigation repo:

git checkout -b main
mkdir navigation
mv * navigation/
git commit -a -S -m "move into navigation subfolder"
rm -rf .github/ .gitignore .travis.yml
git commit -a -S -m "remove duplicate files"
git push --set-upstream origin main

In the graphhopper repo I did:

git checkout master -b gh_navigation_merge
# only fetch the remote "main" branch and no tags
git remote add --no-tags -f -t main gh_navigation [email protected]:graphhopper/graphhopper-navigation.git
git merge gh_navigation/main
git merge --allow-unrelated-histories gh_navigation/main

From the Java side nothing is merged yet. Probably we should do this in a second PR to squash commits for this but keep the commits here? (Or we can also do it here and squash + push force)

We could remove navigation/files/andorra.osm.gz before to avoid more overhead for the main branch. This is probably only possible if we would alter history.

Work to be done:

  • remove files like navigation/files/, the license, pom.xml etc
  • merge translation keys and avoid the second TranslationMap
  • keep the navigation feature separated and also enable this only via a config switch so that everyone can at any remove those dependencies

boldtrn and others added 30 commits August 21, 2018 11:04
* Make MapboxResponseConverter testable

* Added Travis.yml
* try maven build

* packaging pom

* Corrected conflict resolution
* First approach at allowing multiple waypoints

* Fix resetting time and distance
@michaz

michaz commented Jun 28, 2020 •

Copy link
Copy Markdown
Member

Okay, my opinion is always that there should not be combinatorial builds, i.e. mvn package makes the repository.

If there's going to be a compile-time feature switch aka Maven profile for navigation, then ... I don't know. I mean, why? If it belongs to GraphHopper, it should be built with GraphHopper.

Why can't we just compile everything?

Also, how would we implement that? GraphHopperBundle looks into the classpath and checks whether the navigation classes were built, and if yes, instantiates them by reflection? (Oh my..)

And if we would keep it out of GraphHopperBundle, then how do I run the web service? And why are all web services except navigation in GraphHopperBundle?

@michaz

michaz commented Jun 28, 2020 •

Copy link
Copy Markdown
Member

More generally: We don't have a full plug-in architecture like OSGi and probably don't want one. So let's not try to emulate one.

Let's just put it into the web server like all the other resources so people can test it. And if someone, for some reason, really does not want it in their web server, they should edit the code / roll their own. In Dropwizard, the code is the deployment.

But why would they? We are maintaining it, and we even have it in our own web server, so we seem to think it's okay.

And if we have it in our own web server, why shouldn't it also be in the web server that is in the same repository?

@michaz

michaz commented Jun 28, 2020

Copy link
Copy Markdown
Member

Also, what dependencies? Navigation doesn't seem to have any dependencies.

@karussell

karussell commented Jun 28, 2020 •

Copy link
Copy Markdown
Member Author

Let's just put it into the web server like all the other resources so people can test it.

Ok, convinced will do without config just like we have isochrone and for people to try.

Only unsure about whether to keep history or increase repo size :) ... probably here indeed removing the PBF and squashing the PR make sense, but then unfortunately all the good work (and history) of @boldtrn gets lost :/ - would this be okay @boldtrn?

Also, what dependencies? Navigation doesn't seem to have any dependencies.

Ups, indeed.

@boldtrn

boldtrn commented Jun 28, 2020

Copy link
Copy Markdown
Member

I would be fine with loosing the history (it' not lost, just in a different repo :)). I can clearly see the benefit of merging the two repos and to reduce the repo size.

@michaz

michaz commented Jun 29, 2020

Copy link
Copy Markdown
Member

Okay cool. But just to pre-register: For map-matching, I want the history. :)

@karussell karussell added this to the 2.0 milestone Jun 29, 2020
@karussell

karussell commented Jun 29, 2020 •

Copy link
Copy Markdown
Member Author

Ok, will now squash and merge. And in a second PR integrate the navigate endpoint and adapt the remaining stuff so that the build includes the navigation module and the web service the /navigate endpoint etc.

For map-matching, I want the history. :)

Ok, sure :). This was still a good test here. I think for map matching it would work identical except that we won't squash.

@karussell
karussell merged commit 75a162a into master Jul 10, 2020
@karussell
karussell deleted the gh_navigation_merge branch July 10, 2020 17:09
@karussell

karussell commented Jul 10, 2020 •

Copy link
Copy Markdown
Member Author

The merge initially failed with a cryptic message I did not see before and offered a "try again" button. I clicked that and now it is merged but it seems to have merged it without squashing before. Not sure if we can fix something now as I would find a git rebasing on master wrong. Really ugly.

@easbar

easbar commented Jul 10, 2020 •

Copy link
Copy Markdown
Member

Not sure if we can fix something now as I would find a git rebasing on master wrong. Really ugly.

In this particular case it might be worth considering a hard reset? (I would not mind it)

@karussell

karussell commented Jul 10, 2020 •

Copy link
Copy Markdown
Member Author

Would you do this? The last time I did this I messed up something, but not sure how and what exactly I only know that it was not worth it ... I think we also need to lift the master branch protection (?)

@easbar

easbar commented Jul 11, 2020

Copy link
Copy Markdown
Member

Would you do this? The last time I did this I messed up something, but not sure how and what exactly I only know that it was not worth it ... I think we also need to lift the master branch protection (?)

Hm we just need to reset the master branch to the commit before the merge and then force push it to upstream. And yes to force push we need to lift the protection on github. But if you do not think its worth it we do not have to do it. As far as I can tell it would be ugly for everyone using the updated master already (merged it to some feature branch, use it in some fork etc.), but it should be harmless for everyone who knows we did this and/or did not even fetch since you did the merge. No idea how many people would be affected tbh.

What is our concern here? I think having the non-linear history is quite ugly and probably this also increased the repository size (but don't know by how much).

@karussell

Copy link
Copy Markdown
Member Author

Ok. Have temporarily allowed force pushes.

easbar added a commit that referenced this pull request Jul 11, 2020
Co-authored-by: Robin <[email protected]>
Co-authored-by: Peter <[email protected]>
Co-authored-by: Stefan Kienzl <[email protected]>
@easbar

easbar commented Jul 11, 2020

Copy link
Copy Markdown
Member

Ok. Have temporarily allowed force pushes.

Ok I did it 🙈 I kept the previous branch as master_old. For example the nav_integration branch is based off of this one. But once we squash and merge nav_integration into master we should get rid of all the nav commits.

Just make sure to update your master properly now.

@karussell

Copy link
Copy Markdown
Member Author

Thanks! Updated my master already.

karussell added a commit that referenced this pull request Jul 11, 2020
karussell added a commit that referenced this pull request Jul 13, 2020
* integrate navigation module, related to #2071

* tweak readme to trigger github action

* try semver suggestion to make github packages accept it, https://github.community/t/119670

* Revert "try semver suggestion to make github packages accept it, https://github.community/t/119670"

This reverts commit 597e1e3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants