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

refactor: use timestamps for struct fields #1050

Merged
merged 2 commits into from
Jun 26, 2020

Conversation

SoManyHs
Copy link
Contributor

@SoManyHs SoManyHs commented Jun 25, 2020

Previously, we were converting timestamps into int64 types on Status structs. This change preserves the timestamp fields in time format, which makes timestamp fields in the JSONString output consistent with other JSON payloads (e.g. pipeline_show). It also simplifies the HumanString output logic.

This also includes a refactor of timestamps on Pipelines to use values rather than pointers.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@SoManyHs SoManyHs requested a review from a team as a code owner June 25, 2020 01:42
@SoManyHs SoManyHs requested a review from kohidave June 25, 2020 01:42
@SoManyHs SoManyHs requested a review from iamhopaul123 June 25, 2020 01:46
Copy link
Contributor

@iamhopaul123 iamhopaul123 left a comment

Choose a reason for hiding this comment

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

nice! Thank you for making this change!

@efekarakus efekarakus added the do-not-merge Pull requests that mergify shouldn't merge until the requester allows it. label Jun 25, 2020
@SoManyHs SoManyHs force-pushed the refactor-timestamps branch from 5758c40 to dc3ca23 Compare June 25, 2020 20:06
@efekarakus efekarakus removed the do-not-merge Pull requests that mergify shouldn't merge until the requester allows it. label Jun 26, 2020
@SoManyHs SoManyHs force-pushed the refactor-timestamps branch from dc3ca23 to 9b8c720 Compare June 26, 2020 18:41
@SoManyHs SoManyHs requested a review from efekarakus June 26, 2020 18:44
@@ -229,7 +230,7 @@ func (s *Service) ServiceStatus() ServiceStatus {
Status: aws.StringValue(s.Status),
DesiredCount: aws.Int64Value(s.DesiredCount),
RunningCount: aws.Int64Value(s.RunningCount),
LastDeploymentAt: s.Deployments[0].UpdatedAt.Unix(),
LastDeploymentAt: *s.Deployments[0].UpdatedAt, // FIXME Service assumed to have at least one deployment
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we an issue for this? would you mind creating it so we don't forget about it 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants