monitoring_dashboard: DashboardFilter adding new fields into proto.
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 packages/google-cloud-monitoring-dashboards/google/cloud/monitoring_dashboard_v1/types/dashboard_filter.py 开始,并将 DashboardFilter 与链接的 REST API 文档进行比较。验证现有字段的定义方式以及生成类型的测试方式;完成的标准是 valueType 和 stringArrayValue 可以被构造、序列化、解析,并公开预期的 STRING_ARRAY 值。
由索引模型根据 Issue 内容生成。
描述
Determine this is the right repository
- I determined this is the correct repository in which to report this feature request.
Summary of the feature request
DashboardFilter only exposes label_key, template_variable, string_value, and filter_type:
https://github.com/googleapis/google-cloud-python/blob/google-cloud-monitoring-dashboards-v2.22.0/packages/google-cloud-monitoring-dashboards/google/cloud/monitoring_dashboard_v1/types/dashboard_filter.py
However:
The REST API supports valueType (STRING / STRING_ARRAY) and stringArrayValue for value-only dashboard variables that accept multiple values — documented here: https://docs.cloud.google.com/monitoring/api/ref_v3/rest/v1/projects.dashboards#DashboardFilter
This mismatch means the generated proto/client is behind the actual API surface, and there's no way to construct or parse a STRING_ARRAY-type dashboard filter/variable using the typed Python client — only via raw REST calls.
Desired code experience
file: dashboard_filter.py
class ValueType(proto.Enum):
r"""The type of the filter value
Values:
VALUE_TYPE_UNSPECIFIED (0):
Value type is unspecified
STRING (1):
String type
STRING_ARRAY (2):
String array type
"""
VALUE_TYPE_UNSPECIFIED = 0
STRING = 1
STRING_ARRAY = 2
value_type: ValueType = proto.Field(
proto.ENUM,
number=6,
enum=ValueType,
)
stringArrayValue: StringArray = proto.Field(
proto.MESSAGE,
number=7,
message=StringArray,
)
Expected results
_e.g. dashboardFilter.stringArrayValue should return { values: [] }
API client name and version
google-cloud-monitoring-dashboards v2.22.0
Use case
This feature will allow users to retrieve stored values saved in Dashboard Settings -> Filters/Variables.
Additional context
No response
- 主要语言
- Python
- 星标
- 5.4k
- 派生
- 1.8k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 143
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
googleapis/google-cloud-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
googleapis/google-cloud-python#18532 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 92/100
googleapis/google-cloud-python#18467 ·
维护者通常 1 天内回复
-
auth priority: p2 type: bug
难度 2/5 1-3 小时 新手友好度 88/100
googleapis/google-cloud-python#18428 ·
维护者通常 1 天内回复
-
priority: p2 type: bug
难度 2/5 1-3 小时 新手友好度 72/100
googleapis/google-cloud-python#18375 · 1 条评论 ·
维护者通常 1 天内回复
-
ci: enable --strict flag in presubmit twine_check可能已有人在做 @ohmayr 于 2 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 76/100
googleapis/google-cloud-python#18339 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 googleapis/google-cloud-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 86/100
-
难度 2/5 1-3 小时 新手友好度 91/100
TencentCloud/Octop#1577 · 1 条评论 ·
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 85/100
PedestrianDynamics/pyFDS-Evac#552 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
resend/resend-skills#144 ·
维护者通常 1 天内回复
-
good first issue
难度 1/5 1 小时以内 新手友好度 68/100