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

Make pf data source map mutable #2616

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

VenelinMartinov
Copy link
Contributor

@VenelinMartinov VenelinMartinov commented Nov 13, 2024

This change makes the PF datasources map mutable in order to support aliases like we do for resources.

The changes here mimic what we did for resources in #1938

Related to #2585

@VenelinMartinov
Copy link
Contributor Author

VenelinMartinov commented Nov 13, 2024

@VenelinMartinov VenelinMartinov changed the title make pf data source map mutable Make pf data source map mutable Nov 13, 2024
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 43.58974% with 22 lines in your changes missing coverage. Please review.

Project coverage is 62.78%. Comparing base (317d4b8) to head (b91cc6e).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...f/tests/internal/providerbuilder/build_provider.go 17.64% 12 Missing and 2 partials ⚠️
...tests/internal/providerbuilder/build_datasource.go 0.00% 6 Missing ⚠️
pkg/pf/internal/schemashim/schemashim.go 75.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2616      +/-   ##
==========================================
- Coverage   62.80%   62.78%   -0.02%     
==========================================
  Files         389      390       +1     
  Lines       51939    51953      +14     
==========================================
- Hits        32622    32621       -1     
- Misses      17509    17524      +15     
  Partials     1808     1808              

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

Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

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

This looks fine as long as we don't cast out of newSchemaOnlyDataSourceMap(...). We are just casting away information.

@VenelinMartinov VenelinMartinov force-pushed the make-pf-data-source-map-mutable branch from e27ced9 to b91cc6e Compare November 14, 2024 15:54
@VenelinMartinov
Copy link
Contributor Author

This looks fine as long as we don't cast out of newSchemaOnlyDataSourceMap(...). We are just casting away information.

What do you mean here? Which cast are you referring to?

@iwahbe
Copy link
Member

iwahbe commented Nov 14, 2024

This looks fine as long as we don't cast out of newSchemaOnlyDataSourceMap(...). We are just casting away information.

What do you mean here? Which cast are you referring to?

newSchemaOnlyDataSourceMap discards information going from runtypes.DataSources to shim.ResourceMap. That's what I meant.

Base automatically changed from add-datasources-to-pf to master November 14, 2024 16:53
@VenelinMartinov VenelinMartinov merged commit fd8c906 into master Nov 14, 2024
17 checks passed
@VenelinMartinov VenelinMartinov deleted the make-pf-data-source-map-mutable branch November 14, 2024 16:54
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v3.96.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
Development

Successfully merging this pull request may close these issues.

3 participants