Skip to content

Unhide auth logout and add traceability comments - #4719

Merged
mihaimitrea-db merged 8 commits into
mainfrom
mihaimitrea-db/auth-logout-followup
Apr 10, 2026
Merged

Unhide auth logout and add traceability comments#4719
mihaimitrea-db merged 8 commits into
mainfrom
mihaimitrea-db/auth-logout-followup

Conversation

@mihaimitrea-db

@mihaimitrea-dbmihaimitrea-db commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Changes

Why

The auth logout feature was implemented across three stacked PRs (#4613, #4616, #4647) that were squashed into one commit on merge. The commit title only references the last PR ("Extract shared SelectProfile helper"), so auth logout itself has no changelog entry and no git-blame traceability.

This followup restores that context, unhides the command for users, and adds the missing changelog entry.

Tests

No functional changes; existing unit and acceptance tests for auth logout continue to pass.

The auth logout feature (PRs #4613, #4616, #4647) was squashed into a
single commit cb3c326 titled after #4647 only, losing traceability for
the new command itself. This followup:
- Adds a comment block to logout.go linking each original PR with its
commit range and purpose.
- Adds a NEXT_CHANGELOG entry for auth logout under CLI.
- Removes Hidden: true so the command appears in help and completion.
- Aligns the Long description with the public documentation.
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Mar 12, 2026

Copy link
Copy Markdown
Collaborator

Commit: be532db

Run: 23135561803

Env🟨​KNOWN🔄​flaky💚​RECOVERED🙈​SKIP✅​pass🙈​skipTime
🟨​aws linux7172687877:50
🟨​aws windows7172707857:01
🔄​aws-ucws linux2773647027:39
🔄​aws-ucws windows2773667006:44
🔄​azure linux292717859:57
💚​azure windows292737837:33
🔄​azure-ucws linux21936969852:36
🔄​azure-ucws windows2193716967:04
💚​gcp linux292677889:17
💚​gcp windows292697867:53
16 interesting tests: 7 KNOWN, 7 SKIP, 2 flaky
Test Nameaws linuxaws windowsaws-ucws linuxaws-ucws windowsazure linuxazure windowsazure-ucws linuxazure-ucws windowsgcp linuxgcp windows
🟨​TestAccept🟨​K🟨​K💚​R🔄​f🔄​f💚​R💚​R💚​R💚​R💚​R
🙈​TestAccept/bundle/resources/permissions🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🟨​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions🟨​K🟨​K💚​R💚​R🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🟨​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct🟨​K🟨​K💚​R💚​R
🟨​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform🟨​K🟨​K💚​R💚​R
🟨​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions🟨​K🟨​K💚​R💚​R🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🟨​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct🟨​K🟨​K💚​R💚​R
🟨​TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform🟨​K🟨​K💚​R💚​R
🙈​TestAccept/bundle/resources/postgres_branches/basic🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_branches/recreate🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_branches/update_protected🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_branches/without_branch_id🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/postgres_endpoints/recreate🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/synced_database_tables/basic🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🔄​TestAccept/ssh/connect-serverless-gpu🙈​s🙈​s🔄​f🔄​f🙈​s🙈​s🔄​f🔄​f🙈​s🙈​s
🔄​TestAccept/ssh/connection💚​R💚​R🔄​f💚​R🔄​f💚​R🔄​f🔄​f💚​R💚​R
Top 27 slowest tests (at least 2 minutes):
durationenvtestname
6:33gcp linuxTestAccept/ssh/connection
6:05azure windowsTestSecretsPutSecretStringValue
5:30gcp windowsTestAccept/ssh/connection
5:28gcp linuxTestSecretsPutSecretStringValue
5:04azure windowsTestAccept/ssh/connection
4:43azure linuxTestSecretsPutSecretStringValue
4:35gcp windowsTestSecretsPutSecretStringValue
3:41gcp linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:40azure-ucws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:38gcp linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:28aws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:18aws-ucws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:15aws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:08gcp windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:08gcp windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:45aws-ucws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:41azure linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:40aws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:40aws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:37aws-ucws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:11azure-ucws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:11azure windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:10aws-ucws linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:09azure-ucws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:08azure-ucws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:06azure windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:04azure linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct

@simonfaltumsimonfaltum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review from OpenCode + Isaac (2-round swarm review).

Verdict: Approved with a few suggestions on the help text.

0 Critical | 0 Major | 0 Gap | 4 Nit | 1 Suggestion

Comment threadcmd/auth/logout.go Outdated
Comment threadcmd/auth/logout.go Outdated
Comment on lines +60 to +75
Command behavior:

1. If you specify --profile, the command logs out of that profile. In an
interactive terminal you'll be asked to confirm unless --force is set.

2. If you omit --profile in an interactive terminal, you'll be shown
an interactive picker listing all profiles from your configuration file.
You can search by profile name, host, or account ID. After selecting a
profile, you'll be asked to confirm unless --force is specified.
interactive terminal, it asks for confirmation unless you also specify
--force.

3. If you omit --profile in a non-interactive environment (e.g. CI/CD pipeline),
the command will fail with an error asking you to specify --profile.
2. If you omit --profile in an interactive terminal, the command shows a
searchable profile picker. You can search by profile name, host, or
account ID. After you select a profile, the command asks for confirmation
unless you also specify --force.

4. Use --force to skip the confirmation prompt. This is required when
running in non-interactive environments.
3. If you omit --profile in a non-interactive environment, the command fails
and asks you to specify --profile.

5. Use --delete to also remove the selected profile from ~/.databrickscfg.`,
4. In a non-interactive environment, use --profile together with --force to
skip confirmation.`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nit] The old description had 5 numbered items with a dedicated point for --delete. The new list covers --force (item 4) but drops --delete, which is only mentioned in the opening paragraph. This creates an asymmetry where --force gets its own item but --delete does not. Consider adding an item like: "Use --delete to also remove the profile from the configuration file."

Also: I believe we are introducing a global --yes flag in a separate PR. Once that lands, --force here should probably be replaced with --yes for consistency. Worth noting as a follow-up.

@mihaimitrea-dbmihaimitrea-dbMar 16, 2026

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I am waiting for the --yes PR to be merged. Then I will create a PR for that change to ensure we are not releasing this command while also making changes to it. After that is fine we can merge this one.

Comment threadcmd/auth/logout.go Outdated
Comment threadcmd/auth/logout.go Outdated
Comment threadcmd/auth/logout.go Outdated
Clarify shared token cleanup and align the help text with the actual non-interactive and --delete behavior so the public description is less misleading.
…ogout-followup
# Conflicts:
#	cmd/auth/logout.go
…ogout-followup
# Conflicts:
#	cmd/auth/logout.go

@simonfaltumsimonfaltum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is the actual "unhiding" happening? this is all text updates?

Comment threadcmd/auth/logout.go Outdated
// The auth logout command was implemented across three stacked PRs that were
// inadvertently squashed into a single commit cb3c326 (titled after #4647 only):
//
// - #4613: core logout command with --profile, --force,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still mentions --force

- Remove Hidden: true so the command appears in help and tab completion.
- Add paragraph about token cleanup only applying to databricks-auth-login
profiles and shared token handling.
- Update traceability comment to reflect --force → --auto-approve rename.
- Fix changelog bullet style (- to *) for consistency.
@mihaimitrea-db
mihaimitrea-db added this pull request to the merge queueApr 10, 2026
Merged via the queue into main with commit a072b6cApr 10, 2026
22 checks passed
@mihaimitrea-db
mihaimitrea-db deleted the mihaimitrea-db/auth-logout-followup branch April 10, 2026 14:26
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
- Add a traceability comment block at the top of `cmd/auth/logout.go`
linking to the three original PRs (#4613, #4616, #4647). These PRs were
inadvertently squashed into a single commit `48eb749` titled after #4647
only.
- The comment reflects the `--force` → `--auto-approve` rename from
#4755.
- Add a `NEXT_CHANGELOG.md` entry for `auth logout` under the CLI
section.
- Remove `Hidden: true` from the logout command so it appears in
`databricks auth -h` and tab completion.
- Improve the command's long description to:
- Document that token cleanup only applies to profiles created by
`databricks auth login`
- Note that logging out of one profile does not affect others sharing
the same cached token
- Condense the numbered items (drop the redundant `--auto-approve` item
since it's already mentioned in items 1 and 2; fold `--delete` into a
single item)
## Why
The `auth logout` feature was implemented across three stacked PRs
(#4613, #4616, #4647) that were squashed into one commit on merge. The
commit title only references the last PR ("Extract shared SelectProfile
helper"), so `auth logout` itself has no changelog entry and no
git-blame traceability.
This followup restores that context, unhides the command for users, and
adds the missing changelog entry.
## Tests
No functional changes; existing unit and acceptance tests for `auth
logout` continue to pass.
---------
Co-authored-by: simon <simon.faltum@databricks.com>
Sign up for freeto 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.

3 participants

@mihaimitrea-db@eng-dev-ecosystem-bot@simonfaltum