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

Fix #3240: MicroTime serialises incorrectly; Add custom serializer/deserializer for MicroTime class #3299

Merged
merged 1 commit into from
Jul 21, 2021

Conversation

rohanKanojia
Copy link
Member

Description

Fix #3240

Add Custom MicroTime with custom Serializer/Deserializers in order to
convert to a timestamp string

Signed-off-by: Rohan Kumar [email protected]

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@rohanKanojia rohanKanojia changed the title Fix #3240: MicroTime serialises incorrectly Fix #3240: MicroTime serialises incorrectly; Add custom serializer/deserializer for MicroTime class Jul 6, 2021
@rohanKanojia rohanKanojia force-pushed the pr/issue3240 branch 6 times, most recently from 950de35 to 0490cbf Compare July 7, 2021 12:39
Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

As we discussed after today's stand-up, it would be much better if these fields that represent time were typed as OffsetDateTime , or any other type that properly represents timestamps with timezone information.

However, for consistency reasons and since the rest of fields we already have are parsed to timestamp strings, we can leave this for now.

For v6.0.0 it might be a good idea to convert all of those fields into a proper type.

These are some examples (there are many more) of timestamp fields that are currently typed as strings:

@rohanKanojia
Copy link
Member Author

I think it would be better if we have a new issue for addressing this.

@manusa
Copy link
Member

manusa commented Jul 8, 2021

I think it would be better if we have a new issue for addressing this.

Indeed, a new issue should be open to keep track of this and properly plan its implementation.

Add Custom MicroTime with custom Serializer/Deserializers in order to
convert to a timestamp string

Signed-off-by: Rohan Kumar <[email protected]>
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

78.9% 78.9% Coverage
0.0% 0.0% Duplication

@manusa manusa added this to the 5.6.0 milestone Jul 21, 2021
@manusa manusa merged commit aa8942a into fabric8io:master Jul 21, 2021
@LiamClarkeNZ
Copy link

As we discussed after today's stand-up, it would be much better if these fields that represent time were typed as OffsetDateTime , or any other type that properly represents timestamps with timezone information.

@manusa as an end user, that would be nice, it would make it easier to not get it wrong, especially when the K8s documentation isn't overly explicit about accepted formats. :)

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.

MicroTime serialises incorrectly
3 participants