jx: jx gc previews fails on http gitlab

Summary

The jx gc previews command fails with error β€œerror: no Git service resource found with URL β€˜httpsπŸ˜•/mygitlab:9010’ in namespace jx”. The actual Gitlab url is httpπŸ˜•/mygitlab:9010

Steps to reproduce the behavior

  1. Create an application with jx create spring -d web -d actuator command
  2. Push changes on a PR-xx branch of the application
  3. Execute command jx gc previews, or check the logs of the gc-previews pods.

Jx version

The output of jx version is:

NAME               VERSION
jx                 1.3.688
jenkins x platform 0.0.3125
Kubernetes cluster v1.10.0
kubectl            v1.13.1
helm client        v2.11.0+g2e55dbe
helm server        v2.12.0+gd325d2a
git                git version 1.8.3.1
Operating System   CentOS Linux release 7.5.1804 (Core)

Kubernetes cluster

What kind of Kubernetes cluster are you using & how did you create it? Using existing minikube cluster

Operating system / Environment

CentOS Linux release 7.5.1804

Expected behavior

The jx gc previews command is successfully executed, and the gc-previews pods are completed

Actual behavior

The jx gc previews command fails and hundreds of gc-previews pods remain in error state

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 20 (7 by maintainers)

Most upvoted comments

But looking at the API of both GitHub and GitLab they are very similar

https://developer.github.com/v3/pulls/#list-pull-requests https://docs.gitlab.com/ee/api/merge_requests.html

So why dont use the API to get the URLs fΓΌr everything instead of building the url from hardcoded parts ? πŸ˜ƒ GitLab supports access to a projects via api using the urlencoded projectname, so we can get everything we need from the repo-url.

https://srv-git.mydomain.com/api/v4/projects/buehring%2Fquickstart3/merge_requests

dont mind my last comment @jstrachan … it was stupid after thinking about it πŸ˜ƒ

ok, my gitlab is actually https, so i didnt notice

seems to be very hardcoded in some places regarding github 😦