slackapi / deno-slack-sdk

SDK for building Run on Slack apps using Deno
https://api.slack.com/automation
MIT License
158 stars 27 forks source link

[QUERY] `slack upgrade`: should it require a valid auth token? #236

Closed arunsathiya closed 10 months ago

arunsathiya commented 10 months ago

(I'd file this issue on the Slack CLI project, but it seems to be a private repository)

Question

It seems that slack upgrade requires a valid auth token. Is that expected? I'd imagine that upgrading the CLI shouldn't require a valid auth token, similar to downloading the latest version manually.

Context

Ran into this error when setting up @hirefrank's GitPod template:

gitpod /workspace/slack-platform-gitpod (main) $ slack upgrade

🌱 A new version of the Slack CLI is available:
   v1.8.1 → 2.11.0

   You can read the release notes at:
   https://api.slack.com/future/changelog

   To manually update, visit the download page:
   https://api.slack.com/future/tools/cli/download

? 🚀 Do you want to auto-update to the latest version now? Yes
   Starting the auto-update...
Check /home/gitpod/.slack/slack-debug.log for full error logs

🚫  Error: Couldn't find a valid auth token for the Slack API (auth_prod_token_not_found)

Suggestion:

You need to be logged in to at least 1 production (slack.com) workspace to use this command. Please log in to one with the `slack login` command and try again.

Environment

gitpod /workspace/slack-platform-gitpod (main) $ deno --version
deno 1.37.2 (release, x86_64-unknown-linux-gnu)
v8 11.8.172.13
typescript 5.2.2
filmaj commented 10 months ago

Good question! I lean towards agreeing with you. Will raise it with the team.

cchensh commented 10 months ago

Hello @arunsathiya , thank you for the flag. To your question:

  1. The legacy version of Slack CLI requires auth token to perform upgrade
  2. We do not require auth token to upgrade Slack CLI anymore in the newer versions
  3. To unblock you, please go to https://api.slack.com/automation/quickstart to reinstall Slack CLI based on your platform.
hirefrank commented 10 months ago

@arunsathiya I'll look at updating my repo later today. Thanks for your interest in the platform!

On Mon, Oct 30, 2023, 10:40 AM Cheng Chen @.***> wrote:

Hello @arunsathiya https://github.com/arunsathiya , thank you for the flag. To your question:

  1. The legacy version of Slack CLI requires auth token to perform upgrade
  2. We do not require auth token to upgrade Slack CLI anymore in the newer versions
  3. To unblock you, please go to https://api.slack.com/automation/quickstart to reinstall Slack CLI based on your platform.

— Reply to this email directly, view it on GitHub https://github.com/slackapi/deno-slack-sdk/issues/236#issuecomment-1785362715, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABMW5QAI5WUEQIRUL37M6LYB635BAVCNFSM6AAAAAA6VDCG4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBVGM3DENZRGU . You are receiving this because you were mentioned.Message ID: @.***>

filmaj commented 10 months ago

Ah I failed to see that @arunsathiya was upgrading from v1.8 of the CLI - indeed a very old version.

Since slack upgrade no longer relies on a valid token, I will close this issue.

arunsathiya commented 10 months ago

Awesome, that explains it! Thanks everyone.