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

Copy both ObjectMeta and TypeMeta when doing version conversion #1985

Merged
merged 12 commits into from
Nov 18, 2021

Conversation

theunrepentantgeek
Copy link
Member

@theunrepentantgeek theunrepentantgeek commented Nov 17, 2021

What this PR does / why we need it:

Includes embedded properties when doing intra-version conversion of resources; copying of ObjectMeta is required to maintain the name of the resource.

Also simplifies ResourceType by removing support for arbitrary properties - we've found that we don't need it.

Resolves #1565

How does this PR make you feel:
gif

@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2021

Codecov Report

Merging #1985 (8d402b4) into main (0bb670f) will increase coverage by 0.03%.
The diff coverage is 95.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1985      +/-   ##
==========================================
+ Coverage   57.19%   57.23%   +0.03%     
==========================================
  Files         422      422              
  Lines       85526    85624      +98     
==========================================
+ Hits        48917    49007      +90     
+ Misses      30371    30353      -18     
- Partials     6238     6264      +26     
Impacted Files Coverage Δ
...tch/v1alpha1api20210101/batch_account_types_gen.go 44.52% <ø> (+0.90%) ⬆️
...2/tools/generator/internal/astmodel/object_type.go 79.69% <ø> (ø)
...s/generator/internal/astmodel/package_reference.go 91.81% <ø> (ø)
.../generator/internal/astmodel/property_container.go 100.00% <ø> (ø)
...rator/internal/conversions/property_conversions.go 75.25% <50.00%> (+0.04%) ⬆️
...al/conversions/readable_conversion_endpoint_set.go 92.00% <80.00%> (-3.13%) ⬇️
...al/conversions/writable_conversion_endpoint_set.go 93.93% <80.00%> (-6.07%) ⬇️
...tools/generator/internal/astmodel/resource_type.go 80.56% <83.33%> (-1.65%) ⬇️
...ha1api20200801preview/role_assignment_types_gen.go 63.07% <100.00%> (+0.19%) ⬆️
...soft.compute/v1alpha1api20200930/disk_types_gen.go 49.91% <100.00%> (+0.34%) ⬆️
... and 60 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0bb670f...8d402b4. Read the comment docs.

@theunrepentantgeek theunrepentantgeek merged commit b67f6a1 into main Nov 18, 2021
@theunrepentantgeek theunrepentantgeek deleted the feature/copy-objectmeta branch November 18, 2021 22:04
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.

Should we make it harder to add properties to Resources?
3 participants