Skip to content

Conversation

@ChrisBQu
Copy link
Collaborator

@ChrisBQu ChrisBQu commented Mar 4, 2025

Relevant issue(s)

Resolves #2291

Description

The following commands were currently in the CLI:

defradb client schema migration down
defradb client schema migration reload
defradb client schema migration set
defradb client schema migration set-registry
defradb client schema migration up

With these changes, they instead become:

defradb client lens down
defradb client lens reload
defradb client lens set
defradb client lens set-registry
defradb client lens up

This brings them more in line with how they are named in the Http client.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

How has this been tested?

Specify the platform(s) on which this was tested:

  • Windows

@ChrisBQu ChrisBQu added the area/cli Related to the CLI binary label Mar 4, 2025
@ChrisBQu ChrisBQu added this to the DefraDB v0.17 milestone Mar 4, 2025
@ChrisBQu ChrisBQu self-assigned this Mar 4, 2025
@codecov
Copy link

codecov bot commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.55%. Comparing base (2cadb13) to head (59327b8).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3510      +/-   ##
===========================================
+ Coverage    78.48%   78.55%   +0.08%     
===========================================
  Files          397      397              
  Lines        37599    37599              
===========================================
+ Hits         29506    29535      +29     
+ Misses        6400     6379      -21     
+ Partials      1693     1685       -8     
Flag Coverage Δ
all-tests 78.55% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cli/cli.go 100.00% <100.00%> (ø)
cli/lens.go 100.00% <100.00%> (ø)
cli/lens_down.go 37.29% <100.00%> (ø)
cli/lens_reload.go 60.00% <100.00%> (ø)
cli/lens_set.go 71.19% <100.00%> (ø)
cli/lens_set_registry.go 46.43% <100.00%> (ø)
cli/lens_up.go 37.29% <100.00%> (ø)

... and 13 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2cadb13...59327b8. Read the comment docs.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ChrisBQu ChrisBQu requested a review from a team March 5, 2025 18:28
@ChrisBQu ChrisBQu marked this pull request as ready for review March 5, 2025 18:56
Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks Chris, maybe keep this one open a few more hours if it isn't blocking you in case anyone has any strong opinions.

I don't really mind which direction this is changed in, but do prefer that http and cli are aligned.

Copy link
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for making this set of command align with the HTTP handlers.

@ChrisBQu ChrisBQu merged commit ef8284e into sourcenetwork:develop Mar 5, 2025
42 of 44 checks passed
ChrisBQu added a commit to ChrisBQu/defradb that referenced this pull request Apr 25, 2025
## Relevant issue(s)

Resolves sourcenetwork#2291

## Description

The following commands were currently in the CLI:

defradb client schema migration down
defradb client schema migration reload
defradb client schema migration set
defradb client schema migration set-registry
defradb client schema migration up

With these changes, they instead become:

defradb client lens down
defradb client lens reload
defradb client lens set
defradb client lens set-registry
defradb client lens up

This brings them more in line with how they are named in the Http
client.

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

Specify the platform(s) on which this was tested:
- Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli Related to the CLI binary

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI and Http lens/migration commands have different paths

3 participants