Merge lp://staging/~sinzui/juju-release-tools/assemble-publish-purpose into lp://staging/juju-release-tools

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 60
Proposed branch: lp://staging/~sinzui/juju-release-tools/assemble-publish-purpose
Merge into: lp://staging/juju-release-tools
Diff against target: 513 lines (+174/-121)
2 files modified
assemble-streams.bash (+158/-101)
publish-public-tools.bash (+16/-20)
To merge this branch: bzr merge lp://staging/~sinzui/juju-release-tools/assemble-publish-purpose
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+234753@code.staging.launchpad.net

Description of the change

This branch adds support for proposed and devel purposes

./juju-release-tools/assemble-streams.bash testing 1.21-alpha2 ./new-tools
./juju-release-tools/assemble-streams.bash devel 1.21-alpha2 ./new-tools
./juju-release-tools/assemble-streams.bash proposed 1.21.0 ./new-tools
./juju-release-tools/assemble-streams.bash release 1.21.0 ./new-tools

I retracted an errant copy of 1.20.6 to my own tools like this.
./juju-release-tools/assemble-streams.bash -n -r 'juju-1.20.6*' devel IGNORE new-tools/
^ where -n means no-sync, -r means retract and IGNORE implies don't visit the archives.

Created new assemble-streams.bash based on assemble-public-tools:
1. Removed the juju stable and devel archive search because they have not been
   the source for tools for 9 months.
   Fixed https://bugs.launchpad.net/juju-release-tools/+bug/1341747
2. Documented the use of IGNORE as the release version to regenerate streams...
   ...do not try to retrieve tools and extract them when using IGNORE
   Removed the PRIVATE arg that wasn't used and overlaps with IGNORE
3. Create the whole path to tools and metadata. DEST_DIST can be
   juju-dist/ or juju-dist/purpose
4. Replaced all the early returns in functions with guards in the "main"
   calls so that is clear which functions are being used with IGNORE is
   set or GET_RELEASED_TOOL is false.
5. Removed the excludes list from s3cmd. It never worked. Fast syncing
   was achieved using a local cache. The source for the sync is determined
   by the purpose. Note the subtle rule for testing. Syncing happens
   directly in the tree that will be synced. This removed the need for
   the old new-tools/tools/releases dir. The detection of duplicate tools
   is maintained because testing is syncing from purposes, which must have
   all the stable tools released.
6. Made retract_tools() a common step so that is is well tested. Always
   retract when the purpose is testing. Also retract is RETRACT_GLOB is
   set using the -r option.
7. init_tools_maybe() started as a way to ensure Jerff can get s sane
   seed of data for devel and proposed. I used this to make my own for
   the CPCs, but I didn't need it. This function evolved to be the
   means to reset testing by first retracting the testing tools and data
   then seeding it with proposed.
8. Extracted archive_extra_ppc64_tool to make archive_tools easier to read...
   It might be deletable with the release of 1.21.0
9. Inlined the creation and cleanup to $WORK
19. Exit early when debs were search, but no new tools were found. This case
    is an error for testing, but results in a no-op for streams.canonical.com
11. Inlined JUJU_PATH, ARCH and lsb-release vars because they are now localised.
12. Moved signing key into options, factored out PRIVATE
13. Introduced purpose. DEST_DIST us made with it. Users of the script will
    have a cache for each purpose.
14. Exit early if new-tools does not exist. It is not created because the
    dir is a cache that users should not accidentally create.
15. only enter functions when we know we will use them...not more immediate
    exists because a env var is set.

Updated publish-public-tools
1. Updated the script to understand more purposes, simplified the logic
   because only "release" has a different root dir rule.
2. Removed EVENT because it was not needed when better phrasing was used.

To post a comment you must log in.
71. By Curtis Hovey

Fixed syntax errors.

72. By Curtis Hovey

Renamed retrieve_released_tools to sync_released_tools because Jerff has
redefined this function.

73. By Curtis Hovey

Delete debs without failing over.

74. By Curtis Hovey

Delete json when retracting because generate-tools appends to json; it does
not check if the tools exist.
Initialise proposed and devel streams.

75. By Curtis Hovey

Added -r option to pass a glob of tools to retract.
Allways retract all tools when the purpose is testing.

76. By Curtis Hovey

RETRACT_GLOB cannot be undefined.

Revision history for this message
Aaron Bentley (abentley) wrote :

Looks landable, but some comments below.

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

I reported bug 1370246 about the magic number/validation problem

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches