Code review comment for lp:~sinzui/launchpad/prf-files

Revision history for this message
Curtis Hovey (sinzui) wrote :

This is my branch to ensure the PRF uploads all the files for a release.

    lp:~sinzui/launchpad/prf-files
    Diff size: 137
    Launchpad bug: https://bugs.launchpad.net/bugs/415595
    Test command: ./bin/test -vvt "test_prf_finder"
    Pre-implementation: no one
    Target release: 3.1.10

= Product release finder should import all files =

The product release finder should import all files for a particular release.
For example, I have sushi-1.0.1.tar.bz2 and sushi-1.0.1.tar.gz, but the
release finder only imports the .tar.bz2.

Testing reveals that this is not fixed yet. Running the PRF in debug mode I
can see an abort is called during addReleaseTarball(). The code has a loop
that duplicates the old hasReleaseFile() method to end early if there is a
binary associated with the release.

== Rules ==

We want to remove the whole loop because hasReleaseFile() makes the decision;
addReleaseTarball() should do as it is told. This will also make adding files
faster since the the loops not needed.

== QA ==

Run the product release finder.
Visit the a the 1.0.0 release of the /sushi.nigiri project
    * Verify that the release has both:
      sushi-1.0.0.tar.gz
      sushi-1.0.0.tar.bz2

Any project can be test in any environment by setting the target series'
release URL pattern to http://sushi.ikkoku.de/downloads/1.0/*

== Lint ==

Linting changed files:
  lib/lp/registry/scripts/productreleasefinder/finder.py
  lib/lp/registry/tests/test_prf_finder.py

== Test ==

    * lib/lp/registry/tests/test_prf_finder.py
      * Added a test to verify that multiple release tarball can be uploaded.
      * Extracted the duplicate test tarball file code to a helper.

== Implementation ==

    * lib/lp/registry/scripts/productreleasefinder/finder.py
      * Deleted the loop that aborts adding a second tarball for a release.
        already has binary.

« Back to merge proposal