Skip to content

Commit dd21960

Browse files
committed
Merged PR 7063: Sync Development to main
Sync Development to main ---- #### AI description (iteration 1) #### PR Classification This PR is a development sync that delivers broad improvements including enhanced error handling, added fuzz testing targets, and code cleanups. #### PR Summary The changes improve the TDS client’s robustness and maintainability by aggregating multiple SQL Server error tokens, revising bulk metadata queries, and adding new fuzz targets for bulk copy command testing. - **`src/error/mod.rs`** – Introduced aggregation of SQL Server error tokens into a single error and ensured proper stream draining for connection reuse. - **`src/message/metadata_retriever.rs`** – Updated the bulk copy metadata query to use dynamic SQL, eliminating graph_type references on older SQL Server versions. - **`fuzz/fuzz_targets/fuzz_bulk_copy.rs`** – Added a new fuzz target for bulk copy command generation and validations to catch panics without crashing. - **Security & Token Parsers (e.g., in `src/token/parsers/*` and `src/security/*`)** – Cleaned up unused functions and improved FFI visibility, enhancing code clarity and consistency. - **Dependency & Pipeline Files** – Refreshed lockfiles (e.g. in `mssql-js/yarn.lock`) and updated CI/pipeline scripts for improved build and fuzz testing verification. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #40377, #40829, #40924, #41302, #41412, #41497, #41728, #41762, #41830, #41851, #42218, #42220, #42221, #42278, #42825, #42922, #42936, #43048, #43063, #43087, #43091, #43108
2 parents cc4526b + fcb8062 commit dd21960

55 files changed

Lines changed: 1325 additions & 1198 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/post-create.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ fnm use 20
1616
corepack enable
1717

1818
# Setup Python virtual environment for mssql-py-core development
19+
WORKSPACE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
1920
echo "Setting up Python virtual environment..."
20-
python3 -m venv /workspaces/mssql-tds/myvenv
21-
source /workspaces/mssql-tds/myvenv/bin/activate
21+
python3 -m venv "$WORKSPACE_DIR/myvenv"
22+
source "$WORKSPACE_DIR/myvenv/bin/activate"
2223

2324
# Install maturin (build tool) and dev dependencies from pyproject.toml
2425
pip install --upgrade pip
2526
pip install maturin
26-
pip install -e "/workspaces/mssql-tds/mssql-py-core[dev]"
27+
pip install -e "$WORKSPACE_DIR/mssql-py-core[dev]"
2728

28-
echo "Python venv ready at /workspaces/mssql-tds/myvenv"
29-
echo "Run 'source /workspaces/mssql-tds/myvenv/bin/activate' to activate"
29+
echo "Python venv ready at $WORKSPACE_DIR/myvenv"
30+
echo "Run 'source $WORKSPACE_DIR/myvenv/bin/activate' to activate"

.pipeline/scripts/containerized-build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,12 @@ cd mssql-tds
3939
cargo nextest archive --archive-file tdslib-nextest.tar.zst
4040
mv tdslib-nextest.tar.zst /workspace/
4141
cd ..
42+
43+
# Verify fuzz targets compile (PR builds only)
44+
if [ "$IS_PR_BUILD" = "true" ]; then
45+
echo '==> Installing nightly toolchain for fuzz build check...'
46+
rustup toolchain install nightly --profile minimal
47+
echo '==> Checking fuzz targets compile...'
48+
RUSTFLAGS="--cfg fuzzing" cargo +nightly check --manifest-path mssql-tds/fuzz/Cargo.toml
49+
echo '==> Fuzz build check passed.'
50+
fi

.pipeline/validation-pipeline.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,11 @@ stages:
338338
osType: Linux
339339
fuzzDurationSeconds: 300
340340
fuzzTarget: fuzz_connection_provider_context
341+
- template: templates/fuzz-template.yml
342+
parameters:
343+
osType: Linux
344+
fuzzDurationSeconds: 300
345+
fuzzTarget: fuzz_bulk_copy
341346

342347
- stage: Build_mssql_python
343348
dependsOn: []

mssql-js/package.json

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@
1717
},
1818
"license": "MIT",
1919
"dependencies": {
20-
"@js-joda/core": "^5.6.5",
20+
"@js-joda/core": "^5.7.0",
2121
"iconv-lite": "^0.6.3"
2222
},
2323
"devDependencies": {
2424
"@napi-rs/cli": "^2.18.4",
25-
"@types/benchmark": "^2",
26-
"@types/node": "^24.0.14",
27-
"@typescript-eslint/eslint-plugin": "^8.37.0",
28-
"@typescript-eslint/parser": "^8.37.0",
29-
"ava": "^6.0.1",
25+
"@types/benchmark": "^2.1.5",
26+
"@types/node": "^24.12.0",
27+
"@typescript-eslint/eslint-plugin": "^8.57.0",
28+
"@typescript-eslint/parser": "^8.57.0",
29+
"ava": "^6.4.1",
3030
"benchmark": "^2.1.4",
31-
"eslint": "^9.31.0",
32-
"eslint-config-prettier": "^10.1.5",
33-
"eslint-plugin-prettier": "^5.5.1",
34-
"prettier": "^3.6.2",
31+
"eslint": "^9.39.4",
32+
"eslint-config-prettier": "^10.1.8",
33+
"eslint-plugin-prettier": "^5.5.5",
34+
"prettier": "^3.8.1",
3535
"tap-xunit": "^2.4.1",
36-
"typescript": "^5.8.3"
36+
"typescript": "^5.9.3"
3737
},
3838
"ava": {
3939
"timeout": "3m"
@@ -55,5 +55,8 @@
5555
"format:check": "prettier --check \"lib/**/*.ts\" \"__test__/**/*.{js,mjs,ts}\"",
5656
"lint": "eslint . --ext .ts,.js --max-warnings=0"
5757
},
58-
"packageManager": "yarn@4.9.2"
58+
"packageManager": "yarn@4.9.2",
59+
"resolutions": {
60+
"tar": "7.5.11"
61+
}
5962
}

0 commit comments

Comments
 (0)