Skip to content
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

[BUG] table_input - row_key parameter is ignored #848

Open
obesser opened this issue May 4, 2023 · 5 comments
Open

[BUG] table_input - row_key parameter is ignored #848

obesser opened this issue May 4, 2023 · 5 comments

Comments

@obesser
Copy link

obesser commented May 4, 2023

I am using Azurite to test this binding. While the partition_key and filter parameters work as expected, the row_key parameters seems to be completely ignored.

@app.route(route="req")
@app.table_input(connection="CS", arg_name="arg", table_name="table_name", partition_key="xxx", row_key="abc")
def main(req: func.HttpRequest, arg):
    return arg

This is the Azurite trace message when invoking the function, RowKey is not being added to the filter:
GET /devstoreaccount1/table_name()?$format=application%2Fjson%3Bodata%3Dminimalmetadata&$filter=PartitionKey%20eq%20%27xxx%27 HTTP/1.1

Core Tools Version: 4.0.5095 Commit hash: N/A (64-bit)
Function Runtime Version: 4.16.5.20396

@bhagyshricompany bhagyshricompany self-assigned this May 5, 2023
@bhagyshricompany
Copy link

bhagyshricompany commented May 5, 2023

Thanks for informing pls share the all repro steps

@obesser
Copy link
Author

obesser commented May 7, 2023

Repro steps

You can use Storage Explorer and the Azurite emulator or an actual Azure Storage Table to perform these steps.

  1. Create a table named table_name
  2. Insert 2 entities:
    PartitionKey: xxx, RowKey: abc
    PartitionKey: xxx, RowKey: def
  3. Create an App setting named CS with the table connection string (the above link contains a connection string for the emulator).
  4. Run the above function, no additional packages required. The function should return only the abc entity, but it returns both of them.

@pdthummar
Copy link

@obesser Thanks for reporting the issue. I have replicated the issue and it returns both. Transferring to extension team for further investigation.

@pdthummar pdthummar transferred this issue from Azure/azure-functions-python-worker May 24, 2023
@ghost ghost added the Needs: Triage 🔍 label May 24, 2023
@bhagyshricompany bhagyshricompany removed their assignment Jul 31, 2023
@mpth
Copy link

mpth commented Jun 18, 2024

I just spent hours debugging this until I found this issue. I'm surprised this is over a year old and not fixed yet.
I'm sure it used to work and broke at some point after upgrading the functions runtime.

Maybe you should add a warning to the docs that this here is just not working.

https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook-trigger?tabs=python-v2%2Cisolated-process%2Cnodejs-v4%2Cfunctionsv2&pivots=programming-language-javascript#using-route-parameters

In my case, I'm using node, not python and I tried both v3 and v4 programming models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants