-
Notifications
You must be signed in to change notification settings - Fork 56
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
GCP storage #339
base: master
Are you sure you want to change the base?
GCP storage #339
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhalambek thank you for the PR. I see the point and fully support this feature (I was thinking about it for a long time).
In order to merge this feature into the Indexer for Explorer I need you to change a few things here and there, I've left the comments. Feel free to ping me if you have questions.
@@ -81,6 +97,21 @@ impl Opts { | |||
match &self.chain_id { | |||
ChainId::Mainnet(_) => config_builder.mainnet(), | |||
ChainId::Testnet(_) => config_builder.testnet(), | |||
ChainId::Custom(_) => { | |||
println!("aws: region {}", self.region); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
println!("aws: region {}", self.region); | |
tracing::debug!( | |
target: crate::INDEXER_FOR_EXPLORER, | |
"aws: region {}", | |
self.region, | |
); |
indexer/Cargo.toml
Outdated
@@ -35,3 +37,4 @@ near-jsonrpc-client = "0.4.0-beta.0" | |||
near-lake-framework = "0.5.2" | |||
|
|||
explorer-database = { path = "../database" } | |||
http = "0.2.8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind moving it before the itertools
declarations, please? This is the place for path-dependencies
@@ -34,6 +36,15 @@ pub(crate) struct Opts { | |||
/// Port to enable metrics/health service | |||
#[clap(long, short, env, default_value_t = 3030)] | |||
pub port: u16, | |||
/// S3 bucket name | |||
#[clap(long)] | |||
pub bucket: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes these parameters required which is not a desired behavior for us. It's actually required only when the custom
subcommand is fired.
I see two possible options here:
- Make these
Option<String>
and add corresponding checks when theCustom
is provided and print relevant errors about missing parameters. - Make a copy of the
StartOptions
and require these parameters there.
I guess the second variant is preferable.
@mhalambek hey there! FYI we have implemented the Do you have the capacity and desire to pick this PR again and finish it? |
9465ab8
to
96ac995
Compare
297147f
to
96ac995
Compare
96ac995
to
657e4bc
Compare
No description provided.