Post-review follow-up#246
Conversation
… into fix/post-review-fixes
… into fix/post-review-fixes
russell-stern
left a comment
There was a problem hiding this comment.
Looks good, the default namespace should be updated though
|
|
||
| static CURRENT_MODE: Mutex<i32> = Mutex::new(0); | ||
| static RANDOM_GENERATORS: OnceLock<Mutex<HashMap<i32, ChaCha8Rng>>> = OnceLock::new(); | ||
| const MAX_RESPONSE_LEN_BYTES: i32 = 64 * 1024 * 1024; |
There was a problem hiding this comment.
Where is this constant coming from?
There was a problem hiding this comment.
I don't think GO have anything like this. That's my proposal for max response length (roughly 64 MB) which I think should not even be reached in realistic scenarios. It's basically just to have any upper bound limit.
| runtime | ||
| } | ||
|
|
||
| #[cfg(test)] |
There was a problem hiding this comment.
Do the tests need to be in the same file?
| import { CapabilityError } from '@cre/sdk/utils/capabilities/capability-error' | ||
| import { DonModeError, NodeModeError, SecretsError } from '../errors' | ||
|
|
||
| const DEFAULT_SECRET_NAMESPACE = 'default' |
There was a problem hiding this comment.
The default namespace for vault is 'main' not 'default'. We should probably have a centralized place that says it but currently it lives in chainlink
There was a problem hiding this comment.
Changing it in the const for now, happy to follow up once we agreed on the right centralized place to keep it.
| * @param response - The Response object | ||
| * @param name - The header name (case-insensitive) | ||
| * @returns The header value or undefined if not found | ||
| * Returns all values for a header (case-insensitive). |
There was a problem hiding this comment.
Elsewhere in this file we use the @param & @returns style comments, we should keep the comment formatting the same here
… into fix/post-review-fixes
getHeaders()for multi-value headers;getHeader()now readsmultiHeadersand supportsConfidentialHTTPResponse.namespaceto"default".Int64/UInt64/bigintToProtoBigIntreject unsafe-integernumberinputs.