-
Notifications
You must be signed in to change notification settings - Fork 115
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
[Argus] Fix config parsing bug #4788
[Argus] Fix config parsing bug #4788
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Would merging #4759 without this fix be problematic? |
The error fixed in this PR occurred if we didn't provide the required property of an optional object in config.yml. In #4759, a new property |
@@ -7,7 +8,7 @@ export class ValidationError extends Error { | |||
|
|||
public constructor(message: string, errors: Ajv['errors']) { | |||
const errorMessages: string[] = [] | |||
errors?.forEach((e) => errorMessages.push(`${e.dataPath}: ${e.message} (${JSON.stringify(e.params)})`)) | |||
errors?.forEach((e) => errorMessages.push(`${e.instancePath}: ${e.message} (${JSON.stringify(e.params)})`)) |
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.
I see this change from dataPath to instancePath is due to newer version of ajv package. https://ajv.js.org/api.html#validation-errors
But storage-node also uses ajv for schema validation so we may need to do a similar fix there
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.
Both storage-node & distributor-node have in-package import of ajv
dependency from storage-node/node_modules
& distributor-node/node_modules/
as it's added separately in storage-node/package.json
& distributor-node/package.json
.
- However, I have updated
ajv
dependency to^8..0.0
in/storage-node
&/cli
- Removed
ajv
dependency from/types
, as it's unused
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
addresses #4787
#4787
in 695c66a. The fix allows omitting optional config keys fromconfig.yml
file when specifying their values as env vars.