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

Schema loader made to respect PULUMI_DEBUG_PROVIDERS #15526

Merged
merged 1 commit into from Mar 4, 2024

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Feb 27, 2024

Description

With this change pulumi-yaml can pick up local provider and attach to it from PULUMI_DEBUG_PROVIDERS for the purposes of schema resolution, which enables using non-existent test-only providers. Before the change it would fail hard trying to download it.

Checklist

  • I have run make tidy to update any new dependencies
  • I have run make lint to verify my code passes the lint check
    • I have formatted my code using gofumpt
  • I have added tests that prove my fix is effective or that my feature works
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version

@t0yv0 t0yv0 requested a review from a team as a code owner February 27, 2024 22:11
@pulumi-bot
Copy link
Contributor

pulumi-bot commented Feb 27, 2024

Changelog

[uncommitted] (2024-03-04)

Features

  • [pkg] Make schema.NewPluginLoader respect PULUMI_DEBUG_PROVIDERS, which enables Pulumi YAML programs to work correctly with this feature
    #15526

pkg/codegen/schema/loader.go Outdated Show resolved Hide resolved
pkg/codegen/schema/loader.go Outdated Show resolved Hide resolved
if err != nil {
return nil, nil, err
}
// If PULUMI_DEBUG_PROVIDERS requested an attach port, skip caching and workspace
Copy link
Member

Choose a reason for hiding this comment

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

reasonable

This was referenced Feb 28, 2024
@t0yv0
Copy link
Member Author

t0yv0 commented Mar 4, 2024

"Prime Go Cache" job flaked with

##[debug]Dropping file value '/home/go/pkg/mod/github.com/!proton!mail/go-crypto@v0.0.0-20230828082145-3c4c8a2d2371/openpgp/internal/ecc/curve25519.go'. Path does not exist
Error: ../../../../go/pkg/mod/github.com/!proton!mail/go-crypto@v0.0.0-20230828082145-3c4c8a2d2371/openpgp/internal/ecc/curve25519.go:9:2: github.com/cloudflare/circl@v1.3.7: read "https://proxy.golang.org/github.com/cloudflare/circl/@v/v1.3.7.zip": stream error: stream ID 339; INTERNAL_ERROR; received from peer
##[debug]Dropping file value '/home/go/pkg/mod/github.com/!proton!mail/go-crypto@v0.0.0-20230828082145-3c4c8a2d2371/openpgp/internal/ecc/x448.go'. Path does not exist
Error: ../../../../go/pkg/mod/github.com/!proton!mail/go-crypto@v0.0.0-20230828082145-3c4c8a2d2371/openpgp/internal/ecc/x448.go:9:2: github.com/cloudflare/circl@v1.3.7: read "https://proxy.golang.org/github.com/cloudflare/circl/@v/v1.3.7.zip": stream error: stream ID 339; INTERNAL_ERROR; received from peer
##[debug]Dropping file value '/home/go/pkg/mod/github.com/!proton!mail/go-crypto@v0.0.0-20230828082145-3c4c8a2d2371/openpgp/internal/ecc/ed25519.go'. Path does not exist
Error: ../../../../go/pkg/mod/github.com/!proton!mail/go-crypto@v0.0.0-20230828082145-3c4c8a2d2371/openpgp/internal/ecc/ed25519.go:9:2: github.com/cloudflare/circl@v1.3.7: read "https://proxy.golang.org/github.com/cloudflare/circl/@v/v1.3.7.zip": stream error: stream ID 339; INTERNAL_ERROR; received from peer
##[debug]Dropping file value '/home/go/pkg/mod/github.com/!proton!mail/go-crypto@v0.0.0-20230828082145-3c4c8a2d2371/openpgp/internal/ecc/ed448.go'. Path does not exist
Error: ../../../../go/pkg/mod/github.com/!proton!mail/go-crypto@v0.0.0-20230828082145-3c4c8a2d2371/openpgp/internal/ecc/ed448.go:9:2: github.com/cloudflare/circl@v1.3.7: read "https://proxy.golang.org/github.com/cloudflare/circl/@v/v1.3.7.zip": stream error: stream ID 339; INTERNAL_ERROR; received from peer
Error: Process completed with exit code 1.
##[debug]Finishing: Prime Go cache


