Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fleetctl preview: if license key invalid, hangs with no feedback #22884

Closed
5 tasks
mikermcneil opened this issue Oct 11, 2024 · 7 comments
Closed
5 tasks

fleetctl preview: if license key invalid, hangs with no feedback #22884

mikermcneil opened this issue Oct 11, 2024 · 7 comments
Assignees
Labels
bug Something isn't working as documented #g-orchestration Orchestration product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. ~released bug This bug was found in a stable release.
Milestone

Comments

@mikermcneil
Copy link
Member

mikermcneil commented Oct 11, 2024

Fleet version: fleetctl 4.53.1


πŸ’₯ Β Actual behavior

Screenshot 2024-10-30 at 2 04 55β€―PM

πŸ§‘β€πŸ’» Β Steps to reproduce

  1. Run fleetctl preview --license-key bogus

πŸ•―οΈ More info (optional)

N/A

πŸ› οΈ To fix

Figma

πŸ¦† Test Plan

New functionality:

  • Fails with proper error on --license-key set to various bogus values

Regresssion testing (see licenses embedded in serve.go ~L1331):

  • Succeeds with valid license key
  • Succeeds with expired license key (same as main app)
  • Succeeds with no license key
  • Succeeds with --license-key provided but nothing after it
@mikermcneil mikermcneil added :product Product Design department (shows up on 🦒 Drafting board) ~feature fest Will be reviewed at next Feature Fest labels Oct 11, 2024
@mikermcneil mikermcneil changed the title fleetctl preview: if license key invalid, then show error (instead of hanging with no feedback) fleetctl preview: if license key invalid, then show error (instead of folks' first-time experience being that it hangs with no feedback) Oct 11, 2024
@alexfornuto
Copy link

Lemme help fill out some deets

Problem

A user might not successfully copy the entire license key when running fleetctl commands that require it, or may supply a complete but otherwise invalid key. In these cases, the output hangs until cancelled with no error output.

Potential solutions

  • before execution, check the size of the license key provided.
  • during execution, if the key is invalid return exit non-zero with relevant error message to the terminal.

@noahtalerman noahtalerman added ~feature fest Will be reviewed at next Feature Fest and removed ~feature fest Will be reviewed at next Feature Fest :product Product Design department (shows up on 🦒 Drafting board) labels Oct 24, 2024
@rachaelshaw rachaelshaw added Epic DO NOT USE. Auto-created by ZenHub, cannot be disabled. and removed Epic DO NOT USE. Auto-created by ZenHub, cannot be disabled. ~feature fest Will be reviewed at next Feature Fest labels Oct 25, 2024
@rachaelshaw
Copy link
Member

  • @noahtalerman: User requested this because they want an easy to understand error message when they use an invalid license key when trying out Fleet for the first time.

@rachaelshaw rachaelshaw changed the title fleetctl preview: if license key invalid, then show error (instead of folks' first-time experience being that it hangs with no feedback) fleetctl preview: if license key invalid, hangs with no feedback Oct 31, 2024
@rachaelshaw rachaelshaw added bug Something isn't working as documented :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. #g-endpoint-ops Endpoint ops product group :incoming New issue in triage process. labels Oct 31, 2024
@lukeheath lukeheath added the ~released bug This bug was found in a stable release. label Nov 1, 2024
@sharon-fdm
Copy link
Collaborator

Hey team! Please add your planning poker estimate with Zenhub @iansltx @lucasmrod @mostlikelee

@sharon-fdm sharon-fdm removed the :incoming New issue in triage process. label Nov 18, 2024
@iansltx iansltx added this to the 4.62.0-tentative milestone Dec 9, 2024
iansltx added a commit that referenced this issue Dec 11, 2024
)

For #22884

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
@jmwatts
Copy link
Member

jmwatts commented Dec 26, 2024

@rachaelshaw I tested this with the fix in place, can you confirm the following is correct? Specifically the last test that said it should work actually does not and it gives me an error.

New functionality:

  • [PASS] Fails with proper error on --license-key set to various bogus values
    Error: License key is invalid. Please check your license key and try again, or run fleetctl preview without the --license-key option to try Fleet Free.

Regression testing (see licenses embedded in serve.go ~L1331):

  • [PASS] Succeeds with valid license key
  • [PASS] Succeeds with expired license key (same as main app) [Get a lot of errors and banner in app though]
  • [PASS] Succeeds with no license key
  • [FAIL] Succeeds with --license-key provided but nothing after it [this tells me Error: flag needs an argument: -license-key]
Screenshot 2024-12-26 at 5 09 01β€―PM

@iansltx
Copy link
Member

iansltx commented Dec 27, 2024

@jmwatts So, I was the one who added that test plan and I thought that the license key with no argument following it worked in v4.61.0, so i included it in the regression test. I was incorrect here; 4.61.0 hands back the same error when you don't provide an arg after the --license-key flag (which is fine; the command docs are clear that you need to add the license key in if you provide the flag).

I think what I meant to type there was --license-key "", which does work on 4.61.0, and should work on main.

@jmwatts
Copy link
Member

jmwatts commented Dec 27, 2024

@iansltx thanks for the clarification!
Just re-tested with --license-key '' and it worked. This one is good to go!

@sharon-fdm sharon-fdm added #g-orchestration Orchestration product group and removed #g-endpoint-ops Endpoint ops product group labels Jan 2, 2025
@fleet-release
Copy link
Contributor

Invalid key hangs tight,
With feedback, users find light,
Fleet sails smooth and right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as documented #g-orchestration Orchestration product group :release Ready to write code. Scheduled in a release. See "Making changes" in handbook. ~released bug This bug was found in a stable release.
Development

No branches or pull requests

9 participants