-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Some suggestions from working on open-telemetry/semantic-conventions#2307.
Take a look at the
Lines 419 to 427 in 19a6c7e
--diff-format <DIFF_FORMAT> | |
Format used to render the schema changes. Predefined formats are: ansi, json, and markdown | |
[default: ansi] | |
--diff-template <DIFF_TEMPLATE> | |
Path to the directory where the schema changes templates are located | |
[default: diff_templates] |
The only way to understand how templates should look like is by reverse engineering the https://github.com/open-telemetry/weaver/tree/main/defaults/diff_templates folder structure
-
Let's assume I passed non-existed folder:
weaver registry diff -r https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/v1.34.0.zip[model] \ --baseline-registry https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/v1.33.0.zip[model] \ --diff-template ./does-not-exist --diff-format yaml -o diff
Expected: error - folder not found
Actual: success with full diff as if I didn't provide--diff-template
-
Let's assume I passed existing folder name, but folder structure is not the right one and there is no
yaml/weaver.yaml
- same result as in p1
Suggestions:
-
if
--diff-template
is provided and it does not exist, fail - don't fallback to default one -
I really don't understand how
--diff-template
is different from--config
and why do I need to pass it along with--diff-format
- i'm providing my own templates and my own config - just let me pass the path to weaver config and call it a day.I.e. let me do
- weaver registry diff -r ./current --baseline-registry ./baseline --diff-template ./path/to/folder-with-specific-structure --diff-format yaml + weaver registry diff -r ./current --baseline-registry ./baseline --config ./path/to/my-weaver-config.yaml
-
Add some logs to the template engine like
reading ./path/to/config/weaver.yaml
,executing jq
,running jinja
, etc
Metadata
Metadata
Assignees
Labels
Type
Projects
Status