-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[sdk/dotnet] Check for pulumiplugin.json
in package lookup
#8517
Conversation
This does not mean that I have added any tests. Just that the framework is setup.
Codecov Report
@@ Coverage Diff @@
## master #8517 +/- ##
==========================================
- Coverage 58.77% 58.61% -0.17%
==========================================
Files 633 634 +1
Lines 96388 96823 +435
Branches 1378 1378
==========================================
+ Hits 56649 56749 +100
- Misses 36477 36812 +335
Partials 3262 3262
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
} | ||
} | ||
|
||
func DeterminePluginDependency(packageDir, packageName, packageVersion string) (*pulumirpc.PluginDependency, error) { | ||
|
||
logging.V(5).Infof("GetRequiredPlugins: Determining plugin dependency: %v, %v, %v", | ||
packageDir, packageName, packageVersion) | ||
|
||
// Check for a `~/.nuget/packages/package_name/package_version/content/version.txt` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Maybe update this comment to mention pulumiplugin.json
as well?
logging.V(5).Infof("GetRequiredPlugins: err: %v", err) | ||
pulumiPlugin, err := plugin.LoadPulumiPluginJSON(pulumiPluginFilePath) | ||
if os.IsNotExist(err) { | ||
pulumiPlugin = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? Won't pulumiPlugin
already be nil
when err != nil
and therefore os.IsNotExists(err)
is true
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need the check, but not the assignment. I can fold it down to this
if err != nil && !os.IsNotExist(err) {
return nil, err
}
…pulumi#8517) * Check for `pulumiplugin.json` in package lookup * Update CHANGELOG_PENDING.md * Setup tests for dotnet/main.go This does not mean that I have added any tests. Just that the framework is setup. * Add tests and fix bugs * Fix nits
Description
Fixes #7244
Checklist