Repository navigation
Commit bdd24cf
Apply the timeout to the auth token inline login (#7267)
## Changes
`runInlineLogin` in `databricks auth token` now creates its timeout
context before `NewPersistentAuth`, as `databricks auth login` does.
## Why
Follow-up to [this
review](#7196 (review))
on #7196.
`PersistentAuth.Challenge` uses the context passed to
`NewPersistentAuth`, but the timeout context was created after it, so
the one hour timeout never applied. Closing the browser tab left `auth
token` waiting until Ctrl+C.
## Tests
- `cmd/auth` unit tests pass.
- No new test: covering it would need the one hour `defaultTimeout` to
be injectable.
This pull request and its description were written by Isaac.
---------
Co-authored-by: Isaac <no-reply@databricks.com>1 parent a7e6114 commit bdd24cf
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
455 | 461 | | |
456 | 462 | | |
457 | 463 | | |
458 | 464 | | |
459 | 465 | | |
460 | 466 | | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | 467 | | |
465 | 468 | | |
466 | 469 | | |
| |||
0 commit comments