Skip to content
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

woodpecker-cli pipeline logs hardly usabe #3911

Closed
3 tasks done
smainz opened this issue Jul 15, 2024 · 0 comments · Fixed by #3913
Closed
3 tasks done

woodpecker-cli pipeline logs hardly usabe #3911

smainz opened this issue Jul 15, 2024 · 0 comments · Fixed by #3913
Labels
bug Something isn't working cli ux user experience

Comments

@smainz
Copy link
Contributor

smainz commented Jul 15, 2024

Component

cli

Describe the bug

woodpecker-cli pipeline logs is hardly usable and does not comply to the docs.

The help text is:

$ woodpecker-cli  pipeline logs help
NAME:
   woodpecker-cli pipeline logs - show pipeline logs

USAGE:
   woodpecker-cli pipeline logs [command options]<repo-id|repo-full-name> [pipeline] [stepID]

OPTIONS:
   --help, -h  show help

stating that pipeline and stedID are optional, but they are not and there is no hint of how to get the stepId

I do not know, if this classifies as a bug or feature request

Steps to reproduce

165 is the id of one of our repos, 21945 is a pipeline. To reproduce change against the ids of one of your repos / pipelines.

Only with repo:

$ woodpecker-cli  pipeline logs 165
12:01PM FTL error running cli error="strconv.ParseInt: parsing \"\": invalid syntax"

With repo and pipeline:

$ woodpecker-cli  pipeline logs 165 21945
12:02PM FTL error running cli error="strconv.ParseInt: parsing \"\": invalid syntax"

So let's try it with a step:

$ woodpecker-cli  pipeline logs 165 21945 1
12:41PM FTL error running cli error="client error 404: "
$ woodpecker-cli  pipeline logs 165 21945 2
12:41PM FTL error running cli error="client error 400: "

Note: Two different error codes (404 i can understand, 400 not)

The cli doesn't give a clue too:

$ woodpecker-cli pipeline ps 165 21945
Step #2
Step: clone
State: success

Step #3
Step: wartung-weekly
State: failure

Step #4
Step: Send E-Mail
State: success

What actually works is:

$ woodpecker-cli  pipeline logs 165 21945 158434

The stepID I got from the browser network window.

Expected behavior

I would expect that:

  • parse errors indicate, what went wrong
  • pipeline is not optional as there is no god default behavior and you can find out about them using pipeline ls
  • stepID is not mandatory. If omitted, you get the complete log of the pipeline
  • Error codes are equal for invalid stepID.
  • There is a human friendly way of getting the stepID maybe added to pipeline ps or
    or a human friendly way of specifying the stepID

Bonus:

  • Have a way to get the logs of a single workflow

System Info

cli-version 2.6.0

Additional context

May be related to #1824

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
@smainz smainz added the bug Something isn't working label Jul 15, 2024
@anbraten anbraten added cli ux user experience labels Jul 15, 2024
@smainz smainz mentioned this issue Jul 16, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli ux user experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants