Skip to content
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

Typed metrics endpoint dict #149

Merged
merged 1 commit into from
Mar 24, 2023
Merged

Conversation

PietroPasotti
Copy link
Contributor

Adds typing annotation for COSAgentProvider's metrics_endpoints init arg.

Fixes #106

@PietroPasotti PietroPasotti changed the base branch from main to machine_charm March 23, 2023 16:25
@PietroPasotti PietroPasotti marked this pull request as ready for review March 23, 2023 16:25
Copy link
Contributor

@dstathis dstathis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain a bit why this is useful? It seems to me like it adds code and doesn't do anything?

@rbarry82
Copy link
Contributor

It kind-of doesn't, but OF uses pyright, not mypy, and we're trying to slowly converge a little. pyright doesn't like dict. It could be ok with Dict[str, Any] or something, but it may even allow us to do a little enforcement someday. Mostly this is for pyright and a little sanity.

@rbarry82 rbarry82 merged commit 6342f1b into machine_charm Mar 24, 2023
@rbarry82 rbarry82 deleted the typed-metrics-endpoint-dict branch March 24, 2023 23:19
sed-i added a commit that referenced this pull request Apr 14, 2023
* Cleanup etc. (#90)
* Fix metadata and snap usage (#91)
* Class split (#92)
* Make static_configs into a list (#96)
* add option for tls insecure skip verify (#93)
* Add dashboards handler (#97)
* Scenario tests and machine charm rename (#99)
* spelling errors (#100)
* Clear machine metadata relations (#98)
* Add tests for update-status (#101)
* Type fixes (#102)
* small fixes and scenarios (#103)
* Machine charm lib (#95)
* Feature/fix prop (#111)
* LINT. Fix the grafana data iteration (#112)
* plug extraction (#105)
* Sub relation priority (#114)
* Fix a possible JSON loading exception (#119)
* purged grafana dashboard requirer (#117)
* Fix labels (#120)
* Use cosl for Rules and JujuTopology (#121)
* Fix position files (#116)
* top level documentation for cos_machine lib  (#122)
* Add juju-info itest (#123)
* Snap plug logs (#124)
* Loki shared logs monitoring (#125)
* Rename cos-machine to cos-agent (#129)
* wrong scope for grafana-dashboards-provider relation (#134)
* FIX Grafana dashboards files are stored in a bad format (#139)
* move on-refresh config to unit databag (#142)
* Set BlockedStatus per relation (#141)
* Be looser with finding snap plug mounts (#145)
* Use an actual uuid4, alerts() is now a property everywhere (#151)
* Replace DS_PROMETHEUS with prometheusds (#148)
* Cleanup (#152)
* use better locations for the positions files (#155)
* added typing for metrics endpoint dict (#149)
* Fix fstab parser (#159)
* (cos-agent) Use peer relation data for communicating all principals' data (#160)
* add support for the grafana cloud integrator charm (#150)

Co-authored-by: Dylan Stephano-Shachter <[email protected]>
Co-authored-by: awnn <[email protected]>
Co-authored-by: Ryan Barry <[email protected]>
Co-authored-by: PietroPasotti <[email protected]>
Co-authored-by: Jose C. Massón <[email protected]>
Co-authored-by: sed-i <[email protected]>
Co-authored-by: Simon Aronsson <[email protected]>
Co-authored-by: Luca Bello <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add typing for endpoint
5 participants