if version == nil {
info, _ := provider.GetPluginInfo() // nonfatal error
version = info.Version
Copy link
Member

Choose a reason for hiding this comment

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

Use contract.IgnoreError()

Co-authored-by: Thomas Gummerer <t.gummerer@gmail.com>
@t0yv0 t0yv0 force-pushed the t0yv0/schema-loader-respects-debug-providers branch from ce8ffce to ddb43d5 Compare March 4, 2024 21:38
@t0yv0 t0yv0 enabled auto-merge March 4, 2024 21:39
@t0yv0 t0yv0 added this pull request to the merge queue Mar 4, 2024
Merged via the queue into master with commit ee17f80 Mar 4, 2024
53 of 55 checks passed
@t0yv0 t0yv0 deleted the t0yv0/schema-loader-respects-debug-providers branch March 4, 2024 22:55
github-merge-queue bot pushed a commit that referenced this pull request Mar 6, 2024
### Features

- [pkg] Make schema.NewPluginLoader respect PULUMI_DEBUG_PROVIDERS,
which enables Pulumi YAML programs to work correctly with this feature
  [#15526](#15526)

- [sdk/python] Add support for asynchronous invokes via a new
`invoke_async` function
  [#15602](#15602)

- [sdkgen/dotnet] Support for non-overlay components in codegen for
pulumi-kubernetes provider
  [#15490](#15490)


### Bug Fixes

- [backend/service] Make decrypt/encrypt network calls retryable to help
work around network hiccups
  [#15600](#15600)

- [cli/new] Strip credentials and query strings from template URLs saved
to project
  [#15586](#15586)

- [engine] Fix an issue where snapshots could become invalid when doing
a targeted up
  [#15476](#15476)

- [sdk/python] Fix determining plugins for old packages in the Python
language host
  [#15576](#15576)

- [pkg/testing] Make ProgramTest use a temporary PULUMI_HOME for each
test
  [#15568](#15568)

- [sdkgen/dotnet] Codegen fix for resources without constant input
properties
  [#15488](#15488)
@justinvp justinvp mentioned this pull request Mar 7, 2024
github-merge-queue bot pushed a commit that referenced this pull request Mar 7, 2024
Draft changelog:

### Features

- [auto/{go,nodejs,python}] Add support for suppress progress and
suppress outputs parameters in the Automation API
  [#15596](#15596)

- [pkg] Make schema.NewPluginLoader respect PULUMI_DEBUG_PROVIDERS,
which enables Pulumi YAML programs to work correctly with this feature
  [#15526](#15526)

- [sdk/dotnet] Update dotnet language host to 3.60.0
  [#15609](#15609)

- [sdk/nodejs] Add experimental support to the NodeJS SDK for the new
transforms system.
  [#15532](#15532)

- [sdk/python] Add support for asynchronous invokes via a new
`invoke_async` function
  [#15602](#15602)

- [sdkgen/dotnet] Support for non-overlay components in codegen for
pulumi-kubernetes provider
  [#15490](#15490)


### Bug Fixes

- [cli] Fix a panic when the secrets provider is missing from the
deployment snapshot
  [#15599](#15599)

- [backend/service] Make decrypt/encrypt network calls retryable to help
work around network hiccups
  [#15600](#15600)

- [cli/new] Strip credentials and query strings from template URLs saved
to project
  [#15586](#15586)

- [engine] Fix an issue where snapshots could become invalid when doing
a targeted up
  [#15476](#15476)

- [pkg/testing] Make ProgramTest use a temporary PULUMI_HOME for each
test
  [#15568](#15568)

- [sdkgen/dotnet] Codegen fix for resources without constant input
properties
  [#15488](#15488)

- [sdk/nodejs] Properly capture node:crypto and global.crypto in node
19+

- [sdk/python] Fix determining plugins for old packages in the Python
language host
  [#15576](#15576)
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.

None yet

4 participants