`mergin push` prints "Done" and exits 0 when changes remain beyond MAX_UPLOAD_CHANGES

Open
#328 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Start with push() in cli.py and the LocalProjectChanges truncation to MAX_UPLOAD_CHANGES, then compare with how sync loops until no changes remain. Reproduce by adding 150 files and checking that status still lists changes after push. The issue leaves open whether push should loop like sync or report the remaining count and exit non-zero, so settle that with the maintainers before coding.

Written by the indexing model from the issue text.

Description

With more than 100 local changes, mergin push uploads one batch, prints Done and exits 0. LocalProjectChanges truncates the batch to MAX_UPLOAD_CHANGES, taking additions first. The changes left over show up only in a later mergin status.

Seen in 0.14.2. push() in cli.py and the limit are unchanged in 0.15.0.

To reproduce

  1. Add 150 files to a project.
  2. Run mergin push. It prints Done.
  3. Run mergin status. It still lists 50 additions.

A script that checks the exit code reads this as a complete push. We pushed two projects of about 965 changes each, and each push moved exactly 100. Looping push until status was empty finished them, which is what mergin sync does internally.

Could push either keep going like sync, or say how many changes remain and exit non-zero?

Dominant language
Python
Stars
24
Forks
12
Avg merge
6d 23h
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MerginMaps/python-api-client

All issues in MerginMaps/python-api-client

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.