curve
curve copied to clipboard
[feat] tools-v2: add bs status volume snapshot command
What problem does this PR solve?
Issue Number: #2583
Problem Summary: Add bs status volume snapshot
command
What is changed and how it works?
What's Changed: Implement the bs status volume snapshot
command ,which is equivalent to the snapshot-status
command in snaptool.py
.
How it Works: It acquires snapshot status data through HTTP requests, mirroring the behavior in the Python version.
Side effects(Breaking backward compatibility? Performance regression?):
Check List
- [x] Relevant documentation/comments is changed or added
- [x] I acknowledge that all my contributions will be made under the project's license
This pr is encapsulated, and you can add your calls on this basis.
I have rewritten this using the new snapshot utils.
Please resolve the conflict and rebase your commit into one.
Please resolve the conflict and rebase your commit into one.
Conflicts have been addressed and I've squashed the commits. Please have a look.
cicheck
cicheck
@saicaca
@caoxianfei1
I think this is because NewSnapshotQuerySubUri
in tools-v2/internal/utils/snapshot.go
incorrectly uses %s
instead of %v
for params of any
type. This causes non-string parameters to be converted into strings like %!s(int=100)
. The %
in the string results in the appearance of (MISSING)
in the final URL because of this. The same issue should also occur in other commands where NewSnapshotQuerySubUri
is used.
I noticed that #2793 will address this issue so maybe we don't have to fix it in this PR?
@caoxianfei1 I think this is because
NewSnapshotQuerySubUri
intools-v2/internal/utils/snapshot.go
incorrectly uses%s
instead of%v
for params ofany
type. This causes non-string parameters to be converted into strings like%!s(int=100)
. The%
in the string results in the appearance of(MISSING)
in the final URL because of this. The same issue should also occur in other commands whereNewSnapshotQuerySubUri
is used.I noticed that #2793 will address this issue so maybe we don't have to fix it in this PR?
I think we need to modify this issue to ensure that every pull request is correct and not rely on a code that has not yet been merged.
@saicaca it works after modify the function. And it's better that you fix it.
@saicaca it works after modify the function. And it's better that you fix it.
I will do it this noon.
@caoxianfei1 NewSnapshotQuerySubUri
is fixed in the latest commit.
cicheck
cicheck
cicheck
cicheck
need to rebase and fix the conflict.
cicheck
need to rebase and fix the conflict.
@caoxianfei1 I think it's ready to merge.
pls fix conflicts
pls fix conflicts
Conflicts fixed.
cicheck
cicheck
cicheck
Are you free to move on, fix the conflict and complete it.
Are you free to move on, fix the conflict and complete it.
Yes, I have fixed the conflict.