Skip to content

feat: Add an environment subcommand for managing execution environments#778

Open
atheriel wants to merge 1 commit into
mainfrom
worktree-aj-environment-subcommand
Open

feat: Add an environment subcommand for managing execution environments#778
atheriel wants to merge 1 commit into
mainfrom
worktree-aj-environment-subcommand

Conversation

@atheriel
Copy link
Copy Markdown
Contributor

@atheriel atheriel commented Jun 1, 2026

Intent

This commit adds CLI commands for managing execution environments on Posit Connect:

$ rsconnect environment list
$ rsconnect environment show -g GUID
$ rsconnect environment add -I IMAGE [--title T] [--matching M] ...
$ rsconnect environment edit -g GUID [--title T] [--matching M] ...
$ rsconnect environment remove -g GUID

Unit tests are included, as is autogenerated documentation.

Closes #706.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change

Approach

The edit command uses GET-merge-PUT semantics (since the API uses PUT for full replacement), so users only need to specify the fields they want to change.

Permissions are managed via --allow-user and --allow-group flags on both add and edit. On edit, specifying these flags fully replaces existing permissions.

Automated Tests

Unit tests are included.

Directions for Reviewers

Checklist

  • I have updated CHANGELOG.md to cover notable changes.
  • I have updated all related GitHub issues to reflect their current state.
  • I have run the rsconnect-python-tests-at-night workflow in Connect against this feature branch.

…ents.

This commit adds CLI commands for managing execution environments
on Posit Connect:

    $ rsconnect environment list
    $ rsconnect environment show -g GUID
    $ rsconnect environment add -I IMAGE [--title T] [--matching M] ...
    $ rsconnect environment edit -g GUID [--title T] [--matching M] ...
    $ rsconnect environment remove -g GUID

The `edit` command uses GET-merge-PUT semantics (since the API uses
PUT for full replacement), so users only need to specify the fields
they want to change.

Permissions are managed via `--allow-user` and `--allow-group` flags
on both `add` and `edit`. On edit, specifying these flags fully
replaces existing permissions.

Unit tests are included, as is autogenerated documentation.

Closes #706.

Signed-off-by: Aaron Jacobs <[email protected]>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://posit-dev.github.io/rsconnect-python/pr-preview/pr-778/

Built to branch gh-pages at 2026-06-01 20:58 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
6328 4917 78% 0% 🟢

New Files

File Coverage Status
rsconnect/actions_environment.py 98% 🟢
TOTAL 98% 🟢

Modified Files

File Coverage Status
rsconnect/api.py 77% 🟢
rsconnect/main.py 72% 🟢
rsconnect/models.py 93% 🟢
TOTAL 81% 🟢

updated for commit: d00179f by action🐍

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.

support listing execution environments

1 participant