-
Bug
-
Resolution: Done
-
Major
-
Pipelines 1.19.0
Description of problem:
The opc results taskrun logs command fails when users attempt to use the -A flag to retrieve logs across all namespaces. The command returns the following error:
Error: unknown shorthand flag: 'A' in -A
This error is not user-friendly and does not indicate why the command failed or what the correct usage should be. Users expect either support for -A or a clear message that it is unsupported and guidance on using -n <namespace> instead.
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
- Identify a valid TaskRun name stored in Tekton Results
- Run the command:
opc results taskrun logs pipeline-results-hello -A
Actual results:
$ opc tr ls -A
NAMESPACE NAME STARTED DURATION STATUS
releasetest-2jvdb results-task 1 day ago 40s Failed(TaskRunImagePullFailed)
releasetest-8qjpw pipeline-results-goodbye 1 day ago 4s Succeeded
releasetest-8qjpw pipeline-results-hello 1 day ago 5s Succeeded
releasetest-9xgrj pipeline-results-goodbye 1 day ago 4s Succeeded
releasetest-9xgrj pipeline-results-hello 1 day ago 5s Succeeded
releasetest-blpng pipeline-results-goodbye 1 hour ago 4s Succeeded
releasetest-blpng pipeline-results-hello 1 hour ago 4s Succeeded
releasetest-fqq8q pipeline-results-goodbye 1 day ago 4s Succeeded
releasetest-fqq8q pipeline-results-hello 1 day ago 5s Succeeded
releasetest-ftdnz results-task 1 hour ago 5s Succeeded
test skopeo-copy-run-run-skopeo-copy 20 hours ago 13s Succeeded
test buildah-run-run-buildah 20 hours ago 20s Succeeded
test buildah-run-clone-git-repo 20 hours ago 27s Succeeded
test-tkn tkn-version-run-run-tkn 1 day ago 8s Succeeded
$ opc results tr logs pipeline-results-hello -A
Error: unknown shorthand flag: 'A' in -A
Expected results:
**
- A clear error message such as:
"-A flag is not supported in this command. Please use -n <namespace> to specify the namespace."
- (Optional) Support for -A to fetch logs when TaskRun names are unique across namespaces
Reproducibility (Always/Intermittent/Only Once):
Acceptance criteria:
Definition of Done:
Build Details:
Pipelines with 1.19 operator installed & opc resuls CLI
Additional info (Such as Logs, Screenshots, etc):