Skip to content

List all unsupported file names in v2 push error - #691

Merged
MarcelGeo merged 2 commits into
developfrom
feat/issue-3529-unsupported-files-error
Oct 2, 2026
Merged

MarcelGeo merged 2 commits into
developfrom
feat/issue-3529-unsupported-files-error

Conversation

@harminius

Copy link
Copy Markdown
Contributor

Resolves https://github.com/MerginMaps/server-private/issues/3529

POST /v2/projects/{id}/versions now rejects unsupported file names with 422 UnsupportedFilesDetected and lists every offending path, diff paths included, in unsupported_files. Before, it returned UploadError naming only the first file. This also applies to check_only dry runs.

The name check now runs over all files before the other per-file checks. v1 push keeps its 400 response, and its message now lists all files too.

@harminius
harminius requested a review from MarcelGeo October 1, 2026 11:50
@coveralls

coveralls commented Oct 1, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 36997656905

Coverage decreased (-0.03%) to 92.709%

Details

  • Coverage decreased (-0.03%) from the base build.
  • Patch coverage: 32 of 32 lines across 4 files are fully covered (100%).
  • 32 coverage regressions across 6 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

32 previously-covered lines in 6 files lost coverage.

File Lines Losing Coverage Coverage
server/mergin/auth/controller.py 19 93.21%
server/mergin/auth/models.py 7 96.85%
server/mergin/tests/test_audit_events.py 2 99.34%
server/mergin/tests/test_cli.py 2 98.92%
server/mergin/auth/app.py 1 97.01%
server/mergin/auth/listeners.py 1 94.29%

Coverage Stats

Coverage Status
Relevant Lines: 11246
Covered Lines: 10426
Line Coverage: 92.71%
Coverage Strength: 0.93 hits per line

💛 - Coveralls

f"Unsupported file type detected: '{file_path}'. "
f"Please remove the file or try compressing it into a ZIP file before uploading.",
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave here that code and just raise specific error. Do not need specific loops. That can simplify this code.

like if diff and not is_valid_path():
raise UnsupportedFileName.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I put the validation in the existing loop. But I need to raise the specific error only when the loop finishes.

@harminius
harminius requested a review from MarcelGeo October 2, 2026 10:51
@MarcelGeo
MarcelGeo merged commit 7ae6004 into develop Oct 2, 2026
5 checks passed
@MarcelGeo
MarcelGeo deleted the feat/issue-3529-unsupported-files-error branch October 2, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants