Skip to content

Builder Overhaul

Jake Buchholz Göktürk requested to merge overhaul/pruning_etc into master


  • merge 'resolve-profiles' and 'make-amis' into 'amis'
  • rename 'update-releases' to 'release-yaml'
  • rename 'gen-release-readme' to 'release-readme'
  • rename 'prune-amis' to 'prune'
  • reorder to match the usual workflow
  • use argparse mutually-exclusive group where appropriate
  • use argparse 'metavar' and 'nargs' for more salient help


  • can now specify multiple AMIs on command line
  • add explicit '--private' argument
  • if no '--private', '--public', or '--allow-account' is specified, default to propagate the source AMI's permissions to its copies
  • move 'iter_regions' and 'get*image' methods out of ReleaseAMIs class because they're also used elsewhere
  • 'update_image_permissions' resets perms before adding new perms
  • pending_copy loop, reports on everything in progress, waits 3m before reporting on everything again, and then waits 30s between reports
  • pending_copy also notes when a copy has completed (and only queues for pending_perms if they need adjustment)

Releases class

  • used by release-yaml and prune subcommands
  • caches region client objects for later use (by prune)
  • loads images from region - either from a profile or "unknown" (no profile tag)
  • builds the releases object - now structured release -> build (instead of build -> release)


  • works with new releases object format
  • improve sorting and selection of latest per version per-build AMIs
  • empty cell if a region doesn't happen to have a build AMI there


  • rename 'version' level to 'end-of-life'
  • add 'UNKNOWN' pruning level
  • works, even if you don't want to --use-broker
  • --keep N - keeps an additional N AMIs that would otherwise have been purged per build
  • --defer-eol DAYS - give EOL AMIs a grace period past their official EOL date
  • no AMI deletion happens unless --no-pretend arg is provided
  • improve pruning criteria scan and candidate selection

resolves #102 (closed)

Also includes updated releases/ and releases/alpine.yaml.

Merge request reports