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

createdAt Payload is not returning correct type on eks describe-cluster - returning string instead of number #6224

Closed
2 tasks done
tmk1991 opened this issue Jun 15, 2021 · 5 comments
Assignees
Labels
bug This issue is a bug. documentation This is a problem with documentation. eks p2 This is a standard priority issue

Comments

@tmk1991
Copy link

tmk1991 commented Jun 15, 2021

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
Documentation shows aws eks describe-cluster as having createdAt payload be The Unix epoch timestamp in seconds for when the cluster was created but returns date string

See docs: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/eks/describe-cluster.html#examples

Says it expects a number for createdAt when actually it returns a string: 2021-06-14T14:28:14.425000-04:00

Platform/OS/Hardware/Device
Centos 8

To Reproduce (observed behavior)
Steps to reproduce the behavior

  • Describe cluster with v2 CLI and get a date string
  • Describe cluster with v1 get UNIX second number

Expected behavior
Expect v2 CLI to return createdAt as a UNIX second string

@tmk1991 tmk1991 added the needs-triage This issue or PR still needs to be triaged. label Jun 15, 2021
@stobrien89 stobrien89 self-assigned this Jun 16, 2021
@stobrien89 stobrien89 added eks investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Jun 16, 2021
@stobrien89
Copy link
Member

Hi @tmk1991,

Thanks for pointing this out! Looking into this a bit further.

@tim-finnigan
Copy link
Contributor

tim-finnigan commented Nov 23, 2021

The DescribeCluster API does return a UNIX timestamp but the CLI converts it into a ISO 8601 format by default in v2 (see https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration-changes.html#cliv2-migration-timestamp). I think the v2 documentation example should be updated to reflect that.

@tim-finnigan tim-finnigan added the documentation This is a problem with documentation. label Nov 23, 2021
@stobrien89 stobrien89 removed the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Jan 7, 2022
@stobrien89 stobrien89 removed their assignment Jan 7, 2022
@sumanthst25
Copy link

The same behavior is observed in describe-images ECR CLI command where the document mentions imagePushedAt to be in JavaScript date format but the results are presented in ISO format because of the default behavior of AWS CLI version2.

@tim-finnigan tim-finnigan added bug This issue is a bug. p2 This is a standard priority issue labels Nov 15, 2022
@tim-finnigan tim-finnigan self-assigned this Oct 30, 2024
@tim-finnigan
Copy link
Contributor

It looks like the example has since been fixed. As noted earlier here in the issue, the underlying DescribeCluster API is returning a timestamp, but in v2 the default behavior is to return those in ISO 8601 format.

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 bug. documentation This is a problem with documentation. eks p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

4 participants