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

Recurring committing not working as expected #2396

Closed
shindler opened this issue Nov 20, 2018 · 6 comments
Closed

Recurring committing not working as expected #2396

shindler opened this issue Nov 20, 2018 · 6 comments
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.

Comments

@shindler
Copy link

shindler commented Nov 20, 2018

Description
We have a very specific case when it comes to weblate as we need changes to be pushed ASAP, we were using LAZY_COMMITS. We have sent a request regarding this to weblate mailing list a received a solution that is also described in the documentation here: https://docs.weblate.org/en/latest/admin/install.html?highlight=CELERY_BEAT_SCHEDULE

Unfortunately, this is not working as expected as changes are not committed every 2 minutes. We can see in logs that celery task is running as requested:

[2018-11-20 08:38:26,926: INFO/Beat] Scheduler: Sending due task commit (weblate.trans.tasks.commit_pending)
[2018-11-20 08:38:26,929: INFO/MainProcess] Received task: weblate.trans.tasks.commit_pending[a184a696-e6b1-4244-9852-c7991da4b338]  

however local changes are still not commited and pushed. The funny part is that if we run weblate commit_pending --all inside docker container everything is working as expected

Expected behavior
Commit local change every 2 minutes (and push them as configured)

Server configuration and status
list versions ouput:

* Weblate 3.2.2
 * Python 3.5.3
 * Django 2.1.2
 * Celery 4.2.1
 * celery-batches 0.2
 * six 1.10.0
 * social-auth-core 1.7.0
 * social-auth-app-django 2.1.0
 * django-appconf 1.0.2
 * translate-toolkit 2.3.1
 * Whoosh 2.7.4
 * defusedxml 0.5.0
 * Git 2.11.0
 * Pillow 4.0.0
 * python-dateutil 2.5.3
 * lxml 3.7.1
 * django-crispy-forms 1.7.2
 * django_compressor 2.2
 * djangorestframework 3.9.0
 * user-agents 1.1.0
 * jellyfish 0.6.1
 * pytz 2018.7
 * pyuca 1.2
 * PyYAML 3.12
 * tesserocr 2.3.1
 * Mercurial 4.0
 * git-svn 2.11.0
 * Database backends: django.db.backends.postgresql
 * Cache backends: default:RedisCache, avatar:FileBasedCache
 * Platform: Linux 4.4.0-134-generic (x86_64)

check --deploy output

SystemCheckError: System check identified some issues:

CRITICALS:
?: (weblate.E018) Failed to download avatar: <urlopen error [Errno 99] Cannot assign requested address>
	HINT: https://docs.weblate.org/en/weblate-3.2.2/admin/optionals.html#avatars

WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.
?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
?: (security.W012) SESSION_COOKIE_SECURE is not set to True. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.

System check identified 4 issues (0 silenced).
@nijel
Copy link
Member

nijel commented Nov 21, 2018

Do you have accedf7 applied? Without that it will indeed be broken.

@shindler
Copy link
Author

shindler commented Nov 21, 2018

Hi @nijel is it already in some of the released images (https://hub.docker.com/r/weblate/weblate/tags/) or is it in "edge" still?

@BhaaLseN
Copy link

BhaaLseN commented Nov 21, 2018

It seems I have a similar issue. accedf7 was the initial reason I came here (and is now applied), but even after running commit_pending I just see commits being made; but nothing is pushed to the remote repository (even though "Push on commit" is enabled). Repository maintenance "Push" works as intended (and I think "Commit" pushes automatically as well, I don't actually remember since I did far too many things before noticing that Celery wasn't running after a server reboot).
Surprisingly, commitgit does the push; but since it has no --age switch I'm not using that.

And on a side note, I seem to have similar issues with updategit. No matter how many times I run it, no updates happen (unless I use "Pull" in repository maintenance).

$ ./manage.py list_versions
 * Weblate weblate-3.2.2
 * Python 3.5.3
 * Django 2.1.2
 * Celery 4.2.1
 * celery-batches 0.2
 * six 1.11.0
 * social-auth-core 1.7.0
 * social-auth-app-django 2.1.0
 * django-appconf 1.0.2
 * translate-toolkit 2.3.1
 * Whoosh 2.7.4
 * defusedxml 0.5.0
 * Git 2.11.0
 * Pillow 5.3.0
 * python-dateutil 2.7.3
 * lxml 4.2.5
 * django-crispy-forms 1.7.2
 * django_compressor 2.2
 * djangorestframework 3.9.0
 * user-agents 1.1.0
 * jellyfish 0.6.1
 * pytz 2018.5
 * pyuca 1.2
 * python-bidi 0.4.0
 * PyYAML 3.12
 * Database backends: django.db.backends.mysql
 * Cache backends: default:RedisCache
 * Platform: Linux 4.9.0-6-amd64 (x86_64)

$ ./manage.py check --deploy
System check identified some issues:

WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.

System check identified 1 issue (0 silenced).

@nijel
Copy link
Member

nijel commented Nov 23, 2018

It was not part of any release, I've just pushed 3.2.2-4 containing this fix.

@nijel nijel added the question This is more a question for the support than an issue. label Nov 23, 2018
@stale
Copy link

stale bot commented Dec 8, 2018

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.

@stale stale bot added wontfix Nobody will work on this. and removed wontfix Nobody will work on this. labels Dec 8, 2018
@stale
Copy link

stale bot commented Dec 29, 2018

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.

@stale stale bot added the wontfix Nobody will work on this. label Dec 29, 2018
@stale stale bot closed this as completed Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.
Projects
None yet
Development

No branches or pull requests

3 participants