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

Add ROSDEP_INSTALL_OPTS env #180

Closed
wants to merge 1 commit into from

Conversation

wkentaro
Copy link

@wkentaro wkentaro commented Jun 3, 2017

I need this to use package that have bad rosdep keys in UPSTREAM_WORKSPACE by -r to rosdep install.

I need this to use package that have bad rosdep keys as
UPSTREAM_WORKSPACE with `-r` or unsetting `-i`.
@@ -126,8 +126,11 @@ fi

ici_time_start rosdep_install

if [ "${ROSDEP_INSTALL_OPTS// }" == "" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if clause only defines a variable. So can it be moved to industrial_ci/src/env.sh?
Cc @ipa-mdl

Copy link
Member

@130s 130s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things.

  1. Just trying to understand,

    I need this to use package that have bad rosdep keys in UPSTREAM_WORKSPACE by -r to rosdep install.

    The situation you're trying to address is:

    • Packages installed via rosdep is not what you want. Instead you want to build from source in your workspace.

    Is this correct? Your statement bad rosdep keys is a bit unclear to me.

  2. Would you mind adding a job to test the new variable?

Also I'd like to ask @ipa-mdl for the review.

@130s 130s requested a review from mathias-luedtke June 5, 2017 20:37
@mathias-luedtke
Copy link
Member

I need this to use package that have bad rosdep keys in UPSTREAM_WORKSPACE by -r to rosdep install.

So why do you need to overwrite -q and --ignore-src in this case?
If an upstream package is broken, it would be great if you report or even fix it!

@130s
Copy link
Member

130s commented Jun 9, 2017

So why do you need to overwrite -q and --ignore-src in this case?

I can't speak for @wkentaro and just am personally trying to think of how useful it can be.
When upstream binary is unavailable (even for temporarily) but you want to somehow proceed your CI jobs, this change might be useful (regardless those jobs can pass or not) to work around the situation.

Anyways, generally speaking isn't it a good idea to give users an option to pass options to external commands like rosdep?

@wkentaro
Copy link
Author

wkentaro commented Jun 9, 2017

Sorry for late.

The situation you're trying to address is:

  • Packages installed via rosdep is not what you want. Instead you want to build from source in your workspace.

Is this correct? Your statement bad rosdep keys is a bit unclear to me.

Sorry for unclear comment, I mean deprecated or unreleased dependencies for "bad rosdep keys".
In that case, I want to pass options -r or --skip-keys=xxx to rosdep.
(My lab project has default option of -r because there are some unreleased or deprecated packages: https://github.com/jsk-ros-pkg/jsk_travis#environmental-variables)

So why do you need to overwrite -q and --ignore-src in this case?

In this case, it is not needed.
But when someone wants overwrite -q or --ignore-src in the future, it will need to break the api or behavior if I don't set -q --ignore-src as the default now.

@mathias-luedtke
Copy link
Member

Sorry for unclear comment, I mean deprecated or unreleased dependencies for "bad rosdep keys".

Deprecated and unreleased packages should not lead to "bad rosdep keys".
(assuming that you provide the unreleased packages from source)

But when someone wants overwrite -q or --ignore-src in the future, it will need to break the api or behavior if I don't set -q --ignore-src as the default now.

I can't imaging any use case for disabling --ignore-src for CI tests.
-q is superfluous anyway, but it does not hurt.

@wkentaro
Copy link
Author

wkentaro commented Jun 29, 2017

I can't imaging any use case for disabling --ignore-src for CI tests.

I also think this is rare, but what about below case?

  • you want to use a package (package_A) in a github repository which includes some packages (package_A,B,C), so you put it in .travis.rosinstall.
  • there is no dependency among package_A,B,C
  • you want to build only package_A

In this case, you need to disable --ignore-src, to use package_B, package_C installed by apt.

@mathias-luedtke
Copy link
Member

mathias-luedtke commented Jun 29, 2017

@wkentaro wrote:

In this case, you need to disable --ignore-src, to use package_B, package_C installed by apt.

rosdep would install them by apt, but cakin will still use the package from .travis.rosinstall.
(I have added a blacklist feature for rosdep AND catkin in #137)
For now it would be better to remove or disable the packages in a BEFORE_SCRIPT.

@130s wrote:

Anyways, generally speaking isn't it a good idea to give users an option to pass options to external commands like rosdep?

IMHO rosdep doesn't have any additional, useful flags that make sense for CI.
If we introduce this option now, #137 does not work anymore as this option would undermine the new features.

@wkentaro
Copy link
Author

rosdep would install them by apt, but cakin will still use the package from .travis.rosinstall.
(I have added a blacklist feature for rosdep AND catkin in #137)
For now it would be better to remove or disable the packages in a BEFORE_SCRIPT.

Maybe you misunderstand my needs, and I don't need to disable the --ignore-src option, but -r.
I just added --ignore-src to the env variable for future possible changes, because we can ignore being built packages by catkin --blacklist as you said.

@mathias-luedtke
Copy link
Member

Maybe you misunderstand my needs, and I don't need to disable the --ignore-src option, but -r.

I strongly encourage you to not use -r, but --skip-keys "package_X, package_Y, package_Z" for CI tests.
rosdep can fail for various reasons and ignoring them leads to broken builds.

What do you think of introducing a ROSDEP_SKIP_KEYS variable?
I could support this in #137 as well :)

I just added --ignore-src to the env variable for future possible changes, because we can ignore being built packages by catkin --blacklist as you said.

You can blacklist the build, but rostest will use the packages from source space (I guess).

@wkentaro
Copy link
Author

What do you think of introducing a ROSDEP_SKIP_KEYS variable?
I could support this in #137 as well :)

I agree that.

@mathias-luedtke
Copy link
Member

What do you think of introducing a ROSDEP_SKIP_KEYS variable?

I agree that.

here we go: #184
Does this fit your needs?

@wkentaro
Copy link
Author

wkentaro commented Jun 30, 2017 via email

@130s
Copy link
Member

130s commented Jul 5, 2017

Anyways, generally speaking isn't it a good idea to give users an option to pass options to external commands like rosdep?

IMHO rosdep doesn't have any additional, useful flags that make sense for CI.
If we introduce this option now, #137 does not work anymore as this option would undermine the new features.

I'm not sure about this yet because:

That said, #184 itself looks good so I merged it.

@mathias-luedtke
Copy link
Member

I will close this for now, skipping keys was implemented in #184

@130s
Copy link
Member

130s commented Jul 11, 2017

Yeah, fair enough. Besides, thanks for the discussion @wkentaro @ipa-mdl

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.

3 participants