-
Notifications
You must be signed in to change notification settings - Fork 207
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
Fixing dw query builder to handle Unicode characters #1901
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need more background on changes
and a test to validate |
There is a test already which was failing do to this. that test passes now. |
/azp run |
Azure Pipelines successfully started running 6 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some changes to get things near passing.
elif [[ $# -eq 1 ]]; then | ||
databaseType=$1; | ||
if ! { [ $databaseType == "mssql" ] || [ $databaseType == "mysql" ] || [ $databaseType == "postgresql" ] || [ $databaseType == "cosmosdb_nosql" ]; }; then | ||
echo "Valid arguments are mssql, mysql, postgresql or cosmosdb_nosql"; | ||
if [[ " ${allowedDbTypes[@]} " =~ " ${databaseType} " ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [[ " ${allowedDbTypes[@]} " =~ " ${databaseType} " ]]; then | |
if [[ ! " ${allowedDbTypes[@]} " =~ " ${databaseType} " ]]; then |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 86 has error:
arguments: '--filter "TestCategory=DwSql" --no-build --configuration $(buildConfiguration) --collect "XPlat Code coverage"'
should be all lowercase dwsql
arguments: '--filter "TestCategory=dwsql" --no-build --configuration $(buildConfiguration) --collect "XPlat Code coverage"'
inputs: | ||
targetType: 'inline' | ||
script: | | ||
password=$(cat /dev/urandom | tr -dc 'A-Za-z0-9_!@#$%^&*()\-+=' | head -c24) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to avoid issues related to needing escape characters for certain sequences, you should remove @
and $
per:
https://learn.microsoft.com/en-us/sql/relational-databases/security/strong-passwords?view=sql-server-ver16#:~:text=Starts%20with%20the%20%24%20or%20%40%20character.
Because logins, user names, roles, and passwords are frequently used in Transact-SQL statements, certain symbols must be enclosed by double quotation marks (") or square brackets ([ ]). Use these delimiters in Transact-SQL statements when the SQL Server login, user, role, or password has the following characteristics:
Contains or starts with a space character.
Starts with the $ or @ character.
…e characters (#1907) - Fixes errors in `dw-sql` pipeline for Linux OS type - Original PR with the changes: [#1901 ](#1901) # Description from the mentioned PR ## Why make this change? Dw pipeline test case was failing due to incorrect parsing for chinese characters. In addition, dw pipeline was not enabled for linux. ## What is this change? Use the N' prefix that handles unicode characters correctly when building the json in dw. Added the db type in the config-generator.sh ## Tests Unique characters test case passes along with other test cases. Co-Author: @rohkhann --------- Co-authored-by: Rohan Khanna <rohkhann@microsoft.com> Co-authored-by: rohkhann <124841904+rohkhann@users.noreply.github.com> Co-authored-by: Sean Leonard <sean.leonard@microsoft.com>
closing as this was merged with different branch. Co-author tag added to ensure you're credited for this work. |
Why make this change?
Dw pipeline test case was failing due to incorrect parsing for chinese characters.
In addition, dw pipeline was not enabled for linux.
What is this change?
Use the N' prefix that handles unicode characters correctly when building the json in dw.
Added the db type in the config-generator.sh
Tests
Unique characters test case passes along with other test cases.