2.1.x Agent Release - #427
Merged
Merged
Conversation
When a deployment spec references a prior deployment on the same host, DownloadBundle copies that deployment's unpacked archive and hard-links its bundle instead of downloading and extracting the revision again, which makes repeated deployments of the same revision substantially cheaper. Enabled by default; set enable_archive_reuse: false to always download. - Reuse falls back to a normal download whenever the referenced archive is missing, incomplete, or malformed, and never leaves a partial archive behind. - The referenced deployment id is validated before touching disk, and the AppSpec path is rejected if it climbs out of the archive. - Bundle-content hardening checks still run on every archive, reused or downloaded, as defense in depth. - The bundle ETag is carried forward on reuse so hooks keep seeing BUNDLE_ETAG even when the spec omits it. - Deployment diagnostics report whether the bundle was downloaded or reused, for observability. Bump the agent version to 2.1.0.
The hook re-stages what its own auto-fix (fmt, clippy --fix) touched, but used git diff --name-only, which lists every modified file in the tree - silently sweeping deliberately-unstaged edits into the commit. Remember the staged set before the fixers run and re-stage only those files.
gmiliaras
approved these changes
Sep 9, 2026
iskandarair
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes:
Added: Native support for the
RESTARTdeployment mode, which restarts the application on the target instances using the revision from the deployment group's last successful deployment, without downloading a new revision. The agent installs from the copy of the revision already on the instance. If that copy is missing or incomplete, the agent downloads the revision, so the deployment still completes. For the deployment mode itself, see deploymentMode in the AWS CodeDeploy API Reference.Technical: Restart Deployments come with a
ReuseArchiveFromDeploymentIdfield. When it is present, DownloadBundle is skipped if the requested deployment revision is present on the disk.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.