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

Use absolute file path for local provider paths #66

Merged
merged 2 commits into from
Feb 16, 2024

Conversation

EronWright
Copy link
Contributor

A simple fix for the LocalProviderPath option, the path should be made absolute in the resultant Pulumi.yaml configuration block.

Repro: given a test case that overrides the local provider path:

test := pulumitest.NewPulumiTest(t, "helm-release-unknowns", opttest.LocalProviderPath("kubernetes", "../../../bin"))

The program fails with:

    /Users/eronwright/Pulumi/pulumi-kubernetes/tests/sdk/nodejs/helm_test.go:33: failed to installing packages and plugins: exit status 255
        error: parsing plugin options for 'kubernetes': no folder at path '../../../bin'

I believe this is because Pulumi attempts to resolve the provided path using the workspace directory. As is done with go.mod replacements, the test framework must resolve the path more eagerly.

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (8c45fd2) 33.45% compared to head (f751d46) 36.78%.
Report is 5 commits behind head on main.

Files Patch % Lines
pulumitest/newStack.go 57.14% 2 Missing and 1 partial ⚠️
pulumitest/install.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
+ Coverage   33.45%   36.78%   +3.33%     
==========================================
  Files          42       42              
  Lines        2571     2634      +63     
==========================================
+ Hits          860      969     +109     
+ Misses       1606     1561      -45     
+ Partials      105      104       -1     

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

@danielrbradley danielrbradley merged commit 4c326d6 into main Feb 16, 2024
4 checks passed
@danielrbradley danielrbradley deleted the eronwright/abs-path branch February 16, 2024 11:06
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.

2 participants