Skip to content

chore(auth): merge old profiles - #303

Draft
Cedric / ViaDézo1er (viadezo1er) wants to merge 2 commits into
mainfrom
cedric/merge-old-profiles-after-migration
Draft

chore(auth): merge old profiles#303
Cedric / ViaDézo1er (viadezo1er) wants to merge 2 commits into
mainfrom
cedric/merge-old-profiles-after-migration

Conversation

@viadezo1er

@viadezo1er Cedric / ViaDézo1er (viadezo1er) commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

bt <= 0.15.1 often has create multiple profiles for the same OAuth login to use different orgs.
It's not the case anymore since 0.16.0
However the profiles are not merged together, and their default names are names of org, which can be confusing since profiles and orgs are decoupled now.

So first, merge the profiles that share app/api url, username and user email.
Second, rename the profiles.

When the profiles don't have the org name, they keep the specific name.
eg:
profile name/org name
a a
b b
z c
x d
If they all share api/app url and user name/email, a and b have the same names for profiles and org so their names will be dumped and the merged profile name will be z-x since the profiles z and x have a specific name.

Updating the profile names is however an issue for local config.json created in 0.16.0, since they store the profile name.
bt <= 0.15.1 does not.
Is it an issue to break the local config created in 0.16.0?

Also this migration code could probably be deleted one day when it's safe to assume (almost) everyone has migrated.

@viadezo1er
Cedric / ViaDézo1er (viadezo1er) force-pushed the cedric/merge-old-profiles-after-migration branch from 9818217 to d6db3dc Compare August 13, 2026 02:00
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Latest downloadable build artifacts for this PR commit 7cea9c8821fc:

Available artifact names
  • artifacts-build-global
  • artifacts-build-local-aarch64-pc-windows-msvc
  • artifacts-build-local-x86_64-apple-darwin
  • artifacts-build-local-x86_64-pc-windows-msvc
  • artifacts-build-local-aarch64-apple-darwin
  • artifacts-build-local-x86_64-unknown-linux-musl
  • artifacts-build-local-x86_64-unknown-linux-gnu
  • artifacts-build-local-aarch64-unknown-linux-gnu
  • artifacts-plan-dist-manifest
  • cargo-dist-cache

Join multiple `--profile` names instead of discarding them, uniquify the
synthesized target, and only strand a merge when the target has no credential
Sign up for free to 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.

1 participant