Skip to content

Add get_proxy_agent_aggregate_status to remove the disk write-permission dependency#363

Merged
ZhidongPeng merged 7 commits into
Azure:devfrom
ZhidongPeng:status
Jun 24, 2026
Merged

Add get_proxy_agent_aggregate_status to remove the disk write-permission dependency#363
ZhidongPeng merged 7 commits into
Azure:devfrom
ZhidongPeng:status

Conversation

@ZhidongPeng

@ZhidongPeng ZhidongPeng commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator
  • Currently GPA service passes its aggregated status to GPA VM Extension via status.json file, if the status folder is ready-only for whatever reason, GPA VM Extension will not be able to get the latest aggregated status.
  • GPA http server starts to accept /gpa-aggregated-status and return current aggregated status in json as response.
  • GPA VM Extension first try query the GPA server for aggregated status, if not available, fallback to read the status.json file.
  • Update max_binary_bytes for ProxyAgentExt as it starts to static link hyper client.

@ZhidongPeng ZhidongPeng changed the title Add get_proxy_agent_aggregate_status to remove the disk write-permis… Add get_proxy_agent_aggregate_status to remove the disk write-permission dependency Jun 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the VM extension’s dependency on reading GPA’s aggregated status from a writable status.json by adding a localhost HTTP endpoint that serves the aggregated status, with the extension falling back to file reads if the endpoint is unavailable.

Changes:

  • Add a /gpa-aggregated-status endpoint to the proxy agent HTTP server to return the current aggregated status as JSON.
  • Add shared client helpers to fetch aggregated status from the server first, then fall back to reading status.json, and update the extension to use this flow.
  • Centralize proxy agent IP/port constants in proxy_agent_shared and update binary bloat budgets.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
proxy_agent/src/proxy/proxy_server.rs Routes and serves the new aggregated-status endpoint from the GPA HTTP listener.
proxy_agent/src/proxy_agent_status.rs Refactors status-building helpers and exposes an async aggregate-status getter for the server endpoint.
proxy_agent/src/common/constants.rs Re-exports proxy agent IP/port from the shared crate to unify constants.
proxy_agent_shared/src/server_mock.rs Extends the mock server to respond to the new aggregated-status endpoint for tests.
proxy_agent_shared/src/proxy_agent_aggregate_status.rs Adds the endpoint path constant and server-first/fallback-to-file aggregate-status retrieval helpers.
proxy_agent_shared/src/error.rs Adds a new error variant for combined server+file aggregate-status retrieval failures.
proxy_agent_shared/src/constants.rs Defines shared PROXY_AGENT_IP / PROXY_AGENT_PORT.
proxy_agent_extension/src/service_main.rs Uses server-first aggregate-status retrieval for version checks and status reporting.
proxy_agent_extension/src/error.rs Adds conversion support for bubbling up proxy_agent_shared::error::Error.
proxy_agent_extension/src/constants.rs Renames the state event key to reflect aggregate-status retrieval (server/file).
.github/workflows/bloat.yml Adjusts bloat budget thresholds for ProxyAgentExt builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread proxy_agent/src/proxy/proxy_server.rs Outdated
Comment thread proxy_agent/src/proxy/proxy_server.rs
Comment thread proxy_agent_shared/src/proxy_agent_aggregate_status.rs Outdated
Comment thread proxy_agent_shared/src/error.rs Outdated
Comment thread .github/workflows/bloat.yml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Comment thread proxy_agent/src/proxy/proxy_server.rs
Comment thread proxy_agent/src/proxy/proxy_server.rs
Comment thread proxy_agent_shared/src/error.rs
@ZhidongPeng ZhidongPeng enabled auto-merge (squash) June 23, 2026 21:33
@srikrishnaveturi srikrishnaveturi self-requested a review June 24, 2026 18:31
@ZhidongPeng ZhidongPeng merged commit 990e8cb into Azure:dev Jun 24, 2026
24 checks passed
@ZhidongPeng ZhidongPeng deleted the status branch June 24, 2026 18:54
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