-
Notifications
You must be signed in to change notification settings - Fork 168
Document deployment state caching for local deployments #5301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release-13
Are you sure you want to change the base?
Conversation
Co-authored-by: IEvangelist <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great start, @copilot please address all feedback.
The `aspire deploy` command manages deployment state through cached configuration files stored locally on your machine. This caching mechanism streamlines repeated deployments by preserving provisioning settings and parameters, making subsequent deployments faster and more efficient. | ||
|
||
## Default behavior | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an introductory sentence, or short paragraph to describe this section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added introductory paragraph to the "Default behavior" section in commit 4ed162e.
|
||
### First deployment | ||
|
||
When you run `aspire deploy` for the first time, the command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the first time, or for the first time in a target --environment
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to clarify "for the first time, or for the first time in a target --environment
" in commit 4ed162e.
|
||
On subsequent `aspire deploy` executions, the command: | ||
|
||
1. Detects the existing deployment state file at `~/.aspire/deployments/{AppHostSha}/production.json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
References to files should be italicized, not code blocks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed file references to italics throughout the document in commit 4ed162e.
1. Proceeds with deployment using the cached values (no re-prompting). | ||
|
||
## Environment-specific deployments | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, please add an intro paragraph here. Perhaps use this opportunity to explain why environment-specific deploys are important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added introductory paragraph explaining the importance of environment-specific deployments in commit 4ed162e.
This behaves identically to using the `--environment` flag, loading the appropriate cached configuration file. | ||
|
||
## Cache management | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a brief introduction here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added brief introduction to the "Cache management" section in commit 4ed162e.
- **Path pattern:** `~/.aspire/deployments/{AppHostSha}/{environment}.json` | ||
- **Default environment:** `production` | ||
- **AppHostSha:** A hash value representing the application host configuration, ensuring deployment states are specific to each application configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Italic for files and paths. Also, need proper punctuation on all bullet lists.
- **Path pattern:** `~/.aspire/deployments/{AppHostSha}/{environment}.json` | |
- **Default environment:** `production` | |
- **AppHostSha:** A hash value representing the application host configuration, ensuring deployment states are specific to each application configuration. | |
- **Path pattern:** _~/.aspire/deployments/{AppHostSha}/{environment}.json_. | |
- **Default environment:** `production`. | |
- **AppHostSha:** A hash value representing the application host configuration, ensuring deployment states are specific to each application configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied formatting changes: italicized file paths and added proper punctuation to all bullet lists in commit 4ed162e.
- **Path pattern:** `~/.aspire/deployments/{AppHostSha}/{environment}.json` | ||
- **Default environment:** `production` | ||
- **AppHostSha:** A hash value representing the application host configuration, ensuring deployment states are specific to each application configuration. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be really nice to include a simple GitHub example, that conceptually describes and shows how to persist the local state using @actions/cache
or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a complete "Use deployment state in CI/CD pipelines" section with a GitHub Actions example showing how to cache deployment state using actions/cache
in commit 4ed162e. The example includes cache key strategies and a security caution about managing sensitive values.
Co-authored-by: IEvangelist <[email protected]>
Thoughts on this @captainsafia |
Overview
This PR adds comprehensive documentation for the deployment state caching feature introduced in Aspire 13, addressing issue #5187. The
aspire deploy
command now caches deployment state locally to streamline repeated deployments by preserving provisioning settings and parameters.Changes
New Documentation
Local deployment state article (
docs/deployment/aspire-deploy/local-deployment-state.md
)~/.aspire/deployments/{AppHostSha}/{environment}.json
--environment
flag--clear-cache
flagactions/cache
Updated CLI Reference
aspire deploy command reference (
docs/cli-reference/aspire-deploy.md
)--environment
flag: specifies the deployment environment name (defaults toproduction
)--clear-cache
flag: clears cached deployment state before deploying without persisting new valuesUpdated Deployment Guide
Azure Container Apps deployment guide (
docs/deployment/aspire-deploy/aca-deployment-aspire-cli.md
)Navigation
Table of contents (
docs/toc.yml
)Key Features Documented
production
,staging
, etc.) maintains its own isolated deployment state--clear-cache
flag for one-time deployments without persistenceCloses #5187
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Internal previews