-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Batch Workaround for Deserialization of Long Properties #40301
Conversation
Assertions.assertEquals(OffsetDateTime.parse("2022-01-01T00:00:00Z"), stats.getStartTime()); | ||
Assertions.assertEquals(OffsetDateTime.parse("2022-01-01T01:00:00Z"), stats.getLastUpdateTime()); | ||
Assertions.assertEquals(Duration.parse("PT1H"), stats.getUserCpuTime()); | ||
Assertions.assertEquals(Duration.parse("PT30M"), stats.getKernelCpuTime()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added assertions to check the values of all of the properties in every class, but I'm wondering if that might be overkill—Would it be better to just assert the values of the long properties only? (e.g. only readIOps, writeIOps, numSucceededTasks, numFailedTasks, numTaskRetries in this case)
API change check APIView has identified API level changes in this PR and created following API reviews. |
85cb7a0
to
364ec10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update test recordings
364ec10
to
6cd6e00
Compare
6cd6e00
to
d436673
Compare
Addressed comment and updated the test recordings
Description
There is a bug in the Batch Service: all properties defined as longs in our TypeSpec are returned from the service side as strings.
The service team is working on a fix for this issue in our next API release.
In the meantime, this PR temporarily resolves the bug by:
Once the new API is released on the service side, we will revert these temporary deserialization changes and verify that the service side logic works with the test coverage added in this PR.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines