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

Git squash commits not squashing #13432

Open
2 tasks done
jmctune opened this issue Jan 5, 2025 · 2 comments
Open
2 tasks done

Git squash commits not squashing #13432

jmctune opened this issue Jan 5, 2025 · 2 comments
Labels
bug Something is broken.
Milestone

Comments

@jmctune
Copy link

jmctune commented Jan 5, 2025

Describe the issue

I recently updated from Weblate 5.6 -> 5.9.2.1 via Docker. With the update, the "Squash Git Commits" add-on stopped working. I noticed there was a change between versions where you can now install add-ons at the project level, so I removed it from the component and re-installed it at the project. Unfortunately, the issue still persists where a single author making changes to two or more files is being added as individual commits.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar filed issues in this repository.

Steps to reproduce the behavior

  • Have a single component configured (mine is called "dummy")
  • Use the add-on "Component discovery" and configure it. I'm currently pulling in about 950~ components with 450k total managed strings
  • Enable the "Squash Git Commits" add-on at the project level
    • Commit squashing: Author
    • Append trailers to squashed commit messages: Checked
    • Commit message: Blank
  • Have a user make a commit in two or more different components
  • In Manage > Repository Maintenance, manually click "Commit" and "Push" to bypass the scheduled 1 hour push
  • Two individual commits are created

I've checked the add-on's logs (with the "Manage logs" button on the add-on) and there is no activity.

Expected behavior

No response

Screenshots

image

All of these commits should have been squashed into one commit. They were committed and pushed at the same time by Weblate's scheduling. There are multiple changes performed on a single component, but all components changed by the author should have been squashed into a single commit. See the "Additional context" section for a link to this repository.

Exception traceback

There are no exceptions or errors in the logs when the sync occurs. I check this with `docker logs weblate -f`.

How do you run Weblate?

Docker container

Weblate versions

docker compose exec --user weblate weblate weblate list_versions
 * Weblate: 5.9.2
 * Django: 5.1.4
 * siphashc: 2.5
 * translate-toolkit: 3.14.5
 * lxml: 5.3.0
 * pillow: 11.0.0
 * nh3: 0.2.20
 * python-dateutil: 2.9.0.post0
 * social-auth-core: 4.5.4
 * social-auth-app-django: 5.4.2
 * django-crispy-forms: 2.3
 * oauthlib: 3.2.2
 * django-compressor: 4.5.1
 * djangorestframework: 3.15.2
 * django-filter: 24.3
 * django-appconf: 1.0.6
 * user-agents: 2.2.0
 * filelock: 3.16.1
 * RapidFuzz: 3.11.0
 * openpyxl: 3.1.5
 * celery: 5.4.0
 * django-celery-beat: 2.7.0
 * kombu: 5.4.2
 * translation-finder: 2.19
 * weblate-language-data: 2024.16
 * html2text: 2024.2.26
 * pycairo: 1.27.0
 * PyGObject: 3.50.0
 * diff-match-patch: 20241021
 * requests: 2.32.3
 * django-redis: 5.4.0
 * hiredis: 3.1.0
 * sentry-sdk: 2.19.2
 * Cython: 3.0.11
 * mistletoe: 1.4.0
 * GitPython: 3.1.43
 * borgbackup: 1.4.0
 * pyparsing: 3.2.0
 * ahocorasick_rs: 0.22.1
 * python-redis-lock: 4.0.0
 * charset-normalizer: 3.4.1
 * cyrtranslit: 1.1.1
 * drf-spectacular: 0.28.0
 * Python: 3.12.8
 * Git: 2.39.5
 * psycopg: 3.2.3
 * psycopg-binary: 3.2.3
 * phply: 1.2.6
 * ruamel.yaml: 0.18.6
 * tesserocr: 2.7.1
 * boto3: 1.35.88
 * aeidon: 1.15
 * iniparse: 0.5
 * mysqlclient: 2.2.6
 * google-cloud-translate: 3.19.0
 * openai: 1.58.1
 * Mercurial: 6.9
 * git-svn: 2.39.5
 * git-review: 2.4.0
 * PostgreSQL server: 14.4
 * Database backends: django.db.backends.postgresql
 * PostgreSQL implementation: psycopg3 (binary)
 * Cache backends: default:RedisCache, avatar:FileBasedCache
 * Email setup: django.core.mail.backends.smtp.EmailBackend: smtp.gmail.com
 * OS encoding: filesystem=utf-8, default=utf-8
 * Celery: redis://cache:6379/1, redis://cache:6379/1, regular
 * Platform: Linux 3.10.0-1160.119.1.el7.x86_64 (x86_64)

Weblate deploy checks

docker compose exec --user weblate weblate weblate check --deploy
System check identified no issues (39 silenced).

Silenced checks:

WEBLATE_SILENCED_SYSTEM_CHECKS=security.W004,security.W008,security.W012,weblate.I021,weblate.I028
  • security.W004: Warning about not enabling HSTS
  • security.W008: SECURE_SSL_REDIRECT not set
  • security.W012: SESSION_COOKIE_SECURE is not set to True.
  • weblate.I021: Error collection is not set up, it is highly recommended for production use
  • weblate.I028: Message about manual backups

Additional context

One thing I've noticed is that in my "dummy" component (where the Component discovery add-on is listed), if I make an edit here and then in another file, those are getting squashed. But if I pick other components, they are all individual.

Here's the commit history for the repo Weblate is publishing to:

https://github.com/dqx-translation-project/dqx_translations/commits/main/

Thanks for this wonderful product.

@nijel
Copy link
Member

nijel commented Jan 5, 2025

Probably caused by 54a0a87 and 438073f. Apparently, we went from triggering it too often to triggering it too few.

@nijel nijel added the bug Something is broken. label Jan 5, 2025
@nijel nijel added this to the 5.10 milestone Jan 5, 2025
@jmctune
Copy link
Author

jmctune commented Jan 5, 2025

Confirmed that reverting the changes in 438073f has the commits squashing again. Will eagerly await 5.10. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken.
Projects
None yet
Development

No branches or pull requests

2 participants