[Bug] GitLab 11.11 failure to run `glab pipeline status -l`
Created by: zemzale
Description
Opening this issue to track it separately from #325 (closed) since it's issue with the same command, but is not the same issue.
As per comments https://github.com/profclems/glab/issues/325#issuecomment-731756008 https://github.com/profclems/glab/issues/325#issuecomment-731827690 there is failure to run glab pipeline status -l
on GitLab 11.11
.
This is because we use order_by:updated_at
and it wasn't in the GitLab 11.11 API
Expected Behavior
Should be execute the command and view pipeline status
Actual Behavior
The response is :
GET https://gitlab..../api/v4/projects/tools/templates/pipelines: 400 {error: order_by does not have a valid value}
Possible Fix
We could check the version of the GitLab we are running against, and if it's 11.11 then we just don't pass this order by parameter. I have not looked into how important is the ordering but if it's needed we can just request these pipelines one by one and order them ourselfs. Steps to Reproduce
- Try to execute
glab pipeline status -l
on GitLab 11.11
Your Environment
As per https://github.com/profclems/glab/issues/325#issuecomment-731827690
- Version used:
GitLab 11.11
glab 1.11.1
(note:GitLab 12.10
is mentioned too, but that shouldn't be affected)