Skip to content

chore: add test and docs for metrics #764

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xeniape
Copy link
Member

@xeniape xeniape commented Jun 18, 2025

Description

Part of stackabletech/issues#735
Trino already provides built-in Prometheus metrics per default. This PR adds testing the metrics endpoint and some documentation.

--- FAIL: kuttl (2045.00s)
    --- FAIL: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/smoke_trino-451_hive-3.1.3_opa-1.4.2_hdfs-3.4.1_zookeeper-3.9.3_openshift-false (417.36s)
        --- PASS: kuttl/harness/smoke_trino-470_hive-4.0.1_opa-1.4.2_hdfs-3.4.1_zookeeper-3.9.3_openshift-false (435.47s)
        --- PASS: kuttl/harness/smoke_trino-476_hive-4.0.1_opa-1.4.2_hdfs-3.4.1_zookeeper-3.9.3_openshift-false (426.37s)
        --- FAIL: kuttl/harness/smoke_trino-476_hive-3.1.3_opa-1.4.2_hdfs-3.4.1_zookeeper-3.9.3_openshift-false (1182.69s)
        --- FAIL: kuttl/harness/smoke_trino-470_hive-3.1.3_opa-1.4.2_hdfs-3.4.1_zookeeper-3.9.3_openshift-false (1110.19s)
        --- PASS: kuttl/harness/smoke_trino-451_hive-4.0.1_opa-1.4.2_hdfs-3.4.1_zookeeper-3.9.3_openshift-false (426.83s)
FAIL
ERROR:root:kuttl failed

--- PASS: kuttl (409.49s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/smoke_trino-470_hive-3.1.3_opa-1.4.2_hdfs-3.4.1_zookeeper-3.9.3_openshift-false (409.48s)
PASS

--- PASS: kuttl (373.74s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/smoke_trino-476_hive-3.1.3_opa-1.4.2_hdfs-3.4.1_zookeeper-3.9.3_openshift-false (373.73s)
PASS

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

@xeniape xeniape self-assigned this Jun 18, 2025
@xeniape xeniape moved this to Development: Waiting for Review in Stackable Engineering Jun 18, 2025
@razvan razvan self-requested a review June 18, 2025 14:19
@razvan razvan moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Jun 18, 2025
Copy link
Member

@razvan razvan left a comment

Choose a reason for hiding this comment

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

The AWS metrics test will not work like this but I'm personally also fine if you remove it.

Comment on lines +68 to +77
host_coordinator_0 = (
"http://trino-coordinator-default-0.trino-coordinator-default."
+ namespace
+ ".svc.cluster.local"
)
host_worker_0 = (
"http://trino-worker-default-0.trino-worker-default."
+ namespace
+ ".svc.cluster.local"
)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
host_coordinator_0 = (
"http://trino-coordinator-default-0.trino-coordinator-default."
+ namespace
+ ".svc.cluster.local"
)
host_worker_0 = (
"http://trino-worker-default-0.trino-worker-default."
+ namespace
+ ".svc.cluster.local"
)
host_coordinator_0 = f"http://trino-coordinator-default-0.trino-coordinator-default.{namespace}.svc.cluster.local"
host_worker_0 = f"http://trino-worker-default-0.trino-worker-default.{namespace}.svc.cluster.local"

retries = 3
for i in range(retries):
try:
r = requests.get(url, timeout=5, auth=("trino", ""))
Copy link
Member

Choose a reason for hiding this comment

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

These are the wrong auth credentials. On AWS admin/admin should work. Maybe also bob/bob.

namespace = args["namespace"]

host_coordinator_0 = (
"http://trino-coordinator-default-0.trino-coordinator-default."
Copy link
Member

Choose a reason for hiding this comment

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

Needs https on AWS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Development: In Review
Development

Successfully merging this pull request may close these issues.

2 participants