Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.

feat(cli): add runpod-flash deprecation notice - #387

Merged
deanq merged 2 commits into
mainfrom
deanq/sls-684-flash-deprecation-notice
Oct 13, 2026
Merged

deanq merged 2 commits into
mainfrom
deanq/sls-684-flash-deprecation-notice

Conversation

@deanq

@deanq deanq commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Flash is moving into the Runpod Python SDK 2.0. runpod-flash is deprecated on October 29, 2026 and receives no fixes or updates after that date. This adds the user-facing notice ahead of the cutover.

Notice text:

Flash is moving into the Runpod Python SDK 2.0. runpod-flash will be deprecated on October 29, 2026 and will receive no fixes or updates after that date. Migration guide: https://docs.runpod.io/sdk/migrate-from-flash

Behavior

Surface Channel Notes
flash <any invocation> stderr printed before argument parsing, so flash, flash --help, and invalid commands show it too; stdout stays parseable (flash --version)
SDK (from runpod_flash import Endpoint) FutureWarning first public-API access, attributed to the caller's import line
Deployed workers (RUNPOD_ENDPOINT_ID / RUNPOD_POD_ID) none avoids per-cold-start log noise where nobody can act on it
RUNPOD_FLASH_SILENCE_DEPRECATION=1 none CI escape hatch for both channels
  • Fires once per process across both channels: the CLI banner suppresses the later import warning.
  • FutureWarning rather than DeprecationWarning: Python hides DeprecationWarning by default unless triggered from __main__, so most users would never see it. Standard filters still work (PYTHONWARNINGS=ignore::FutureWarning).
  • Copy omits pip install runpod: until 2.0 is GA that resolves to 1.x (2.0 is currently 2.0.0rc1). The migration guide carries install instructions.

Notes for review

  • The migration guide URL is not live yet (docs pending publish). It is a single constant in sunset.py if it changes.
  • flash dev serves user code in a separate process the CLI does not control, so users may see the CLI banner plus one import warning from that process.
  • flash init skeleton templates still reference runpod_flash; left as is since the package works until the 29th.

Test plan

  • tests/unit/test_sunset.py (24 tests): message content, once-per-process, caller attribution, worker skip, CLI stderr vs stdout, parse-time exits (no args, --help, subcommand help, invalid command), CLI-suppresses-import, silence env var truthy/falsy values
  • Mutation check: disabling the worker guard and the CLI dedupe each fail the corresponding tests
  • Manual: flash, flash --help, flash bogus (notice on stderr), flash --version (notice on stderr, version on stdout), python user_script.py (FutureWarning at import line), same with RUNPOD_ENDPOINT_ID set (silent)
  • make quality-check: 2704 passed, coverage 86.67%

Refs SLS-684

🤖 Generated with Claude Code

@deanq
deanq requested review from KAJdev and a balanced review from Copilot October 13, 2026 18:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Root help paths miss the notice, and CLI notices are not suppressed in deployed worker environments.

2 open findings
What changed in this PR

Adds user-facing deprecation notices for the CLI and public SDK APIs while suppressing worker and CI noise.

Changes:

  • Adds centralized sunset messaging and suppression logic.
  • Integrates notices into CLI and lazy SDK imports.
  • Adds comprehensive notice tests.
File Description
src/​runpod_flash/​sunset.py Implements notice behavior.
src/​runpod_flash/​cli/​main.py Displays the CLI notice.
src/​runpod_flash/​__init__.py Warns on public API access.
tests/​unit/​test_sunset.py Tests notice and suppression behavior.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/runpod_flash/cli/main.py Resolved
Comment thread src/runpod_flash/sunset.py Resolved
deanq added 2 commits October 13, 2026 11:45
Flash is moving into the Runpod Python SDK 2.0. runpod-flash is
deprecated on October 29, 2026 and receives no fixes or updates after
that date. Surface this to users before the cutover.

- CLI prints the notice to stderr on every flash command; stdout stays
  parseable (flash --version)
- SDK emits a one-time FutureWarning on first public API access,
  attributed to the caller's import line. FutureWarning instead of
  DeprecationWarning because the latter is hidden by default
- Notice fires once per process across both channels
- Skipped on deployed workers (RUNPOD_ENDPOINT_ID / RUNPOD_POD_ID) to
  avoid per-cold-start log noise
- RUNPOD_FLASH_SILENCE_DEPRECATION=1 silences both channels for CI

Refs SLS-684
The app callback runs only after Click parses the root command, so
`flash`, `flash --help`, and invalid commands exited without the
notice. Print it from a custom root group's main() instead, which runs
before parsing for both the installed entry point and CliRunner.

Refs SLS-684
@deanq
deanq force-pushed the deanq/sls-684-flash-deprecation-notice branch from c2b2bdc to 6b7c613 Compare October 13, 2026 18:48
@deanq
deanq merged commit 25bd210 into main Oct 13, 2026
10 checks passed
@deanq
deanq deleted the deanq/sls-684-flash-deprecation-notice branch October 13, 2026 19:01
deanq added a commit that referenced this pull request Oct 14, 2026
Mirror the CLI/SDK sunset notice from #387 at the top of the README
so the deprecation is visible on GitHub and PyPI, and document the
RUNPOD_FLASH_SILENCE_DEPRECATION escape hatch.

Refs SLS-684
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants