Skip to content

Commit

Permalink
sui-indexer: fix CLI clap error (#21158)
Browse files Browse the repository at this point in the history
## Description 

an issue reported by community 

#21037 (comment)

introduced in 
#20783

the error was 
```
Argument `gc_checkpoint_files`'s selected action SetTrue contradicts `takes_value`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

## Test plan 

```
DB_POOL_SIZE=10 cargo run --bin sui-indexer -- --db-url "postgres://postgres:postgrespw@localhost:5432/gegao" indexer --remote-store-url https://checkpoints.mainnet.sui.io 
DB_POOL_SIZE=10 cargo run --bin sui-indexer -- --db-url "postgres://postgres:postgrespw@localhost:5432/gegao" indexer --remote-store-url https://checkpoints.mainnet.sui.io --gc-checkpoint-files
DB_POOL_SIZE=10 cargo run --bin sui-indexer -- --db-url "postgres://postgres:postgrespw@localhost:5432/gegao" indexer --remote-store-url https://checkpoints.mainnet.sui.io --gc-checkpoint-files=true
DB_POOL_SIZE=10 cargo run --bin sui-indexer -- --db-url "postgres://postgres:postgrespw@localhost:5432/gegao" indexer --remote-store-url https://checkpoints.mainnet.sui.io --gc-checkpoint-files=false
DB_POOL_SIZE=10 cargo run --bin sui-indexer -- --db-url "postgres://postgres:postgrespw@localhost:5432/gegao" indexer --remote-store-url https://checkpoints.mainnet.sui.io --gc-checkpoint-files true
DB_POOL_SIZE=10 cargo run --bin sui-indexer -- --db-url "postgres://postgres:postgrespw@localhost:5432/gegao" indexer --remote-store-url https://checkpoints.mainnet.sui.io --gc-checkpoint-files false
```


---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
  • Loading branch information
gegaowp authored Feb 10, 2025
1 parent 47a2466 commit ff1738c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/sui-indexer/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ pub struct IngestionConfig {
long,
default_value_t = true,
default_missing_value = "true",
action = clap::ArgAction::Set,
num_args = 0..=1,
require_equals = false,
)]
Expand Down

0 comments on commit ff1738c

Please sign in to comment.