| During an agent run, the agent makes multiple requests against the server, fetching plugins, requesting its catalog, submitting its report. It retrieves an entry from the environment cache for each of these actions. When we stop blocking requests during code deploys, it is possible for the environment to change over the course of these requests. For example, the agent might download plugins against one version of the env, then a deploy happens, and then it compiles the catalog against the newer version, which might require plugins that were not downloaded or that changed. We need a way to ensure that the agent uses the same version of the environment throughout its run, beyond just throughout a catalog compilation. It seems like this might entail allowing the agent to request a specific environment version after the initial node request, perhaps based on a version sent back in the response to that request. Docs about node requests: https://puppet.com/docs/puppet/latest/http_api/http_node.html |