Skip to content

RHDEVDOCS 6414 new Results CLI #95134

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: pipelines-docs-main
Choose a base branch
from

Conversation

mramendi
Copy link
Contributor

@mramendi mramendi commented Jun 24, 2025

Version(s):

please cp to pipelines-docs-1.19
Issue:

RHDEVDOCS 6414

Link to docs preview:

https://95134--ocpdocs-pr.netlify.app/openshift-pipelines/latest/records/using-tekton-results-for-openshift-pipelines-observability.html#querying-pipelinerun-tasktun_using-tekton-results-for-openshift-pipelines-observability

QE review:

  • QE has approved this change.

Additional information:

@openshift-ci openshift-ci bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 24, 2025
@mramendi mramendi changed the title RHDEVDOCS 6144 new Results CLI RHDEVDOCS 6414 new Results CLI Jun 24, 2025
@mramendi
Copy link
Contributor Author

@ocpdocs-previewbot
Copy link

ocpdocs-previewbot commented Jun 24, 2025

Copy link

@divyansh42 divyansh42 left a comment

Choose a reason for hiding this comment

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

@mramendi I have added a few comments which are mostly related to the changes in the functionality and also a few wrong flags getting used.
There were a few minor things as well, I have added those in the code suggestions. Please take a look and let me know if any of the comments need further clarification

Copy link

@divyansh42 divyansh42 left a comment

Choose a reason for hiding this comment

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

Thanks for doing the required changes.
I have added a few more minor nitpicks, Could you please take a look?

Also, I was thinking if we can also mention that if the user doesn't provide -n flag then the current namespace will be used. Although it is obvious for any k8s CLI, but if we just want to mention to be more clear.

Copy link

@divyansh42 divyansh42 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2025
@manthinasai
Copy link

LGTM

@mramendi
Copy link
Contributor Author

mramendi commented Jul 3, 2025

/label peer-review-needed

@openshift-ci openshift-ci bot added the peer-review-needed Signifies that the peer review team needs to review this PR label Jul 3, 2025
@maxwelldb maxwelldb added the peer-review-in-progress Signifies that the peer review team is reviewing this PR label Jul 3, 2025
Copy link
Contributor

@maxwelldb maxwelldb left a comment

Choose a reason for hiding this comment

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

Let some suggestions, questions, and comments as part of peer review. Re-label when ready!

@@ -29,6 +30,8 @@ $ export RESULTS_API=$(oc get route tekton-results-api-service -n openshift-pipe
$ oc create token <service_account>
----
+
Replace `<service_account>` with the name of an {OCP} service account that has read access to the namespaces where {pipelines-shortname} ran the pipeline runs and task runs.
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like a good place to use a description list to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DLs are not used elsewhere in this particular docset (Pipelines), so this would break consistency

Comment on lines 177 to 178
:FeatureName: Querying results and logs by the names of pipeline runs and task runs
include::snippets/technology-preview.adoc[]
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a little unusual, but I don't see a rule against it. 🤷
Typically, the TP snippet is used atop the module or assembly for a TP feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to this approach upon review, thanks (except it's "part of an assembly" this time)

@@ -170,4 +170,9 @@ $ oc get pipelinerun <cr_name> -o yaml

You can access every result and record by its name. You can also use Common Expression Language (CEL) queries to search for results and records by the information they contain, including the YAML manifest.

You can also configure {tekton-results} to facilitate forwarding the logging information of all the tools that ran as a part of a pipeline or task to LokiStack. You can then query {tekton-results} for logging information of the task run associated with a {tekton-results} record.
You can configure {tekton-results} to facilitate forwarding the logging information of all the tools that ran as a part of a pipeline or task to LokiStack. You can then query {tekton-results} for logging information of the task run associated with a {tekton-results} record.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe out of scope, but consider:

You can configure {tekton-results} to forward logs from all tools that ran as part of a pipeline or task to LokiStack. You can then query {tekton-results} for the logs of the task run that is associated with a given record.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Out of scope and would require SME discussion

Comment on lines +28 to +33
Alternatively, you can use the pipeline run UUID instead of the name:
+
[source,terminal]
----
$ opc results pipelinerun describe -n <namespace_name> --uid <pipelinerun_uuid>
----
Copy link
Contributor

Choose a reason for hiding this comment

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

This is nice to include, but I worry over whether the expansiveness threatens conciseness.

Copy link
Contributor Author

@mramendi mramendi Jul 10, 2025

Choose a reason for hiding this comment

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

Sometimes many names are VERY similar and easy to mix up, so in those cases people prefer UUIDs

$ opc results pipelinerun describe -n <namespace_name> --output yaml <pipelinerun_name>
----
+
Alternatively, you can use the pipeline run UUID instead of the name:
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same answer

Comment on lines 99 to 102
[IMPORTANT]
====
Logs that the `opc results pipelinerun logs` displays do not include logs of task runs that completed within this pipeline runs. To view these logs, find the names of the task runs in this pipeline run using the `opc results taskrun list --pipelinerun` command and specify the name of the pipeline run. Then use the `opc results taskrun log` command to view the logs for the task runs.
====

[NOTE]
====
If you do not specify the `-n` option, the `opc` command applies to the current namespace, To set the current namespace, use the `oc project` command.
====

[NOTE]
====
You can use the short form `opc results pr desc` instead of `opc results pipelinerun describe`.

You can use the short form `opc results pr logs` instead of `opc results pipelinerun logs`.
====
Copy link
Contributor

Choose a reason for hiding this comment

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

How much of this needs to be here vs. either in the tool's guidance or organically in documented task flows? I'd try to avoid stacking admonitions unless necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The flows get tremendously overfilled if this is squeezed in. Faced with this issue I added a reference module for short names and just dropped the information about not specifying the namespace.

@maxwelldb maxwelldb removed peer-review-in-progress Signifies that the peer review team is reviewing this PR peer-review-needed Signifies that the peer review team needs to review this PR labels Jul 3, 2025
@maxwelldb
Copy link
Contributor

/cherry-pick pipelines-docs-1.19

@openshift-cherrypick-robot

@maxwelldb: once the present PR merges, I will cherry-pick it on top of pipelines-docs-1.19 in a new PR and assign it to you.

In response to this:

/cherry-pick pipelines-docs-1.19

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.

Copy link

openshift-ci bot commented Jul 10, 2025

New changes are detected. LGTM label has been removed.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2025
@mramendi
Copy link
Contributor Author

/label peer-review-needed

@openshift-ci openshift-ci bot added the peer-review-needed Signifies that the peer review team needs to review this PR label Jul 10, 2025
@xenolinux xenolinux added peer-review-in-progress Signifies that the peer review team is reviewing this PR and removed peer-review-needed Signifies that the peer review team needs to review this PR labels Jul 11, 2025
Copy link
Contributor

@xenolinux xenolinux left a comment

Choose a reason for hiding this comment

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

A few nits; LGTM

@xenolinux xenolinux added peer-review-done Signifies that the peer review team has reviewed this PR and removed peer-review-in-progress Signifies that the peer review team is reviewing this PR labels Jul 11, 2025
Copy link

openshift-ci bot commented Jul 11, 2025

@mramendi: all tests passed!

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.

@mramendi
Copy link
Contributor Author

/label merge-review-needed

@openshift-ci openshift-ci bot added the merge-review-needed Signifies that the merge review team needs to review this PR label Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-review-needed Signifies that the merge review team needs to review this PR peer-review-done Signifies that the peer review team has reviewed this PR size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants