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

boto3 fails to submit Batch job with env var in eks pod properties override with a string value of ISO date #4250

Closed
igoichuk opened this issue Aug 27, 2024 · 2 comments
Labels
bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged.

Comments

@igoichuk
Copy link

Describe the bug

I am submitting a job with an environment variable with the value 2024-08-01 that results in a type error. With any other value it works.

  File "/opt/homebrew/Caskroom/miniforge/base/envs/batch/lib/python3.9/site-packages/botocore/client.py", line 569, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/batch/lib/python3.9/site-packages/botocore/client.py", line 980, in _make_api_call
    request_dict = self._convert_to_request_dict(
  File "/opt/homebrew/Caskroom/miniforge/base/envs/batch/lib/python3.9/site-packages/botocore/client.py", line 1047, in _convert_to_request_dict
    request_dict = self._serializer.serialize_to_request(
  File "/opt/homebrew/Caskroom/miniforge/base/envs/batch/lib/python3.9/site-packages/botocore/validate.py", line 381, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter eksPropertiesOverride.podProperties.containers[0].env[4].value, value: 2024-08-01, type: <class 'datetime.date'>, valid types: <class 'str'>

Expected Behavior

No reason to fail here

Current Behavior

The current behaviour is the error above.

Reproduction Steps

Submit EKS job with eksPropertiesOverride where you specify environment variables for the container. Make a value of any of the variables an ISO date string.

Possible Solution

code fix

Additional Information/Context

No response

SDK version used

boto3-1.35.7 botocore-1.35.7

Environment details (OS name and version, etc.)

Macos 14.6.1

@igoichuk igoichuk added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Aug 27, 2024
@igoichuk
Copy link
Author

I provided datatime.date not converted to a string in the parameters where it expected string, converting to a string resolved the issue

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant