Dockerfile change to copy navigation2 source code from the current repo#389
Dockerfile change to copy navigation2 source code from the current repo#389Nickolaim wants to merge 2 commits intoros-navigation:masterfrom
Conversation
|
This would render the DockerFile non-functional outside of Travis. I would highly recommend not doing this. Hardcoding paths in CI can create nightmares for future comers... I work off forks and make package changes without a problem - I'd like to hear more about the issue you are having. That's the point of these lines to look if its a PR then it will grab your code to work with over master. If you're PRing those fetch lines will grab your changes regardless of original repo or fork. Other options
The docker container should be standalone if at all possible |
|
@crdelsey - here is the run with a failure introduced: https://travis-ci.org/Nickolaim/navigation2/builds/461388945 @SteveMacenski - I am confused. The old version had the hardcoded staff and was not working for the local builds. The new version will work for local builds, with whatever changes are happening locally. This is the first time in 10+ years I work with CI I see a case when CI pipeline is NOT building/testing the current changes. This is very unusual and unintuitive. |
|
It does work with local builds on master, but your proposed changes wont work on local changes at all unless you have this docker file in a particular directory - making it not standalone. I can't run docker build without it failing as an independent file. If you wanted to make it run locally on an arbitrary branch, I'd recommend my first bullet with run time and when running locally set the docker build variable with the user name you want to override. PULLREQ will default false if you dont set so then it'll just run with your flavor. That's the best case I think. The old version will clone ros-planning/master and check if its running as a pull request - if so, it fetches your branch that the PR is based off of and checks it out. |
|
I think there are several scenarios here:
We can discuss the scenarios and importance. To me 1,2,3 and 5 are important. I understand how to make this code work for 1-4, but I am not sure that's the right approach. |
|
I agree with @SteveMacenski - I think this should be handled by adding another ARG to the Dockerfile and checking the variable before deciding whether to clone or use the local copy. The default should be to clone master, which will make the Dockerfile able to be run from any location. |
|
@mkhansen-intel - OK. What about Travis CI runs in the forked repo? Should they run code from the forked repo or they should run code from |
|
@Nickolaim let me walk through a few of these so you can see what I'm talking about 1 Run locally 2 Run CI 3 Run CI test locally not on a branch 4 Deploy docker 5 personal fork on Travis server Now if we do what you propose with changing it to copy the local environment, it might be slightly more convenient for your testing, but it is overall much harder to do the majority of the items above. Keep in mind, we all have our own separate developer tools. If you want a docker environment to build code in you can just make a docker for you to work in. I have my own set, I'm sure other folks here do as well. For example, if you take the current docker file and cut it off here what you end up with is the correct environment to do all your development and you can just go into the container, put whatever code you like into it with ordinary bash tools and develop in that isolated sandbox. phew Does that make sense? If not, we can discuss more, I'd be open to a phone call, especially if I'm misunderstanding. |
|
Sorry for the long discussion. My experience is very different from what this project is required. Hope #393 will address the issues raised in this PR. |
…uides (ros-navigation#389) * configuration: dwb-params: add forward_prune_distance parameter description * migration: Humble: add entry for the new forward_prune_distance DWB parameter * Update Humble.rst --------- Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
… test node. (ros-navigation#389) Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
Basic Info
Description of contribution in a few bullet points
Fixing the logic on how source code gets into the docker image. The previous version always was cloning from
ros-panning/navigation2that is unexpected for:I hit this problem when was testing a fix for
colcon testof one of the packages. I was confident the fix was right, it worked locally, but Travis build was failing. After some time I saw the code in this file that is ignoring all the changes, but gets source code from the master of ros-planning/navigation2.@mkhansen-intel