Skip to content

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

@jgercken

Description

@jgercken

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

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botCXP AttentionThis issue is handled by CXP team.Storageaz storagebugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions