Skip to content

feat: Add an integration subcommand for manipulating integrations#776

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

feat: Add an integration subcommand for manipulating integrations#776
atheriel wants to merge 1 commit into
mainfrom
aj-integration-subcommand

Conversation

@atheriel
Copy link
Copy Markdown
Contributor

@atheriel atheriel commented Jun 1, 2026

Intent

This commit adds a suite of CLI commands for managing "OAuth" integrations:

$ rsconnect integration list
$ rsconnect integration show -g GUID
$ rsconnect integration add --template <key> [-N name] [-C key=value ...]
$ rsconnect integration edit -g GUID [-N name] [-C key=value ...]
$ rsconnect integration remove -g GUID
$ rsconnect integration templates list
$ rsconnect integration templates show --key <key>

The edit command merges --config fields with the existing config (fetching it only when config changes are requested), so users only need to specify fields they want to change.

ACLs can be passed via --allow-user and --allow-group.

Unit tests are included, as is autogenerated documentation.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change

Automated Tests

Unit tests are included. I also did a bunch of ad-hoc testing against a local Connect instance.

Directions for Reviewers

This is a pretty self-contained change, so the risk is low. To test it manually, try some of these out:

# Create
$ rsconnect integration add \
    -s https://connect.example.com -k $CONNECT_API_KEY \
    --template databricks \
    -N "Databricks Prod" \
    -C workspace_host=https://dbc-abc123.cloud.databricks.com \
    -C client_id=my-databricks-client \
    -C client_secret=my-databricks-secret

# Rename
$ rsconnect integration edit \
    -s https://connect.example.com -k $CONNECT_API_KEY \
    -g $INTEGRATION_GUID \
    -N "Databricks (Production)"

# Update
$ rsconnect integration edit \
    -s https://connect.example.com -k $CONNECT_API_KEY \
    -g $INTEGRATION_GUID \
    -C client_secret=my-new-databricks-secret

# Delete
$ rsconnect integration remove \
    -s https://connect.example.com -k $CONNECT_API_KEY \
    -g $INTEGRATION_GUID

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.

This commit adds a suite of CLI commands for managing "OAuth"
integrations:

    $ rsconnect integration list
    $ rsconnect integration show -g GUID
    $ rsconnect integration add --template <key> [-N name] [-C key=value ...]
    $ rsconnect integration edit -g GUID [-N name] [-C key=value ...]
    $ rsconnect integration remove -g GUID
    $ rsconnect integration templates list
    $ rsconnect integration templates show --key <key>

The `edit` command merges `--config` fields with the existing
config (fetching it only when config changes are requested), so users
only need to specify fields they want to change.

ACLs can be passed via `--allow-user` and `--allow-group`.

Unit tests are included, as is autogenerated documentation.

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-776/

Built to branch gh-pages at 2026-06-01 18:05 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
6345 4923 78% 0% 🟢

New Files

File Coverage Status
rsconnect/actions_integration.py 88% 🟢
TOTAL 88% 🟢

Modified Files

File Coverage Status
rsconnect/api.py 77% 🟢
rsconnect/main.py 73% 🟢
rsconnect/models.py 92% 🟢
TOTAL 81% 🟢

updated for commit: 7a5a3bb 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.

1 participant