[llvm] [CI] Always send a heartbeat metric (PR #122708)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 05:46:24 PST 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r 7060d2a12b6da41ab0e3d86ff7fe1501e4f40769...1a505a54db35227b98fffaade09fd2913af95c86 .ci/metrics/metrics.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- metrics.py	2025-01-13 13:36:29.000000 +0000
+++ metrics.py	2025-01-13 13:45:53.057014 +0000
@@ -145,19 +145,21 @@
     if response.status_code < 200 or response.status_code >= 300:
         print(
             f"Failed to submit data to Grafana: {response.status_code}", file=sys.stderr
         )
 
+
 def make_heartbeat_metric():
-  return JobMetrics(
-      "metrics_container_heartbeat",
-      1, # queue time seconds
-      2, # run time seconds
-      3, # job result
-      time.time_ns(), # created at ns
-      0, # workflow run ID
-  )
+    return JobMetrics(
+        "metrics_container_heartbeat",
+        1,  # queue time seconds
+        2,  # run time seconds
+        3,  # job result
+        time.time_ns(),  # created at ns
+        0,  # workflow run ID
+    )
+
 
 def main():
     # Authenticate with Github
     auth = Auth.Token(os.environ["GITHUB_TOKEN"])
     github_object = Github(auth=auth)

``````````

</details>


https://github.com/llvm/llvm-project/pull/122708


More information about the llvm-commits mailing list