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

Change StreamVideo.Duration type from int to float64. #1190

Merged
merged 4 commits into from
Jun 6, 2023

Conversation

ryotarai
Copy link
Contributor

@ryotarai ryotarai commented Jan 30, 2023

Description

Calling StreamListVideos raises the following exception because StreamVideo.Duration is int but Cloudflare API returns a decimal number:

json: cannot unmarshal number 66.67 into Go struct field StreamVideo.result.duration of type int

Has your change been tested?

Yes. All unit tests has passed and calling StreamListVideos on our account has succeeded.

Types of changes

This is a bug fix and breaks compatibility (a little) because Duration type has been changed.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented (api.cloudflare.com or developers.cloudflare.com) and stable APIs.

Closes #1096

@github-actions
Copy link
Contributor

changelog detected ✅

@codecov-commenter
Copy link

Codecov Report

Merging #1190 (b78b89e) into master (6153c1e) will decrease coverage by 0.05%.
The diff coverage is 49.79%.

@@            Coverage Diff             @@
##           master    #1190      +/-   ##
==========================================
- Coverage   49.40%   49.36%   -0.05%     
==========================================
  Files         127      128       +1     
  Lines       12290    12430     +140     
==========================================
+ Hits         6072     6136      +64     
- Misses       4840     4890      +50     
- Partials     1378     1404      +26     
Impacted Files Coverage Δ
access_organization.go 64.70% <ø> (ø)
cloudflare.go 68.08% <0.00%> (-0.63%) ⬇️
cloudflare_experimental.go 0.00% <0.00%> (ø)
magic_transit_ipsec_tunnel.go 46.15% <ø> (ø)
rulesets.go 35.09% <ø> (ø)
stream.go 64.91% <ø> (ø)
teams_rules.go 44.94% <0.00%> (-0.52%) ⬇️
utils.go 72.72% <ø> (ø)
mtls_certificates.go 26.59% <26.59%> (ø)
workers_bindings.go 67.44% <40.00%> (-2.31%) ⬇️
... and 14 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Schachte
Copy link

Schachte commented Jun 6, 2023

Thanks @ryotarai for the change! We have a change internally that will be pushed through this week to update the public-facing docs as well.

@jacobbednarz jacobbednarz merged commit 8719971 into cloudflare:master Jun 6, 2023
@github-actions github-actions bot added this to the v0.69.0 milestone Jun 6, 2023
github-actions bot pushed a commit that referenced this pull request Jun 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

This functionality has been released in v0.69.0.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StreamVideo.duration - incorrect type
4 participants