-
Notifications
You must be signed in to change notification settings - Fork 43
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
Implementation of REP 143 #45
Conversation
There are no tests for index_v3 at the moment. |
@@ -230,6 +250,7 @@ def get_release_cache(index, dist_name): | |||
|
|||
|
|||
def get_release_builds(index, release_file): | |||
print("# rosdistro.get_release_builds() has been deprecated and its functionality is now handled by the 'ros_buildfarm.config' module", file=sys.stderr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this and the following warnings can we detect which version we're using? If so it should say that it will return an empty list always in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the index file has been updated to version 3 it can not list any build files. Therefore I don't think a message these function will return an empty list is necessary. They simply return what is specified in the yaml.
Looks like I forgot to merge some changes from here: https://github.com/dirk-thomas/ros-infrastructure_rosdistro/commit/317a641a47b16ec30cc2afc4ed6d3e6215d946da |
@@ -45,7 +45,7 @@ def migrate(index_yaml): | |||
update_cache(index_yaml, distro_name, cache_url, cache_file, distribution_file) | |||
|
|||
data = index_to_yaml(data) | |||
data = '\n'.join(_yaml_header_lines('index')) + '\n' + data | |||
data = '\n'.join(_yaml_header_lines('index', data['version'])) + '\n' + data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are changes needed for the existing 137 -> 141 migrator? Is this fixing an old bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function signature changed and now requires a version argument. The behavior should stay the say i this case.
@@ -57,6 +57,7 @@ def _get_package_xml(url, tag): | |||
base = tempfile.mkdtemp('rosdistro') | |||
try: | |||
# git 1.7.9 does not support cloning a tag directly, so doing it in two steps | |||
assert _git_client_executable is not None, "'git not found" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the leading single quote on git
intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely - but it should also have a ' after it 😉
# for backward compatibility only | ||
for key in ['release_builds', 'source_builds', 'doc_builds']: | ||
if key not in self.distributions[distro_name]: | ||
self.distributions[distro_name][key] = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this only be done in the case of version 3? What happened before if the file did not have these entries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in version 3 that will always be the case.
I version 2 that was never the case since we always had the entries. But if you would have left them out I would expect several scripts to break when trying to use them.
So I think it is cleaner to always ensure they are present.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me.
@@ -88,6 +91,7 @@ def _get_package_xml(url, tag): | |||
def check_remote_tag_exists(url, tag): | |||
base = tempfile.mkdtemp('rosdistro') | |||
try: | |||
assert _git_client_executable is not None, "'git not found" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing here, looks like a leading '
+1 |
I added the |
+1 (self-vote) on merging this and releasing rosdistro 0.4.0. |
I have done a preliminary full run through validating the use of REP 143 on a custom buildfarm. I think it will work. We need to keep track to return and add unit tests, but I think having the draft implementation available from the standard toolchain will be very valuable. |
I have been testing this out locally in a virtualenv by chaining a custom rosdistro with the OSRF rosdistro. So far, I've encountered two problems:
Otherwise, these changes are great. This should significantly reduce the number of workarounds necessary to run a local buildserver! 👍 |
If you see a way to relax the constraints while maintaining full backward compatibility I am more than happy you consider it. The REP is currently only in "draft" status and can be modified until marked final. |
You may already deal with (ii) in the Bloom release process. However, my understanding is that In general, I don't think a downstream rosdistro should have to "pay for" any of the release platforms that it does not explicitly support. |
@mkoval bloom does not use the distribution files to determine what actions it takes. There is a default list of actions in the https://github.com/ros-gbp/ros_comm-release/blob/master/tracks.yaml#L68-71 For instance we recently added the fedora generator to that list. Also the packages which get released are determined by looking at the packages in the upstream repository and excluding packages which have been explicitly ignored using a https://github.com/ros-gbp/ros_comm-release/blob/master/indigo.ignored |
@wjwwood The Edit: To be more specific, the |
@mkoval The user must explicitly setup a track for each release. You can use bloom to create a release repository for a repository of packages without any input from the distribution file. |
I see what you mean, yes it gets which ubuntu/debian platforms from the distribution file via rosdep. This is done through rosdep for historical reasons, but this is a different piece of information from deciding which generators (rosdebian/rosrpm) are run. |
@wjwwood Yes, you're absolutely right. I conflated generators with release platforms in my original post. You can always remove generators from the However, I am still concerned about the Ubuntu/Debian/Fedora platforms read from the distribution files. E.g. a custom rosdistro only supports |
@mkoval I understand your point, and from a idealogical stand point I tend to agree that this information doesn't belong in the distribution file. However, I believe that decoupling the platforms from the repository entries is not sufficient. All of the release repositories listed in the Let's say you wanted to reference our indigo distribution file (whose default platforms are In some unintended way the platforms being listed in the distribution file describe the minimal contents of the release repositories that are referenced within. |
It is fine for the distribution file to specify the minimum set of branches and tags that will be present in the GBP repositories. This means that each distribution file listed in the As you pointed out, It would not be okay for the user to also specify (Sorry for the delay. I just realized that this was sitting as a draft for a few days.) |
I implemented the relaxed condition that |
No description provided.