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

Orig tarball #374

Merged
merged 6 commits into from
Feb 28, 2017
Merged

Orig tarball #374

merged 6 commits into from
Feb 28, 2017

Conversation

tfoote
Copy link
Member

@tfoote tfoote commented Feb 16, 2017

First commit worked here: http://build.ros.org/view/Lsrc_uZ/job/Lsrc_uZ__catkin__ubuntu_zesty__source/5/console

2nd commit adds build file based parameterization and passes here: http://build.ros.org/view/Lsrc_uZ/job/Lsrc_uZ__catkin__ubuntu_zesty__source/7/console and http://build.ros.org/view/Lsrc_uX/job/Lsrc_uX__catkin__ubuntu_xenial__source/3/console

I manually modified the config to use this branch.

I believe that this will fix the issue with debian increments as well.

@tfoote tfoote force-pushed the orig_tarball branch 2 times, most recently from 50863cd to b2cc094 Compare February 17, 2017 00:01
@tfoote
Copy link
Member Author

tfoote commented Feb 17, 2017

This should actually fix: #233 and obviate the need for #373 and #375

Copy link
Contributor

@mikaelarguedas mikaelarguedas left a comment

Choose a reason for hiding this comment

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

looks good to me. More generic solution than #373 and #375, I like it!

@dirk-thomas
Copy link
Member

I don't think this should replace the other PRs. E.g. #375 makes a lot of sense even when this gets applied. Otherwise if Yakkety is the first platform to build the tarball contains current time stamps and can't be recreated without a diff.

Anyway imo this needs extensive testing on the test farm including, first time releases, new patch releases, new debinc releases, etc. (I will use the "more-information-needed" label for this.)

@tfoote
Copy link
Member Author

tfoote commented Feb 17, 2017

This is a high priority, deploying this should allow us to turn off the EOL'd distros which we've wanted to do for a long time. The most recent thread is here And had planned to do it for even longer.

After working on manually packaging debian increments I believe that this is the better way to package everything. From the debian handbook section the orig.tar.gz is not supposed to be modified by the packaging.

@jspricke @j-rivero Can you confirm that this is a correct approach for building the packages?

For reference we've discovered that xenial, yakkety, and zesty produce different tarballs since they use different options to tar which means they conflict on trying to upload the orig.tar.gz. #373 and #375 workaround a change in standard and a bug respectively.

I agree #375 is less than desireable behavior. we could leave it in. We'll just have to remove that code path once we stop supporting Yakkety. And it's a very fragile fix if there's ever a change to those lines (such as debian makes a patch release to fix the bug, though quite unlikely), the sed line will fail. And with this fix we will never run into this problem since we won't regenerate the orig.tar.gz files. Completely reproducable builds are valuable, but I'd argue that adding the complexity to our system is unnecessary since it's already fixed upstream and should remain so for future versions.

@dirk-thomas
Copy link
Member

Regarding #375 it is clearly not a great solution. I am happy if anyone suggests a "cleaner" workaround. We could e.g. create our own version of the Debian package and put it in our repo. But since that involves more effort I went for the workaround I am able to implement within minutes.

Anyway I disagree with your conclusion of this being especially fragile and increases complexity unnecessarily.

  • First of all the modification is only performed for Yakkety. It doesn't need to be removed since once Yakkety is not being targeted anymore it just never gets used anymore. It can be cleaned up though (if we know nobody using our code uses it to build for Yakkety anymore).

  • The sed line applies the exact upstream patch. Only if the same line is being modified in a new release in Yakkety the sed command would turn into a no-op since the regex would match anymore. The line could be changed for two reasons (both probably very unlikely):

    • The Debian package gets updated to patch the actual bug. Then since the sed line doesn't apply anymore the build continues to work.
    • The Debian package gets updated with a change to this line which doesn't fix the bug. Then we will immediately notice the failing builds and have to update the workaround to continue working.

@jspricke
Copy link
Contributor

jspricke commented Feb 18, 2017 via email

@dirk-thomas
Copy link
Member

This is currently blocking the Lunar packages for Debian targets. Note that those are actually creating different archives since the newer dpkg version adds a new .buildinfo file. So it would be non-deterministic which of the two variations of the archive makes it into the repo depending on which job gets processed first.

@mikaelarguedas
Copy link
Contributor

mikaelarguedas commented Feb 21, 2017

