-
Notifications
You must be signed in to change notification settings - Fork 715
fix(state-sync): Config option to provide a GCS credentials file in the config file #9487
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
Conversation
…onfig.json Also adjust verbosity of state-parts
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.
lgtm
nearcore/src/config.rs
Outdated
/// If a node needs to upload state parts to S3. | ||
pub s3_credentials_file: Option<String>, | ||
/// If a node needs to upload state parts to GCS. | ||
pub gcs_credentials_file: Option<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.
nit1: It feels like those should be exclusive. How about putting them in an enum or a runtime check?
nit2: You can also check if the credentials for state_sync.dump.location are Some.
nit3: How about moving those to the state sync config? Please disregard if used elsewhere.
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.
nit1: Not really. I can imagine a node that has permissions to write to both locations. Anyway, moved the field to DumpConfig, and now it's exclusive.
nit2: Not sure what you meant.
nit3: Moved it to state_sync.dump.credentials_file.
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.
nit1: ok
nit2:
if location == gcp && gcs_credentials_file.is_none() { return error("missing credentials"); }
// not a biggie
nit3: thanks
Also adjust verbosity of
state-parts
logging