-
Couldn't load subscription status.
- Fork 168
Document deployment state caching #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 <7679720+IEvangelist@users.noreply.github.com>
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 <7679720+IEvangelist@users.noreply.github.com>
|
Thoughts on this @captainsafia |
|
Hey @copilot please move this out of the Azure TOC section, as it's not specific to Azure. Also, please rename the doc, the H1 and the TOC entry to Deployment state caching. |
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Moved the documentation out of the Azure TOC section to sit directly under "Publish and Deploy" in commit 5ab8d29. Also renamed:
Updated all references and added a redirect for the old URL. |
| run: aspire deploy --environment production | ||
| env: | ||
| AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }} | ||
| ``` |
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.
Hey @copilot do we need to also cache the deployment state after the deploy here too?
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.
The actions/cache@v4 action automatically saves the cache after the job completes successfully - no additional step needed. Updated the explanation in commit 2d0bdce to explicitly mention that the cache is automatically saved after the deployment step runs.
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
deployment/aspire-deploy/local-deployment-state.mdOriginal 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