Fix the order and number of arguments for squashing/ACI
This commit is contained in:
parent
a6ae770b77
commit
fe9f97cd0e
2 changed files with 4 additions and 5 deletions
|
@ -31,7 +31,7 @@ verbs = Blueprint('verbs', __name__)
|
|||
license_validator.enforce_license_before_request(verbs)
|
||||
|
||||
|
||||
def _open_stream(formatter, namespace, repository, tag, derived_image_id, repo_image, handlers):
|
||||
def _open_stream(formatter, repo_image, tag, derived_image_id, handlers):
|
||||
"""
|
||||
This method generates a stream of data which will be replicated and read from the queue files.
|
||||
This method runs in a separate process.
|
||||
|
@ -56,8 +56,7 @@ def _open_stream(formatter, namespace, repository, tag, derived_image_id, repo_i
|
|||
logger.debug('Returning image layer %s: %s', current_image.image_id, current_image_path)
|
||||
yield current_image_stream
|
||||
|
||||
stream = formatter.build_stream(namespace, repository, tag, repo_image, derived_image_id,
|
||||
get_next_image, get_next_layer)
|
||||
stream = formatter.build_stream(repo_image, tag, derived_image_id, get_next_image, get_next_layer)
|
||||
|
||||
for handler_fn in handlers:
|
||||
stream = wrap_with_handler(stream, handler_fn)
|
||||
|
@ -259,7 +258,7 @@ def _repo_verb(namespace, repository, tag, verb, formatter, sign=False, checker=
|
|||
# Create a queue process to generate the data. The queue files will read from the process
|
||||
# and send the results to the client and storage.
|
||||
handlers = [hasher.update]
|
||||
args = (formatter, namespace, repository, tag, derived_image_id, repo_image, handlers)
|
||||
args = (formatter, repo_image, tag, derived_image_id, handlers)
|
||||
queue_process = QueueProcess(_open_stream,
|
||||
8 * 1024, 10 * 1024 * 1024, # 8K/10M chunk/max
|
||||
args, finished=_store_metadata_and_cleanup)
|
||||
|
|
|
@ -31,8 +31,8 @@ class AppCImageFormatter(TarImageFormatter):
|
|||
|
||||
# Yield the manifest.
|
||||
manifest = json.dumps(DockerV1ToACIManifestTranslator.build_manifest(
|
||||
tag,
|
||||
repo_image,
|
||||
tag,
|
||||
synthetic_image_id
|
||||
))
|
||||
yield self.tar_file('manifest', manifest, mtime=image_mtime)
|
||||
|
|
Reference in a new issue