#6872 2wkatomic: Generate a delta from the previous stable
Closed 3 years ago by walters. Opened 3 years ago by walters.
walters/releng 2wk-atomic-delta  into  master

@@ -47,7 +47,8 @@ 

  

  # Define "constants"

  ATOMIC_DIR = "/mnt/koji/mash/atomic/%s"

- TARGET_REF = "fedora-atomic/%s/x86_64/docker-host"

+ PREVIOUS_TARGET_REF = "fedora-atomic/25/x86_64/docker-host"

+ TARGET_REF = "fedora/26/x86_64/atomic-host"

  COMPOSE_BASEDIR = "/mnt/koji/compose/twoweek/"

  MASHER_LOCKFILE_GLOB = "/mnt/koji/mash/updates/MASHING*"

  
@@ -570,8 +571,17 @@ 

          log.error("move_tree_commit: diff generation failed: %s", diff_cmd)

          exit(3)

  

+     # Also generate a delta from the previous stable

+     diff_cmd = ["/usr/bin/sudo", "-u", "apache",

+                 "ostree", "static-delta", "generate", "--repo",

+                 ATOMIC_DIR % release, "--if-not-exists", "--from", PREVIOUS_TARGET_REF,

+                 "--to", new_commit]

+     if subprocess.call(diff_cmd):

+         log.error("move_tree_commit: diff generation failed: %s", diff_cmd)

+         exit(3)

+ 

      reset_cmd = ['/usr/bin/sudo', '-u', 'apache',

-                  'ostree', 'reset', TARGET_REF % release,

+                  'ostree', 'reset', TARGET_REF,

                   new_commit, '--repo', ATOMIC_DIR % release]

      if subprocess.call(reset_cmd):

          log.error("move_tree_commit: resetting ref to new commit failed: %s", reset_cmd)
@@ -672,7 +682,7 @@ 

          tree_version = tree_version.replace("'", "")

  

      rev_parse_cmd = ['/usr/bin/ostree', 'rev-parse', '--repo',

-                      ATOMIC_DIR % pargs.release, TARGET_REF % pargs.release]

+                      ATOMIC_DIR % pargs.release, TARGET_REF]

      previous_commit = subprocess.check_output(rev_parse_cmd).strip()

  

      # This could happen if there was a failure in this script sending the email

  • Requires the repos be merged
  • Stop doing release substitution in the ref, since it changed for 26+

Resolves: https://pagure.io/releng/issue/6871

(Note, not tested)

Signed-off-by: Colin Walters walters@verbum.org

please don't merge for now

Note that we won't have the repos merged for f26 - we'll work on getting static deltas generated in a different way. See https://pagure.io/atomic-wg/issue/291

@dustymabe, @walters, any update here? Should this be rebased and aimed for merge? Or should we close it to help clear the review queue?

we mostly did this in https://pagure.io/releng/pull-request/6897 - this PR can be closed I believe.

Pull-Request has been closed by walters

3 years ago
Metadata