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

Allow recovery from platform-specific rosdep key errors #308

Merged
merged 5 commits into from
Sep 23, 2014
Merged

Allow recovery from platform-specific rosdep key errors #308

merged 5 commits into from
Sep 23, 2014

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Sep 23, 2014

If an action contains the command 'bloom-generate' and returns a specific error code, notify the user that the generator can be skipped and the release can continue without it.

This took some massaging to discover the key resolution error at the right level in bloom before the repository had already been "damaged" by partial generation. As I discuss in the commits, I intruduced a pre-verification step in the form of a pre_modify hook in the generators.

Commits are grouped logically, please reveiw them all.

Suggested fix for: #296

Thanks,

--scott

This hook is intended to run before the generator has made any changes to the
repository. It can be used to pre-verify such things as rosdep keys or other
pre-determined values.
To do this, we override sys.excepthook with a function that calls the old
sys.excepthook so the backtrace and exception are printed, but then we invoke
sys.exit with the desired return code (or 1 if not specified).
If an action contains the command 'bloom-generate' and returns a specific
error code, notify the user that the generator can be skipped and the
release can continue without it.
@wjwwood
Copy link
Contributor

wjwwood commented Sep 23, 2014

Looks good to me, do we have a good example which this can be tested against? Maybe a fake repository which has a rosdep which is defined in one OS but not the other?

@cottsay
Copy link
Member Author

cottsay commented Sep 23, 2014

You can give it a shot with:
https://github.com/cottsay/not_available_on_fedora.git
https://github.com/cottsay/not_available_on_fedora-release.git

This empty package has a dependency on ace, a software stack not currently available on Fedora. To make the case closer to what is actually happening, I added a Hydro track (without rosrpm) and performed generation there.

To see the new error handling, try releasing the package for Indigo, or try releasing the package for Hydro and electing to update the action list.

Another thing I should have noted is that the packager only has the opportunity to skip the generator if a key exists for other platforms, but not for the target platform. Hopefully this will prevent folks from skipping generation when they legitimately have the wrong rosdep key.

@wjwwood
Copy link
Contributor

wjwwood commented Sep 23, 2014

Works for me.

wjwwood added a commit that referenced this pull request Sep 23, 2014
Allow recovery from platform-specific rosdep key errors
@wjwwood wjwwood merged commit 6dcc80a into ros-infrastructure:master Sep 23, 2014
@cottsay cottsay deleted the skip-on-key-error branch January 30, 2019 23:22
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.

2 participants