@tfoote @j-rivero any input on how to handle the difference between debian and ubuntu for the orig tarballs ? (c.f. #380 (comment))

EDIT: this comment is a duplicate of previous comment from @dirk-thomas

@tfoote
Copy link
Member Author

tfoote commented Feb 21, 2017

@mikaelarguedas @dirk-thomas the .buildinfo doesn't go into the orig.tar.gz that will go into the debian.tar.gz which is layered on top, and will be regenerated any time a sourcedeb job is generated. Thus this is independent of that change and #380 will stand on it's own to fix that.

@dirk-thomas
Copy link
Member

@tfoote Thanks for clarifying.

This will avoid conflicts with different tar compression methods as well as hopefully fix the debinc issue.
@tfoote
Copy link
Member Author

tfoote commented Feb 22, 2017

I've rebased on the latest. It now builds on Stretch, Xenial, Yakkety, and Zesty for Lunary.

I ran all 4 of these debian increments in parallel:
http://build.ros.org:8080/view/Lsrc_dS/job/Lsrc_dS__angles__debian_stretch__source/7/console
http://build.ros.org:8080/view/Lsrc_uX/job/Lsrc_uX__angles__ubuntu_xenial__source/7/console
http://build.ros.org:8080/view/Lsrc_uY/job/Lsrc_uY__angles__ubuntu_yakkety__source/3/console
http://build.ros.org:8080/view/Lsrc_uZ/job/Lsrc_uZ__angles__ubuntu_zesty__source/3/console

And they all passed.

This job passes: http://build.ros.org:8080/view/Lsrc_uX/job/Lsrc_uX__angles__ubuntu_xenial__source/6/ after the old style Yakkety job changed the tarball underneath this job running: http://build.ros.org:8080/job/Lrel_import-package/164/console
http://build.ros.org:8080/view/Lsrc_uX/job/Lsrc_uX__angles__ubuntu_xenial__source/5/

It now has built both our use cases, a new releases and debian increment releases.

There is currently one known issue which is that if two are triggered simultaneously on a new release they might both generate the tarball. And if they generate different ones(aka different behaviors between versions of dpkg like #375 ) In which case it will hit our existing retry logic and whichever job uploaded 2nd will need to retry. It will be better than the current situation where we require that all arches run before any individual one can succeed again.

Note that this also fixes the Stretch builds RE: ros-infrastructure/ros_buildfarm_config#75

url = URL_TEMPLATE % (repo, prefix, debian_package_name, filename)

try:
output_file = os.path.join(sources_dir, '..', filename)
Copy link
Member

Choose a reason for hiding this comment

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

Please move this line before the try / except block.

urlretrieve(url, output_file)
print("Found matching original tarball, "
"downloading %s to %s" % (url, output_file))
continue
Copy link
Member

Choose a reason for hiding this comment

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

continue seems to be unnecessary here. First it does loop anyway. Second should it actually try the other repo urls or break instead?


for repo in debian_repository_urls:
URL_TEMPLATE = '%s/pool/main/%s/%s/%s'
prefix = debian_package_name[0]
Copy link
Member

Choose a reason for hiding this comment

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

Please move these two line before the loop.

output_file = os.path.join(sources_dir, '..', filename)
urlretrieve(url, output_file)
print("Found matching original tarball, "
"downloading %s to %s" % (url, output_file))
Copy link
Member

Choose a reason for hiding this comment

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

Please move this line into an else block.

Please put single quotes around the placeholders.

At this point the download should already be complete Therefore the message should be something like this:

Downloaded original tarball %s from %s

Copy link
Member

Choose a reason for hiding this comment

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

The first sentence still applies:

Please move this line into an else block.

"downloading %s to %s" % (url, output_file))
continue
except:
print("No tarball found at %s, that's ok it will be rebuilt" % url)
Copy link
Member

Choose a reason for hiding this comment

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

Please put single quotes around the placeholders.

The part of the message ("it will be rebuilt") might be misleading since it might still be downloaded from another repo. Therefore I would suggest to leave that part out.

@tfoote
Copy link
Member Author

tfoote commented Feb 23, 2017

@dirk-thomas Good points, comments addressed. The continue was supposed to be a break.

@dirk-thomas
Copy link
Member

@j-rivero has added a +1 to the above comment #374 (comment)

mikaelarguedas added a commit to ros-infrastructure/ros_buildfarm_config that referenced this pull request Feb 25, 2017
@dirk-thomas
Copy link
Member

We will merge this before the automatic reconfigure of the source jobs tonight.

@dirk-thomas dirk-thomas merged commit f5217ae into master Feb 28, 2017
@dirk-thomas dirk-thomas deleted the orig_tarball branch February 28, 2017 06:31
@dirk-thomas
Copy link
Member

Manually squashed into 06e7b6c

@dirk-thomas
Copy link
Member

Just for the record: this patch seems to be the reason for this regression: ros/rosdistro#14091 (comment)

@dirk-thomas dirk-thomas mentioned this pull request Mar 7, 2017
tfoote added a commit that referenced this pull request Mar 8, 2017
This will auto commit changes to the upstream tarball as diffs for the debian increment.
Addresses issue in #374
dirk-thomas pushed a commit that referenced this pull request Mar 8, 2017
* add support for changing tarballs.
This will auto commit changes to the upstream tarball as diffs for the debian increment.
Addresses issue in #374

* fix spelling

* Change to append

* making sure there's a new line

* wrap
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.

4 participants