Skip to content

Conversation

@bytesizedroll
Copy link
Contributor

@bytesizedroll bytesizedroll commented Jan 21, 2026

Summary

Add top-level address-book and datastore CLI commands, extracting them from the nested migration command structure as part of deprecating migrations.

New Commands

address-book: merge, migrate, remove

datastore: merge, sync-to-catalog

@bytesizedroll bytesizedroll requested a review from a team as a code owner January 21, 2026 22:52
Copilot AI review requested due to automatic review settings January 21, 2026 22:52
@changeset-bot
Copy link

changeset-bot bot commented Jan 21, 2026

⚠️ No Changeset found

Latest commit: d5c1678

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link

👋 bytesizedroll, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces new top-level CLI commands for address book and datastore operations within the engine/cld/legacy/cli/commands package. The changes provide a structured command interface for managing address book artifacts in different deployment environments.

Changes:

  • Added address-book command group with three subcommands: merge, migrate, and remove
  • Implemented comprehensive test coverage for the new address book commands
  • Provided environment-based operations for address book management

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
engine/cld/legacy/cli/commands/addressbook.go Implements the address-book command structure with merge, migrate, and remove subcommands for managing address book artifacts
engine/cld/legacy/cli/commands/addressbook_test.go Adds comprehensive tests validating command structure, metadata, flags, and documentation for all address-book subcommands

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 24 to 27
err := addressBookCmd.MarkPersistentFlagRequired("environment")
if err != nil {
return nil
}
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

Returning nil on error will cause a nil pointer dereference when the caller tries to use the returned command. Consider panicking with a descriptive error message or propagating the error to the caller.

Copilot uses AI. Check for mistakes.
Comment on lines 82 to 85
err := cmd.MarkFlagRequired("name")
if err != nil {
return nil
}
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

Returning nil on error will cause a nil pointer dereference when the caller tries to use the returned command. Consider panicking with a descriptive error message or propagating the error to the caller.

Copilot uses AI. Check for mistakes.
Comment on lines 178 to 181
err := cmd.MarkFlagRequired("name")
if err != nil {
return nil
}
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

Returning nil on error will cause a nil pointer dereference when the caller tries to use the returned command. Consider panicking with a descriptive error message or propagating the error to the caller.

Copilot uses AI. Check for mistakes.
bytesizedroll and others added 2 commits January 21, 2026 18:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings January 21, 2026 22:57
bytesizedroll and others added 2 commits January 21, 2026 18:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 23, 2026 17:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +76 to +80
// Give each subtest its own fresh command tree
root := c.NewDatastoreCmds(dom)

t.Parallel()

Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The command tree is created before calling t.Parallel(), which could lead to race conditions if multiple subtests access shared state. Move the root creation after t.Parallel() to ensure proper test isolation.

Suggested change
// Give each subtest its own fresh command tree
root := c.NewDatastoreCmds(dom)
t.Parallel()
t.Parallel()
// Give each subtest its own fresh command tree
root := c.NewDatastoreCmds(dom)

Copilot uses AI. Check for mistakes.
Comment on lines +87 to +91
// Give each subtest its own fresh command tree
root := c.NewAddressBookCmds(dom)

t.Parallel()

Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The command tree is created before calling t.Parallel(), which could lead to race conditions if multiple subtests access shared state. Move the root creation after t.Parallel() to ensure proper test isolation.

Suggested change
// Give each subtest its own fresh command tree
root := c.NewAddressBookCmds(dom)
t.Parallel()
t.Parallel()
// Give each subtest its own fresh command tree
root := c.NewAddressBookCmds(dom)

Copilot uses AI. Check for mistakes.
@cl-sonarqube-production
Copy link

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