Skip to content

fix(query): remove trailing spaces from test file names to enable windows cloning #18046

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

Merged
merged 2 commits into from
Jun 1, 2025

Conversation

bikbov
Copy link
Contributor

@bikbov bikbov commented Jun 1, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

The repository cannot be cloned on Windows systems due to invalid file paths with trailing spaces. Git fails during checkout with the error:

$ git clone https://github.com/databendlabs/databend.git
Cloning into 'databend'...
remote: Enumerating objects: 502992, done.
remote: Counting objects: 100% (1519/1519), done.
remote: Compressing objects: 100% (807/807), done.
remote: Total 502992 (delta 1026), reused 712 (delta 712), pack-reused 501473 (from 4)
Receiving objects: 100% (502992/502992), 263.44 MiB | 4.50 MiB/s, done.
Resolving deltas: 100% (357214/357214), done.
error: invalid path 'tests/sqllogictests/suites/base/09_fuse_engine/09_0043_set_cache_cap.sql '
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

Root Cause

Two test files in the tests/sqllogictests/suites/base/09_fuse_engine/ directory have trailing spaces in their filenames:

  • 09_0043_set_cache_cap.sql (note the trailing space)
  • 09_0044_issue_17314.sql (note the trailing space)

Windows file system restrictions prevent the creation of files with trailing spaces in their names, causing the clone operation to fail during checkout.

Solution

Renamed the problematic files to remove trailing spaces:

  • 09_0043_set_cache_cap.sql 09_0043_set_cache_cap.sql
  • 09_0044_issue_17314.sql 09_0044_issue_17314.sql

Verification

After the fix, the repository can be successfully cloned on Windows:

$ git clone https://github.com/bikbov/databend.git
Cloning into 'databend'...
remote: Enumerating objects: 501454, done.
remote: Counting objects: 100% (1513/1513), done.
remote: Compressing objects: 100% (800/800), done.
remote: Total 501454 (delta 1033), reused 713 (delta 713), pack-reused 499941 (from 4)
Receiving objects: 100% (501454/501454), 262.73 MiB | 7.32 MiB/s, done.
Resolving deltas: 100% (356131/356131), done.
Updating files: 100% (5535/5535), done.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Test fixing

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@bikbov bikbov changed the title Remove trailing spaces from test file names to enable Windows cloning fix(query): remove trailing spaces from test file names to enable windows cloning Jun 1, 2025
@github-actions github-actions bot added the pr-bugfix this PR patches a bug in codebase label Jun 1, 2025
Copy link
Member

@zhang2014 zhang2014 left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@zhang2014 zhang2014 merged commit aeefb70 into databendlabs:main Jun 1, 2025
80 of 82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix this PR patches a bug in codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants