Skip to content

CLI should warn when a newer version is available #779

@nealrichardson

Description

@nealrichardson

Problem

Users can end up running very outdated versions of rsconnect-python without realizing it. When the CLI hits removed API endpoints on newer versions of Connect, the error messages are confusing (e.g., 404 Not Found on /__api__/applications/{id}/upload) and don't hint that upgrading the tool would fix the problem.

Proposal

Add a version check that runs on CLI invocation (or at least on deploy commands) and prints a notice if a newer version is available on PyPI. Something like:

WARNING: You are using rsconnect version 0.1.3; however, version 1.29.0 is available.
You should consider upgrading via the 'pip install --upgrade rsconnect' command.

This is similar to how pip itself warns about outdated versions, and how conda shows "A newer version of conda exists."

Considerations

  • The check should be non-blocking and fail silently (don't break deploys if PyPI is unreachable)
  • Could cache the check result for some period (e.g., 24 hours) to avoid slowing down every invocation
  • Could be disableable via a flag or environment variable (e.g., RSCONNECT_NO_UPDATE_CHECK=1)
  • Should only print to stderr so it doesn't interfere with scripted/CI usage

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions