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

[Azure Tables] Check if request body exists before trying to convert it to JSON #2119

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

cpiment
Copy link

@cpiment cpiment commented Sep 5, 2024

What does this pull request do?

Checks existence of body payload in request to Azure Table service before trying to convert it into JSON, thus avoiding TypeError

Related issues

Closes #2118

@github-actions github-actions bot added agent-python community Issues opened by the community triage Issues awaiting triage labels Sep 5, 2024
Copy link
Member

@xrmx xrmx left a comment

Choose a reason for hiding this comment

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

Thanks, looks good. Needs a test in tests/contrib/serverless/azurefunctions/azure_functions_tests.py to avoid regressions in the future

@cpiment
Copy link
Author

cpiment commented Sep 6, 2024

Hi @xrmx , I'm developing the tests, but I have realized that the problem is that I'm using the new Python library for Azure Tables (package azure-data-tables) but the tests are done using the deprecated library (azure-cosmosdb-tables package). The deprecation warning is in the new package documentation: azure-data-tables

Should I keep tests for both libraries in tests/instrumentation/azure_tests.py? Or should I just remove the code that refers to azure-cosmosdb-tables?

@xrmx
Copy link
Member

xrmx commented Sep 6, 2024

Hi @xrmx , I'm developing the tests, but I have realized that the problem is that I'm using the new Python library for Azure Tables (package azure-data-tables) but the tests are done using the deprecated library (azure-cosmosdb-tables package). The deprecation warning is in the new package documentation: azure-data-tables

Interesting

Should I keep tests for both libraries in tests/instrumentation/azure_tests.py? Or should I just remove the code that refers to azure-cosmosdb-tables?

tests for cosmosdb need to be kept

@cpiment
Copy link
Author

cpiment commented Sep 6, 2024

Hi @xrmx, I have just pushed the requested changes. Thanks for your help

@cpiment
Copy link
Author

cpiment commented Sep 11, 2024

Hi @xrmx, have you had time to review the changes? I'm thinking maybe the PR should be renamed to "Support for azure-data-tables", what do you think?

Thanks for your help.

@cpiment
Copy link
Author

cpiment commented Oct 22, 2024

Hi @xrmx, do you need anything else by my side? Is there any way I can help to make this change to be reviewed and (hopefully) merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-python community Issues opened by the community triage Issues awaiting triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

APM-Instrumented Azure Function crashes when querying to Azure Table
2 participants