-
Notifications
You must be signed in to change notification settings - Fork 75
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
Implement Healthcheck status for keys loading #738
Conversation
-- enable aws endpoint uri for localstack based testing
...sts/src/test/java/tech/pegasys/web3signer/tests/bulkloading/AzureKeyVaultAcceptanceTest.java
Show resolved
Hide resolved
signing/src/main/java/tech/pegasys/web3signer/signing/BlsKeystoreBulkLoader.java
Outdated
Show resolved
Hide resolved
promise -> { | ||
final JsonObject statusJson = | ||
new JsonObject() | ||
.put("keys-loaded", results.getValues().size()) |
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.
Are these results updated when the keys are reloaded?
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.
correct, these will be re-evaluated during reload.
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.
Can a test be added for the reload case, I think have a test for reloading config so shouldn't be too tricky hopefully 🤞
core/src/main/java/tech/pegasys/web3signer/core/Eth2Runner.java
Outdated
Show resolved
Hide resolved
signing/src/main/java/tech/pegasys/web3signer/signing/BlsKeystoreBulkLoader.java
Outdated
Show resolved
Hide resolved
signing/src/test/java/tech/pegasys/web3signer/signing/config/SignerLoaderTest.java
Outdated
Show resolved
Hide resolved
# Conflicts: # gradle/versions.gradle
signing/src/main/java/tech/pegasys/web3signer/signing/BlsKeystoreBulkLoader.java
Outdated
Show resolved
Hide resolved
signing/src/main/java/tech/pegasys/web3signer/signing/BlsKeystoreBulkLoader.java
Outdated
Show resolved
Hide resolved
signing/src/main/java/tech/pegasys/web3signer/signing/BlsKeystoreBulkLoader.java
Outdated
Show resolved
Hide resolved
.then() | ||
.statusCode(200) | ||
.contentType(ContentType.JSON) | ||
.body("status", equalTo("UP")); |
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.
Also, be good to have a test showing that checks have the appropriate status and error count values
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.
Added it in AWS Secrets Manager AT.
final String publicKey = KEY_PAIR.getPublicKey().toString(); | ||
|
||
final AwsSecretsManagerUtil awsSecretsManagerUtil = | ||
new AwsSecretsManagerUtil(region, rwAwsAccessKeyId, rwAwsSecretAccessKey); | ||
new AwsSecretsManagerUtil( | ||
region, rwAwsAccessKeyId, rwAwsSecretAccessKey, awsEndpointOverride); |
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.
Not sure if this appropriate test or not but would be good to have a test case for config-files-loading check as well
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.
Added healthcheck AT related to config-files-loading.
promise -> { | ||
final JsonObject statusJson = | ||
new JsonObject() | ||
.put("keys-loaded", results.getValues().size()) |
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.
Can a test be added for the reload case, I think have a test for reloading config so shouldn't be too tricky hopefully 🤞
# Conflicts: # CHANGELOG.md
PR Description
--aws-endpoint-override
(useful for testing against localstack).Sample healthcheck:
Fixed Issue(s)
#715
#730
Documentation
doc-change-required
label to this PR if updates are required.Changelog