Skip to content

fix(framework): Show update check consistently#6936

Closed
chongshenng wants to merge 1 commit intomainfrom
fix-update-display
Closed

fix(framework): Show update check consistently#6936
chongshenng wants to merge 1 commit intomainfrom
fix-update-display

Conversation

@chongshenng
Copy link
Copy Markdown
Member

Description:

The update check message was not reliably shown to users due to two issues:

  1. --version flag skipped the update check entirely. For flower-superlink, flower-supernode, and flower-superexec, warn_if_flwr_update_available() was called after parse_args(). Since --version uses argparse's action="version", it exits during parse_args() before the update check runs — meaning the cache file is never even created.
  2. The 12-hour display throttle suppressed the message on re-runs. After showing the message once, last_shown_at was recorded and subsequent invocations within 12 hours were silenced. This meant flower-superlink --insecure would generate the cache on the first run but not show the message on re-run.

Changes:

  1. Move warn_if_flwr_update_available() before parse_args() in run_superlink(), flower_supernode(), and flower_superexec() so the update check runs even for --version.
  2. Remove the 12-hour display throttle — the update message now prints on every invocation when a cached update is available.
  3. Remove _mark_cached_flwr_update_message_shown() and all last_shown_at bookkeeping (no longer needed).
  4. Update tests to reflect the new always-show

@chongshenng
Copy link
Copy Markdown
Member Author

Closed in favor of #6939 6938

@chongshenng chongshenng closed this Apr 2, 2026
@chongshenng chongshenng deleted the fix-update-display branch April 2, 2026 14:40
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