Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(daemon): add import command to download pruned snapshots #1424

Merged
merged 11 commits into from
Jul 19, 2024

Conversation

Ja7ad
Copy link
Contributor

@Ja7ad Ja7ad commented Jul 18, 2024

Description

Import pruned snapshot form centralized server in CLI.

https://pips.pactus.org/PIPs/pip-27#importing-data

Related issue(s)

@Ja7ad Ja7ad requested review from b00f and kehiy July 18, 2024 08:40
cmd/daemon/import.go Outdated Show resolved Hide resolved
cmd/daemon/import.go Outdated Show resolved Hide resolved
cmd/downlaod_mgr.go Outdated Show resolved Hide resolved
cmd/daemon/import.go Show resolved Hide resolved
cmd/daemon/import.go Outdated Show resolved Hide resolved
cmd/downlaod_mgr.go Outdated Show resolved Hide resolved
cmd/daemon/import.go Show resolved Hide resolved
cmd/downlaod_mgr.go Outdated Show resolved Hide resolved
cmd/downlaod_mgr.go Show resolved Hide resolved
cmd/daemon/import.go Outdated Show resolved Hide resolved
@Ja7ad Ja7ad marked this pull request as ready for review July 18, 2024 18:38
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 7.26496% with 217 lines in your changes missing coverage. Please review.

Project coverage is 75.39%. Comparing base (6eec4f4) to head (358c3cb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1424      +/-   ##
==========================================
- Coverage   76.73%   75.39%   -1.35%     
==========================================
  Files         218      220       +2     
  Lines       11225    11455     +230     
==========================================
+ Hits         8614     8637      +23     
- Misses       2192     2402     +210     
+ Partials      419      416       -3     

cmd/daemon/import.go Outdated Show resolved Hide resolved
cmd/daemon/import.go Outdated Show resolved Hide resolved

var choice int
fmt.Printf("Please select a snapshot [1-%d]: ", len(metadata))
_, err = fmt.Scanf("%d", &choice)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Ja7ad use cmd as it provide useful functions for interactive command lines

cmd/daemon/import.go Outdated Show resolved Hide resolved
util/utils.go Show resolved Hide resolved
@b00f b00f changed the title feat(cli): add import command to download snapshots feat(daemon): add import command to download snapshots Jul 19, 2024
@b00f b00f changed the title feat(daemon): add import command to download snapshots feat(daemon): add import command to download pruned snapshots Jul 19, 2024
@Ja7ad Ja7ad merged commit a055d0c into pactus-project:main Jul 19, 2024
12 checks passed
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.

2 participants