diff --git a/.github/copilot-dependabot-instructions.md b/.github/copilot-dependabot-instructions.md index 770f287f5..46dd8528f 100644 --- a/.github/copilot-dependabot-instructions.md +++ b/.github/copilot-dependabot-instructions.md @@ -8,4 +8,39 @@ 6. **Comments** — review any existing PR comments and review threads, including resolved/hidden ones, and address anything actionable. 7. **Self-rate** — rate this work 1-10 against: correctness, test coverage, changelog accuracy, build/lint health, and comment resolution. 8. **Iterate** — if it's not a 10, keep improving until it is before finishing. -9. **Summary** — post a final comment explaining why this update matters, what the impact/risk is, and what could go wrong if it weren't applied, along with your self-rating and reasoning. +9. **Summary** — your final response must use the following structure exactly (no free-form paragraph summary). + +## Impact analysis +- Package: +- Old version: +- New version: +- Change Impact: + +## Build/Conflict Issues +- Commands: +- Result: + +## Tests +- Added: +- Updated: +- Result: + +## Run the Suite +- Commands: +- Status: + +## Changelog +- Entry: +- Location: + +## Comments +- Reviewed: +- Actions: + +## Self-Rate +- Score: +- Reasoning: + +## Summary +- Why this matters: +- Risk of not taking change: diff --git a/ChangeLog.md b/ChangeLog.md index bf4597814..da0bf7bf4 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -6,6 +6,7 @@ General: +- Updated lockfile-resolved `mysql2` from 3.23.4 to 3.24.2 to correct three-byte length-coded parameter encoding and improve SQL metadata-store performance; added SQL pool regression coverage for large bound parameters. - Updated the lockfile-resolved `eslint` version from 10.9.0 to 10.9.1 to fix a `no-loss-of-precision` false positive for trailing decimal points; added regression coverage for the corrected lint behavior. ## 2026.08 Version 3.37.0 diff --git a/package-lock.json b/package-lock.json index 8707bfe23..3efe09f78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8599,9 +8599,9 @@ "license": "ISC" }, "node_modules/mysql2": { - "version": "3.23.4", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.23.4.tgz", - "integrity": "sha512-J1Rgl8Oy5iw3mOBjKeTMQ3cJNjMYtJYavQVXShsMtSj9rKV8Q1+QaGKNJqDVQFcNINqYYp6Vxd90r69cCoBxBA==", + "version": "3.24.2", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.24.2.tgz", + "integrity": "sha512-l9kXeKGwd6VCbSjmpO/bLWb+YCYpbvE4whte8ec6InXebvCNyEEydyRCnRU+TSHNqRLJ8B+Tk1uWb+vMCJgJzA==", "license": "MIT", "dependencies": { "aws-ssl-profiles": "^1.1.2", diff --git a/tests/blob/blockblob.highlevel.test.ts b/tests/blob/blockblob.highlevel.test.ts index 31f3e6016..bb7bcd049 100644 --- a/tests/blob/blockblob.highlevel.test.ts +++ b/tests/blob/blockblob.highlevel.test.ts @@ -17,7 +17,8 @@ import { getTestServerBaseURL, getUniqueName, readStreamToLocalFile, - rmRecursive + rmRecursive, + sleep } from "../testutils"; // Set true to enable debug log @@ -56,6 +57,22 @@ describe("BlockBlobHighlevel", () => { let tempFileLargeLength: number; const tempFolderPath = "temp"; const timeoutForLargeFileUploadingTest = 20 * 60 * 1000; + const cleanupRetryDelay = 100; + const cleanupRetryMaxTries = 3; + + async function deleteContainerWithTransientRetry(): Promise { + for (let i = 1; i <= cleanupRetryMaxTries; i++) { + try { + await containerClient.delete(); + return; + } catch (err: any) { + if (err.code !== "ECONNRESET" || i === cleanupRetryMaxTries) { + throw err; + } + await sleep(cleanupRetryDelay * i); + } + } + } beforeEach(async () => { containerName = getUniqueName("container"); @@ -67,7 +84,7 @@ describe("BlockBlobHighlevel", () => { }); afterEach(async function () { - await containerClient.delete(); + await deleteContainerWithTransientRetry(); }); before(async () => { diff --git a/tests/blob/sqlBlobMetadataStorePool.test.ts b/tests/blob/sqlBlobMetadataStorePool.test.ts index be42fc5bf..4c9a3e34c 100644 --- a/tests/blob/sqlBlobMetadataStorePool.test.ts +++ b/tests/blob/sqlBlobMetadataStorePool.test.ts @@ -1,4 +1,5 @@ import * as assert from "assert"; +import { QueryTypes, Sequelize } from "sequelize"; import * as Models from "../../src/blob/generated/artifacts/models"; import Context from "../../src/blob/generated/Context"; @@ -146,4 +147,28 @@ describe("SqlBlobMetadataStore connection pool @sql", () => { await store.deleteContainer(createContext("conflict-4"), accountName, name); }); + + it("executes a three-byte length-coded parameter", async function () { + const sequelize = getSequelize(store); + const dialect = sequelize.getDialect(); + if (dialect !== "mysql" && dialect !== "mariadb") { + this.skip(); + } + + const value = "x".repeat(0x10000 + 1); + + const result = await sequelize.query<{ value: string }>( + "SELECT $value AS value", + { + bind: { value }, + type: QueryTypes.SELECT + } + ); + + assert.strictEqual(result[0].value, value); + }); + + function getSequelize(store: SqlBlobMetadataStore): Sequelize { + return (store as any).sequelize; + } });