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 a panic due to non-primitive defaults #136

Merged
merged 7 commits into from
May 14, 2024
Merged

Conversation

blampe
Copy link
Contributor

@blampe blampe commented May 14, 2024

The Pulumi schema doesn't support default values for non-primitive types -- objects and arrays, specifically.

This PR fixes the panic by only setting a default value when the object is primitive.

Fixes #61.
Fixes #68.
Fixes #125.
Fixes #105.

@blampe blampe requested review from rquitales and EronWright May 14, 2024 19:25
Copy link
Member

@rquitales rquitales left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from blampe/vm to master May 14, 2024 22:49
Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.45%. Comparing base (6d25f60) to head (97033cc).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   79.37%   79.45%   +0.08%     
==========================================
  Files          17       17              
  Lines         737      740       +3     
==========================================
+ Hits          585      588       +3     
  Misses         88       88              
  Partials       64       64              

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

@blampe blampe merged commit 13bd703 into master May 14, 2024
5 checks passed
@blampe blampe deleted the blampe/default-map branch May 14, 2024 23:12
@benglewis
Copy link

@blampe Thank you very much for merging a fix. This issue is very annoying. Would it be possible to release a new version of crd2pulumi with the fix? 🙏

@pulumi-bot
Copy link

This PR has been shipped in release v1.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants