grafana-toolbox / grafana-client

Python client library for accessing the Grafana HTTP API.
MIT License
106 stars 30 forks source link

CI: Check if async code is up-to-date #162

Closed amotl closed 7 months ago

amotl commented 7 months ago

About

Bring recent additions about async code generation into a shape suitable for also using it as a CI job.

Example

A corresponding error on CI, provoked by 478d7b8.

 diff -u ./grafana_client/elements/_async/admin.py /home/runner/work/grafana-client/grafana-client/tmp/fooid1n0ft_/admin.py
--- ./grafana_client/elements/_async/admin.py   2024-03-29 01:30:19.384902882 +0000
+++ /home/runner/work/grafana-client/grafana-client/tmp/fooid1n0ft_/admin.py    2024-03-29 01:30:33.037054629 +0000
@@ -63,6 +63,7 @@
         :return:
         """
         delete_user_path = "/admin/users/%s" % user_id
+        delete_user_path = "/admin/users/%s" % user_id
         r = await self.client.DELETE(delete_user_path)
         return r
[...]
ERROR: Async code not up-to-date. Please run `poe format`.

-- https://github.com/panodata/grafana-client/actions/runs/8475939333/job/23224794973?pr=162#step:6:67