grafana / grafonnet

Jsonnet library for generating Grafana dashboards.
https://grafana.github.io/grafonnet/
Apache License 2.0
320 stars 18 forks source link

Fix: Update customAllValue parameter type to string in dashboard variable docs #172

Closed isarns closed 3 months ago

isarns commented 4 months ago

Overview

This PR updates the documentation for dashboard variables to correct the customAllValue parameter's type. The parameter was previously documented as a boolean, but it is actually a string. This change aligns the documentation with the Grafana documentation and the expected input type.

Changes

Impact

This change will help users by providing accurate information about the customAllValue parameter type, ensuring that dashboard variables are used effectively and as intended within Grafana dashboards.

Please review the changes and merge them if everything is in order.

CLAassistant commented 4 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

:white_check_mark: Duologic
:white_check_mark: isarns
:x: chkp-isarn
You have signed the CLA already but the status is still pending? Let us recheck it.

malcolmholmes commented 4 months ago

The documentation is generated from schemas in Grafana, so any error should be fixed there, or in Grafonnet veneers which overlay the generated code.

isarns commented 4 months ago

The documentation is generated from schemas in Grafana, so any error should be fixed there, or in Grafonnet veneers which overlay the generated code.

I noticed that the Grafana schemas do not include the customAllValue parameter, so I made changes in the custom directory. Unfortunately, I am unable to run the make generator due to the following error:

+ jrsonnet -J vendor -S -c -m /Users/PATH/TO/grafonnet/gen/grafonnet-v10.2.0/docs/ --exec '(import '\''doc-util/main.libsonnet'\'').render(import '\''/Users/PATH/TO/grafonnet/gen/grafonnet-v10.2.0/main.libsonnet'\'')'
TRACE: render.libsonnet:18 warning: annotation both defined as object and package
no such field: any
                                                    : field <any> access
    vendor/doc-util/./render.libsonnet:106:15-39    : function <hasFields> call
    vendor/doc-util/./render.libsonnet:106:19-106:20: if condition
                                                    : evaluating argument
    vendor/doc-util/./render.libsonnet:93:8-93:9    : function <std.join> call
    vendor/doc-util/./render.libsonnet:89:22-38     : function <toString> call
+ finish
+ rm -rf /var/folders/6d/ck0zlsjx3vsd4x9r42y6knvr0000gn/T/tmp.TvPDPcrlFX
make: *** [gen/grafonnet-latest] Error 1
Duologic commented 3 months ago

I've made a PR back to align this PR with main: https://github.com/isarns/grafonnet/pull/1

isarns commented 3 months ago

@Duologic Thanks for that! Got it merged.

How about the make generator issue I have encountered? I'm using an intel MAC, maybe it causes the issue?

Duologic commented 3 months ago

no such field: any I think you need to have a newer jrsonnet version.

isarns commented 3 months ago

no such field: any I think you need to have a newer jrsonnet version.

I use this version jrsonnet 0.4.2 which is the latest

Duologic commented 3 months ago

Probably need master, that version is old, bleeding edge here :innocent:

Duologic commented 3 months ago

The generate process should probably become containerized so we don't have these issues.

isarns commented 3 months ago

Probably need master, that version is old, bleeding edge here 😇

Yep that worked thanks! 😃

Duologic commented 3 months ago

Mind signing the CLA?

isarns commented 3 months ago

@Duologic

I will open a new PR without the other account that i pushed with accidentally.

isarns commented 3 months ago

Opened #189