Repository navigation
Conversation
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
3 tasks done
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #809 +/- ##
==========================================
+ Coverage 80.18% 80.24% +0.06%
==========================================
Files 244 244
Lines 18736 18778 +42
==========================================
+ Hits 15024 15069 +45
+ Misses 3712 3709 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-authored-by: Michael Brooks <21328+mwbrooks@users.noreply.github.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
WilliamBergamin
left a comment
Contributor
There was a problem hiding this comment.
🧪 Thanks @zimeg! Checking both fields after every row, then running a second background check, pins the retry window nicely.
Left a few comments, nothing blocking 💯
| checkErr = err | ||
| } | ||
| if _, ok := v.(*CLIDependency); ok { | ||
| cliCheckFailed = true |
Contributor
There was a problem hiding this comment.
💯 praise: Counting only the Slack CLI check as a failure keeps a broken project hook from turning on hourly retries.
Co-authored-by: William Bergamin <25348381+WilliamBergamin@users.noreply.github.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…nto zimeg-fix-retry-failed-update-check
Co-authored-by: William Bergamin <25348381+WilliamBergamin@users.noreply.github.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog
The Slack CLI now checks for updates again after about an hour when a check fails, such as while offline, instead of waiting a full day.
Summary
This pull request checks for a Slack CLI update again after about 1 hour when the check fails, instead of waiting 24 hours.
last_update_checked_atwith the current time, even when the Slack CLI metadata couldn't be fetched. One command run offline delayed the next update notice by a full day.last_update_check_failed_atfield inconfig.jsonto the current time and leaveslast_update_checked_atalone, soslack doctorstill shows the last successful check.last_update_checked_at, as before, and removeslast_update_check_failed_at.check-updatehook is specific to a project, so it counts as a successful check and waits the usual 24 hours.Stacked on #808.
Testing
With a build of this branch and an empty config folder (
mkdir -p /tmp/fix-check):HTTPS_PROXY=http://127.0.0.1:9 ./bin/slack upgrade --config-dir /tmp/fix-checkerrors withcli_update_check_error(from fix: report a failed update check from the upgrade command #808) and exits 1. At 12:09:54 it wrote"last_update_check_failed_at": "2026-11-18T12:09:54-08:00"and leftlast_update_checked_atunset.HTTPS_PROXY=http://127.0.0.1:9 ./bin/slack auth list --config-dir /tmp/fix-check --verboseright after prints "You are not logged in to any Slack accounts", exits 0, logs noCheckForUpdate, and leaves both fields unchanged.last_update_check_failed_atedited to 2 hours ago, the sameauth listruns the background check, logsCheckForUpdate for *update.CLIDependency failedonly in the debug output, exits 0, and moveslast_update_check_failed_atto the current time (12:10:06)../bin/slack upgrade --config-dir /tmp/fix-checkwhile online prints "✔ You are using the latest Slack CLI version", exits 0, stampslast_update_checked_at(12:10:06), and removeslast_update_check_failed_at../bin/slack doctor --config-dir /tmp/fix-checkthen showsLast updated: 2026-11-18 12:10:06 -08:00.Notes
omitzeroso that clearing it removes the key.omitemptydoesn't omit a zerotime.Time. Because of that, a config whose only check so far failed shows"last_update_checked_at": "0001-01-01T00:00:00Z". A zero time is treated as never checked, as onmain.slack upgrade) always runs, even within an hour of a failure.Test_UpdateNotification_CheckForUpdatechecks both fields after each check: a failure setslast_update_check_failed_atand leaves the stamp, a background check within 1 hour of a failure skips, one after 1 hour runs, a failure time in the future counts as expired, a recent success still waits 24 hours after an older failure, a success clears the field, and a hook-only failure counts as a success. Each case also checks that a background check right after is skipped.Test_Config_GetLastUpdateCheckFailedAtandTest_Config_SetLastUpdateCheckFailedAtcover reading the field and removing its key. Each case fails without the change it covers.Requirements
🤖 Generated with Claude Code