Skip to content

Conversation

@lucyzhang929
Copy link
Contributor

This PR adds a task in the build pipeline to copy the latest sql dll to the extension bundle so that the latest changes can be used for non-CSharp tests. Passing ad hoc build https://mssqltools.visualstudio.com/CrossPlatBuildScripts/_build/results?buildId=174829&view=results

I also realized that the case sensitive test was failing after this PR: #388 (my bad for not noticing that the PR validation was not running when I merged in the PR). The test failed because we cache the table info for 10 minutes so when we change the table collation back to case insensitive, SqlAsyncCollector still thinks the collation is case sensitive.

I couldn't figure out why the cache was being missed previously (the cache was empty during the second upsert) and I didn't change the caching logic is this PR #388 so not sure what exact change caused the table caching to work.


// Change database collation to case sensitive
this.ExecuteNonQuery($"ALTER DATABASE {this.DatabaseName} COLLATE Latin1_General_CS_AS");
this.ExecuteNonQuery($"ALTER DATABASE {this.DatabaseName} SET Single_User WITH ROLLBACK IMMEDIATE; ALTER DATABASE {this.DatabaseName} COLLATE Latin1_General_CS_AS; ALTER DATABASE {this.DatabaseName} SET Multi_User;");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Modified this because I was getting the following error when running this test locally:
The database could not be exclusively locked to perform the operation

@lucyzhang929 lucyzhang929 marked this pull request as draft October 13, 2022 19:06
@lucyzhang929 lucyzhang929 marked this pull request as ready for review October 13, 2022 19:44
@lucyzhang929 lucyzhang929 merged commit 04fc7c4 into main Oct 13, 2022
@lucyzhang929 lucyzhang929 deleted the luczhan/updateextensionbundle branch October 13, 2022 20:19
PBBlox pushed a commit to PBBlox/azure-functions-sql-extension that referenced this pull request Apr 6, 2025
* cp sql dll to extension bundle

* remove quotes + add windows condition

* fix path

* add bin to path + add linux

* use source folder

* use preview path

* add overwrite and ignore mkdir errors

* fix target folder path

* remove ignoreMakeDirErrors

* add wait for case sensitivity test

* use one task

* set cache timeout to 0

* fix target path

* pr comments + add timeout var linux

* set cache to 0 for one test
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