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: integer fields are displayed as floats when using create with o=yaml #651

Merged
merged 5 commits into from
Dec 20, 2023

Conversation

phm07
Copy link
Contributor

@phm07 phm07 commented Dec 19, 2023

Continuation #650, closes #638

When outputting a resource after creation, it is first converted into a schema struct. This fixes bugs like #638 and also makes all schema outputs (describe, list, create) consistent.

@phm07 phm07 added the bug label Dec 19, 2023
@phm07 phm07 self-assigned this Dec 19, 2023
@phm07 phm07 requested a review from a team as a code owner December 19, 2023 12:09
@jooola
Copy link
Member

jooola commented Dec 19, 2023

The json output for the create commands has already been released with 1.40.0, I think its a bit late to introduce a breaking change. Could we use a workaround to wrap the schema? Maybe using inline structs ?

@phm07
Copy link
Contributor Author

phm07 commented Dec 19, 2023

Yeah, I'll add that

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (ee4c51e) 45.94% compared to head (52a9b08) 45.98%.
Report is 1 commits behind head on main.

❗ Current head 52a9b08 differs from pull request most recent head 178c671. Consider uploading reports for the commit 178c671 to get more accurate results

Files Patch % Lines
internal/cmd/volume/create.go 44.44% 2 Missing and 3 partials ⚠️
internal/cmd/certificate/create.go 78.57% 2 Missing and 1 partial ⚠️
internal/cmd/network/create.go 50.00% 2 Missing and 1 partial ⚠️
internal/cmd/floatingip/create.go 71.42% 0 Missing and 2 partials ⚠️
internal/cmd/primaryip/create.go 71.42% 1 Missing and 1 partial ⚠️
internal/cmd/util/util.go 0.00% 2 Missing ⚠️
internal/cmd/firewall/create.go 80.00% 0 Missing and 1 partial ⚠️
internal/cmd/loadbalancer/create.go 80.00% 0 Missing and 1 partial ⚠️
internal/cmd/placementgroup/create.go 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #651      +/-   ##
==========================================
+ Coverage   45.94%   45.98%   +0.03%     
==========================================
  Files         171      171              
  Lines        7517     7514       -3     
==========================================
+ Hits         3454     3455       +1     
+ Misses       3623     3616       -7     
- Partials      440      443       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jooola
Copy link
Member

jooola commented Dec 20, 2023

🚀

@phm07 phm07 merged commit 2d42fcd into main Dec 20, 2023
3 checks passed
@phm07 phm07 deleted the fix-yaml-output branch December 20, 2023 13:27
jooola pushed a commit that referenced this pull request Dec 21, 2023
🤖 I have created a release *beep* *boop*
---


##
[1.41.1](v1.41.0...v1.41.1)
(2023-12-21)


### Bug Fixes

* allow multiple --type flags for metrics commands
([#649](#649))
([69346f7](69346f7)),
closes [#642](#642)
* integer fields are displayed as floats when using create with o=yaml
([#651](#651))
([2d42fcd](2d42fcd))
* integer fields are displayed as floats when using describe with
-o=yaml ([#650](#650))
([ee4c51e](ee4c51e)),
closes [#638](#638)
* wording when metrics are not yet available
([#639](#639))
([9298c46](9298c46))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: integer fields are displayed as floats when using describe with o=yaml
2 participants