Skip to content

PowerShell NULL and function file updates #531

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 17 commits into from
Nov 28, 2022
Merged

Conversation

VasuBhog
Copy link
Contributor

@VasuBhog VasuBhog commented Nov 22, 2022

Fixes #443. As I found a current workaround using $TriggerMetadata and followed up with a tracking issue in the powershell worker repo here.

I also discussed with Francisco from the PowerShell team that we should use the latest worker version and include $TriggerMetadata in our samples as it can be used instead of $Request as it is given as default in powershell azure functions. I added casting to some of the PowerShell functions in order to match precisely the same way we set them up from C# samples.

I have root caused the issue with the AddProductWithIdentity tests as there seems to be an issue with the GenerateDataQueryForMerge as the tests seem to generate the INSERT INTO values in the wrong order as how they are defined in the table. As such, there is a failure during the dotnet test. I will address this in the next PR.

@chlafreniere
Copy link
Contributor

@VasuBhog please split this out into 2 different PRs

@VasuBhog
Copy link
Contributor Author

@VasuBhog please split this out into 2 different PRs

Mac PR: #533

@VasuBhog VasuBhog changed the title PowerShell and Mac fixes PowerShell NULL and function file updates Nov 22, 2022
Copy link
Contributor

@Charles-Gagnon Charles-Gagnon left a comment

Choose a reason for hiding this comment

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

You still have one failing powershell test too

@@ -47,9 +47,6 @@ public void AddProductTest(int id, string name, int cost, SupportedLanguages lan
[SqlInlineData(1, "Test", 5)]
[SqlInlineData(0, "", 0)]
[SqlInlineData(-500, "ABCD", 580)]
// Currently PowerShell and Java functions return null when the parameter for name is an empty string
// Issue link: https://github.com/Azure/azure-functions-sql-extension/issues/443
[UnsupportedLanguages(SupportedLanguages.PowerShell, SupportedLanguages.Java)]
Copy link
Contributor

Choose a reason for hiding this comment

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

These are still failing for Java it seems.

@lucyzhang929 - possibly a similar issue for their worker. So something to follow up with them about when you get around to investigating this.

@VasuBhog VasuBhog merged commit 195e4f6 into main Nov 28, 2022
@VasuBhog VasuBhog deleted the vabhog/fixMacTesting branch November 28, 2022 19:36
PBBlox pushed a commit to PBBlox/azure-functions-sql-extension that referenced this pull request Apr 6, 2025
* null case test

* update all powershell funcs to include triggermetadata
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.

PowerShell issue - empty string is upserted as NULL in DB
4 participants