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

Respect versions for dynamic providers #2220

Merged
merged 5 commits into from
Jul 22, 2024
Merged

Conversation

iwahbe
Copy link
Member

@iwahbe iwahbe commented Jul 22, 2024

This is necessary to generate easily consumable SDKs.

@iwahbe iwahbe self-assigned this Jul 22, 2024
Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.

Project coverage is 60.65%. Comparing base (59ab72c) to head (73cbc7c).
Report is 2 commits behind head on master.

Files Patch % Lines
pf/proto/schema.go 0.00% 10 Missing ⚠️
pf/tfbridge/provider_checkconfig.go 0.00% 5 Missing ⚠️
pf/tfbridge/provider.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2220      +/-   ##
==========================================
+ Coverage   60.61%   60.65%   +0.04%     
==========================================
  Files         356      356              
  Lines       46368    46433      +65     
==========================================
+ Hits        28104    28164      +60     
- Misses      16706    16709       +3     
- Partials     1558     1560       +2     

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

@@ -35,6 +36,7 @@ func providerInfo(ctx context.Context, p run.Provider, value parameterize.Value)
Name: p.Name(),
Version: p.Version(),
Description: "A Pulumi provider dynamically bridged from " + p.Name() + ".",
Publisher: "Pulumi",
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like this should be the author/publisher of the bridged provider.

Our docs describe publisher as: "The name of the person or organization that authored and published the package."

Given that there's not really any authoring here it should use the original author imo

Copy link
Member Author

Choose a reason for hiding this comment

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

We are the "publisher" of the bridged provider (if it is published), but not the author. It's a grey area IMO.

@@ -43,6 +45,19 @@ func providerInfo(ctx context.Context, p run.Provider, value parameterize.Value)
Path: "", Data: tfbridge.ProviderMetadata(nil),
},

Python: &tfbridge.PythonInfo{
PyProject: struct{ Enabled bool }{true},
RespectSchemaVersion: true,
Copy link
Member

Choose a reason for hiding this comment

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

You don't actually need to set RespectSchemaVersion. Having something in Parameterization tells codegen to require a version and embed it anyway.

@iwahbe iwahbe force-pushed the iwahbe/pre-dynamic-providers branch from bfb8fa4 to 73cbc7c Compare July 22, 2024 21:59
@iwahbe iwahbe enabled auto-merge (rebase) July 22, 2024 21:59
@iwahbe iwahbe merged commit e665ff6 into master Jul 22, 2024
11 checks passed
@iwahbe iwahbe deleted the iwahbe/pre-dynamic-providers branch July 22, 2024 23:42
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v3.88.0.

@mjeffryes mjeffryes added this to the 0.108 milestone Aug 16, 2024
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.

6 participants