Skip to content

Replace deprecated account email with account name in auth status #26

@weppos

Description

@weppos

Summary

The CLI currently enriches auth status (and any future whoami-style output) using the email field of the Account API resource. That field is deprecated as part of dnsimple/dnsimple-business#2318, which removed the notion of an "account email". Once the API stops returning it, our enrichment will silently render a blank label next to the account ID.

We need to switch the CLI to use the account name as the human-readable identifier, once the API exposes it and the Go client is released with the change.

Background

  • dnsimple/dnsimple-business#2318 — closed — removed the concept of an account email and introduced a separate "notification email" plus "domain push identifier".
  • dnsimple/dnsimple-engineering#425 — open — tracks the corresponding API + API client work. Its acceptance criteria explicitly include:

    Add account name to /whoami, /accounts, /accounts/id

  • The motivation for opening this CLI ticket was discussed in dnsimple/dnsimple-engineering#425 (comment): while fixing auth switch silently accepts invalid accounts and auth status ignores stored default #25 we noticed the SDK still exposes only email and there is no replacement field yet.

Current state

internal/cli/auth.go populates data.AccountEmail from Account.Email via Accounts.ListAccounts. Today the dnsimple-go v8.x Account struct only exposes:

type Account struct {
    ID             int64
    Email          string
    PlanIdentifier string
    CreatedAt      string
    UpdatedAt      string
}

There is no Name field yet, so we cannot make the change in the CLI in isolation.

Dependencies

This ticket is blocked on:

  • dnsimple/dnsimple-engineering#425 (API + SDK update)
  • A new dnsimple-go release that exposes the new field

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions