WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.49k stars 993 forks source link

Unable to change component type to Gitlab #3121

Closed tcitworld closed 4 years ago

tcitworld commented 4 years ago

Describe the bug Following #1276 and #3107, I would like to make my existing project send merge requests.

To Reproduce Steps to reproduce the behavior:

  1. Having GITLAB_USERNAME defined in settings.py
  2. Have an existing repo with a (self-hosted) Gitlab URL. The push URL isn't defined.
  3. Go to /settings/%project%/%component%/#vcs
  4. Click on control version system selector
  5. Gitlab is not listed

Expected behavior The Gitlab option to be offered.

Server configuration and status

$ weblate list_versions
 * Weblate 3.9
 * Python 3.7.3
 * Django 2.2.5
 * Celery 4.3.0
 * celery-batches 0.2
 * six 1.12.0
 * social-auth-core 3.2.0
 * social-auth-app-django 3.1.0
 * django-appconf 1.0.3
 * translate-toolkit 2.4.0
 * translation-finder 1.7
 * Whoosh 2.7.4
 * defusedxml 0.6.0
 * Git 2.20.1
 * Pillow 6.2.0
 * python-dateutil 2.8.0
 * lxml 4.4.1
 * django-crispy-forms 1.7.2
 * django_compressor 2.3
 * djangorestframework 3.10.3
 * user-agents 2.0
 * jellyfish 0.7.2
 * diff-match-patch 20181111
 * ruamel.yaml 0.16.5
 * Database backends: django.db.backends.postgresql
 * Cache backends: default:RedisCache, avatar:FileBasedCache
 * Email setup: django.core.mail.backends.smtp.EmailBackend: localhost
 * Celery: redis://localhost:6379, redis://localhost:6379, regular
 * Platform: Linux 4.19.0-6-amd64 (x86_64)
$ weblate check --deploy
System check identified some issues:

WARNINGS:
?: (security.W005) You have not set the SECURE_HSTS_INCLUDE_SUBDOMAINS setting to True. Without this, your site is potentially vulnerable to attack via an insecure connection to a subdomain. Only set this to True if you are certain that all subdomains of your domain should be served exclusively via SSL.
?: (security.W021) You have not set the SECURE_HSTS_PRELOAD setting to True. Without this, your site cannot be submitted to the browser preload list.

INFOS:
?: (weblate.I021) Error collection is not configured, it is highly recommended for production use
    HINT: https://docs.weblate.org/en/weblate-3.9/admin/install.html#collecting-errors
?: (weblate.I028) Backups are not configured, it is highly recommended for production use
    HINT: https://docs.weblate.org/en/weblate-3.9/admin/backup.html

System check identified 4 issues (1 silenced).

Additional context Running in Django Shell the following:

from weblate.vcs.models import VCS_REGISTRY
VCS_REGISTRY.get_choices()

includes the Gitlab option.

nijel commented 4 years ago

It works as expected for me on https://hosted.weblate.org/, maybe you didn't restart uwsgi (or however you run the server)? The list of detected VCS backends is cached for the process lifetime.

tcitworld commented 4 years ago

I did restart uwsgi a few times, and checked that other changes to the configuration were successfully applied.

nijel commented 4 years ago

Maybe the lab tool is installed in path where uwsgi doesn't look? Check PATH environment for both of these.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

tcitworld commented 4 years ago

Sorry for the delay, lab wasn't indeed in the path for the uwsgi service. :+1: