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

az storage entity insert trying cast value as int32 when odata.type=Edm.Int64 #22018

Closed
jgercken opened this issue Apr 11, 2022 · 5 comments · Fixed by #22060
Closed

az storage entity insert trying cast value as int32 when odata.type=Edm.Int64 #22018

jgercken opened this issue Apr 11, 2022 · 5 comments · Fixed by #22060
Assignees
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. Storage az storage
Milestone

Comments

@jgercken
Copy link

This is autogenerated. Please review and update as needed.

Describe the bug

I'm explicitly casting the value as int64. This command syntax has worked ~300 times in the past year so I'm not sure what changed.

Command Name
az storage entity insert SizeInBytes=862225049223168 SizeInBytes@odata.type=Edm.Int64

Errors:

The command failed with an unexpected error. Here is the traceback:
862225049223168 is too large to be cast to type Edm.Int32.
Traceback (most recent call last):
  File "/opt/az/lib/python3.8/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
    raise ex
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 713, in _run_job
    return cmd_copy.exception_handler(ex)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/storage/__init__.py", line 385, in new_handler
    first(ex)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/storage/__init__.py", line 384, in new_handler
    raise ex
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/storage/operations/table.py", line 73, in insert_entity
    return client.upsert_entity(entity, mode='merge')
  File "/opt/az/lib/python3.8/site-packages/azure/core/tracing/decorator.py", line 83, in wrapper_use_tracer
    return func(*args, **kwargs)
  File "/opt/az/lib/python3.8/site-packages/azure/data/tables/_table_client.py", line 644, in upsert_entity
    entity = _add_entity_properties(entity)
  File "/opt/az/lib/python3.8/site-packages/azure/data/tables/_serialize.py", line 222, in _add_entity_properties
    mtype, value = conv(value)
  File "/opt/az/lib/python3.8/site-packages/azure/data/tables/_serialize.py", line 114, in _to_entity_int32
    raise TypeError(_ERROR_VALUE_TOO_LARGE.format(str(value), EdmType.INT32))
TypeError: 862225049223168 is too large to be cast to type Edm.Int32.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az storage entity insert --only-show-errors --account-name {} -t {} --if-exists {} -e {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}

Expected Behavior

Environment Summary

Linux-5.4.0-1074-azure-x86_64-with-glibc2.27, Ubuntu 18.04.6 LTS
Python 3.8.12
Installer: DEB

azure-cli 2.35.0

Additional Context

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage az storage labels Apr 11, 2022
@ghost ghost added this to the Backlog milestone Apr 11, 2022
@ghost ghost assigned evelyn-ys Apr 11, 2022
@ghost ghost added the Auto-Assign Auto assign by bot label Apr 11, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Apr 11, 2022

storage

@evelyn-ys evelyn-ys added the CXP Attention This issue is handled by CXP team. label Apr 12, 2022
@ghost
Copy link

ghost commented Apr 12, 2022

Thank you for your feedback. This has been routed to the support team for assistance.

@evelyn-ys
Copy link
Member

Need azure-data-tables Python SDK team to investigate

@navba-MSFT navba-MSFT self-assigned this Apr 12, 2022
@navba-MSFT
Copy link
Contributor

@jgercken Thanks for reaching out to us and sharing the feedback. I am looking into this issue and I will share my findings soon.

@navba-MSFT
Copy link
Contributor

@jgercken I am able to reproduce this issue at my end. I will check this further and get back to you with an update.

@navba-MSFT navba-MSFT added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. Storage az storage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants