fix: remove hosted-agent deploy session carryover#9150
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 21 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
🔗 Linked Issue RequiredThanks for the contribution! Please link a GitHub issue to this PR by adding |
| agentClient := agent_api.NewAgentClient(endpoint, cred) | ||
| carryOverSessionAfterDeploy(ctx, azdClient, agentClient, svc, envName) | ||
|
|
||
| return nil |
jongio
left a comment
There was a problem hiding this comment.
Two things look like they got left behind by this removal:
-
session_carryover.goandsession_carryover_test.goare now dead.captureSessionForCarryoverandcarryOverSessionAfterDeployhave no production callers after this change, and the rest of that file only exists to support those two. Go doesn't flag unused package functions, and the tests keep the unused-code linters quiet, so CI stays green even though none of it runs anymore. Is the plan to keep the plumbing for a follow-up, or should that file and its tests be removed with this change? -
The README still has the "Session carry-over across deploys" section telling users to
export AZD_AGENT_RESUME_SESSION_ON_DEPLOY=true. After this PR that variable is inert (sessionCarryoverEnabled()is only read from the now-dead functions), so the docs describe behavior that no longer exists. Worth updating or dropping that section in the same PR.
Why
Hosted-agent deployments should not retain a live agent session across versions. Removing this unrelated deploy behavior prevents a post-deploy invocation from resuming a prior session.
Approach
Removed the predeploy session capture and postdeploy session resume hooks while preserving the existing deployment setup, RBAC checks, activity bot handling, and optimization reporting.