Skip to content

2.1.x Agent Release - #427

Merged
filipdanic merged 2 commits into
mainfrom
2.1.x
Sep 9, 2026
Merged

2.1.x Agent Release#427
filipdanic merged 2 commits into
mainfrom
2.1.x

Conversation

@filipdanic

Copy link
Copy Markdown
Contributor

Description of changes:

Added: Native support for the RESTART deployment 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 ReuseArchiveFromDeploymentId field. 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.

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.
@filipdanic
filipdanic merged commit 0764f30 into main Sep 9, 2026
9 checks passed
@filipdanic
filipdanic deleted the 2.1.x branch September 9, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants