8000 fix(state-sync): Config option to provide a GCS credentials file in the config file by nikurt · Pull Request #9487 · near/nearcore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 8 commits into from
Sep 6, 2023

Conversation

nikurt
Copy link
Contributor
@nikurt nikurt commented Sep 4, 2023

Also adjust verbosity of state-parts logging

…onfig.json

Also adjust verbosity of state-parts
@nikurt nikurt requested a review from a team as a code owner September 4, 2023 13:56
@nikurt nikurt requested a review from Longarithm September 4, 2023 13:56
Copy link
Contributor
@wacban wacban left a comment

Choose a reason for hiding this comment

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

lgtm

Comment on lines 353 to 356
/// 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>,
Copy link
Contributor

Choose a reason for hiding this comment

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

8000

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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

@nikurt nikurt enabled auto-merge September 5, 2023 12:40
@nikurt nikurt added this pull request to the merge queue Sep 5, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 5, 2023
@andrei-near andrei-near added this pull request to the merge queue Sep 5, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 5, 2023
@nikurt nikurt enabled auto-merge September 5, 2023 14:57
@nikurt nikurt added this pull request to the merge queue Sep 5, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 5, 2023
@andrei-near andrei-near added this pull request to the merge queue Sep 6, 2023
Merged via the queue into master with commit 92f58d1 Sep 6, 2023
@andrei-near andrei-near deleted the nikurt-gcs-creds branch September 6, 2023 07:52
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.

3 participants
0