Skip to content

Conversation

PeterYurkovich
Copy link
Contributor

@PeterYurkovich PeterYurkovich commented Oct 17, 2025

This PR looks to fix an issue which caused the prometheus /labels endpoint to always go through the non-tenancy API path. This change is needed to allow non-admin users to use the autocomplete functionality in the observe/metrics pages. The thanos-querier service (link) already provides support for this functionality, we are just looking to expose a way for the console users to access this existing endpoint.

      * Port 9092 provides access to the `/api/v1/query`, `/api/v1/query_range/`, `/api/v1/labels`, `/api/v1/label/*/values`, and `/api/v1/series` endpoints restricted to a given project. Granting access requires binding a user to the `view` cluster role in the project.

This PR is being made in conjunction with a second one in the console (openshift/console#15621) which exposes this proxy. This PR must merge AFTER the one in the console codebase

After Changes

Screenshot From 2025-10-17 14-21-09 Screenshot From 2025-10-17 14-21-27

@openshift-ci openshift-ci bot requested review from etmurasaki and zhuje October 17, 2025 18:33
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 17, 2025
@PeterYurkovich PeterYurkovich changed the title fix: fetch metric labels from tenancy path when appropriate OU-1036: fetch metric labels from tenancy path when appropriate Oct 17, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 17, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 17, 2025

@PeterYurkovich: This pull request references OU-1036 which is a valid jira issue.

In response to this:

This PR looks to fix an issue which caused the prometheus /labels endpoint to always go through the non-tenancy API path. This change is needed to allow non-admin users to use the autocomplete functionality in the observe/metrics pages. The thanos-querier service (link) already provides support for this functionality, we are just looking to expose a way for the console users to access this existing endpoint.

     * Port 9092 provides access to the `/api/v1/query`, `/api/v1/query_range/`, `/api/v1/labels`, `/api/v1/label/*/values`, and `/api/v1/series` endpoints restricted to a given project. Granting access requires binding a user to the `view` cluster role in the project.

This PR is being made in conjunction with a second one in the console (openshift/console#15621) which exposes this proxy. This PR must merge AFTER the one in the console codebase

After Changes

Screenshot From 2025-10-17 14-21-09 Screenshot From 2025-10-17 14-21-27

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@PeterYurkovich
Copy link
Contributor Author

/hold for the console PR

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 17, 2025
@zhuje
Copy link
Contributor

zhuje commented Oct 17, 2025

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 17, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: PeterYurkovich, zhuje

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [PeterYurkovich,zhuje]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@etmurasaki
Copy link
Contributor

/retest

@etmurasaki
Copy link
Contributor

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Oct 20, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 20, 2025

@PeterYurkovich: This pull request references OU-1036 which is a valid jira issue.

In response to this:

This PR looks to fix an issue which caused the prometheus /labels endpoint to always go through the non-tenancy API path. This change is needed to allow non-admin users to use the autocomplete functionality in the observe/metrics pages. The thanos-querier service (link) already provides support for this functionality, we are just looking to expose a way for the console users to access this existing endpoint.

     * Port 9092 provides access to the `/api/v1/query`, `/api/v1/query_range/`, `/api/v1/labels`, `/api/v1/label/*/values`, and `/api/v1/series` endpoints restricted to a given project. Granting access requires binding a user to the `view` cluster role in the project.

This PR is being made in conjunction with a second one in the console (openshift/console#15621) which exposes this proxy. This PR must merge AFTER the one in the console codebase

After Changes

Screenshot From 2025-10-17 14-21-09 Screenshot From 2025-10-17 14-21-27

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@PeterYurkovich
Copy link
Contributor Author

/retest

1 similar comment
@jgbernalp
Copy link
Contributor

/retest

@PeterYurkovich
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 23, 2025
@PeterYurkovich
Copy link
Contributor Author

/label ux-approved
No UX changes, only fixing a bug

@openshift-ci openshift-ci bot added the ux-approved Signifies that UX has signed off on this PR label Oct 23, 2025
@PeterYurkovich
Copy link
Contributor Author

/cherry-pick release-4.20

@openshift-cherrypick-robot

@PeterYurkovich: once the present PR merges, I will cherry-pick it on top of release-4.20 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 23, 2025

@PeterYurkovich: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-aws-ovn ec983d7 link false /test okd-scos-e2e-aws-ovn

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 3ebb2b5 into openshift:main Oct 23, 2025
8 of 9 checks passed
@openshift-cherrypick-robot

@PeterYurkovich: #608 failed to apply on top of branch "release-4.20":

Applying: fix: fetch metric labels from tenancy path when appropriate
Using index info to reconstruct a base tree...
M	web/src/components/metrics/promql-expression-input.tsx
Falling back to patching base and 3-way merge...
Auto-merging web/src/components/metrics/promql-expression-input.tsx
CONFLICT (content): Merge conflict in web/src/components/metrics/promql-expression-input.tsx
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 fix: fetch metric labels from tenancy path when appropriate

In response to this:

/cherry-pick release-4.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR ux-approved Signifies that UX has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants