posit-dev / posit-dev/rsconnect-python

Implement flags for targeting an execution environment during deployment

未关闭
#652 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
37
派生
28
平均合并
1 天 3 小时
30 天内合并 PR
7

描述

Connect 2025.04 allows setting environment.identifier in the bundle's manifest.json. This new field allows the content to target a specific execution environment when running on Connect. The existing environment.image field remains unchanged however the semantics are slightly different. An image selection is now treated the same as any other piece of matching criteria. Connect will choose any execution environment that uses the specified container image.

We should add an --environment-id flag to both deploy <app> and write-manifest <app> - the value is the guid of the target execution environment in Connect and it should be written to environment.identifier in the manifest.json.

We should also add arguments the following arguments to deploy <app>: --default-image and --default-environment-id. These arguments accepts an image name and an execution environment guid respectively, however instead of writing these to the manfiest.json, we should update the App record in Connect to set the app.default_image_name and app.default_environment_guid fields. This new workflow allows users to call deploy <app> --default-image='my/custom/image:latest' or deploy <app> --default-environment-id='<env-guid>' only once and the image/environment will continue to be used for subsequent deployments (as long as it isn't overwritten by another deployment). This means that the arguments doesn't need to be provided every time deploy <app> is called, which is how the current --image flag behaves. This is the same workflow used by the Connect dashboard.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 deploy 和 write-manifest 的命令入口开始,然后检查现有的 --image flag 和环境字段是如何处理的。跟踪 default_image_name 和 default_environment_guid 的 Connect App 更新路径。完成的标准是:新 flag 写入请求的 manifest 值,或按指定持久化 App 默认值,并覆盖两个命令和 workflow。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api, cli
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。