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
Plugin Framework: propagate logging output to Pulumi #891
Conversation
"github.com/pulumi/pulumi/sdk/v3/go/common/resource" | ||
) | ||
|
||
func TestLogging(t *testing.T) { |
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.
This is the interesting new bit, new package to connect up logging and the tests thereof.
Diff for pulumi-azuread with merge commit df5ce23 |
Diff for pulumi-random with merge commit df5ce23 |
Diff for pulumi-gcp with merge commit df5ce23 |
Diff for pulumi-azure with merge commit df5ce23 |
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.
What should be the default log level? Should it be INFO as in PR or should it be OFF by default until the user sets TF_LOG?
Since we will be consuming logs generated by providers written for TF, I think we should emulate what TF does.
Should we include timestamps or drop?
I don't generally find them useful, but no strong feelings either way.
Do we like source locators like provider/resource_integer.go:113 ? Seems somewhat useful for debugging
Love it
How about provider=random and providerVersion="..." - include or drop?
I think we should include, but lets shorten them to the way the plugin loader logs this:
Replace
provider=random providerVersion="4.12.0 alpha.1678477401+fa71af56.dirty"
With
provider=random@4.12.0alpha.1678477401+fa71af56.dirty
Any user-provided custom fields like a=1 should probably stay
🆗
Diff for pulumi-random with merge commit 20f4df3 |
Diff for pulumi-azuread with merge commit 20f4df3 |
Diff for pulumi-gcp with merge commit 20f4df3 |
Diff for pulumi-azure with merge commit 20f4df3 |
Diff for pulumi-azuread with merge commit 8a29e12 |
Diff for pulumi-random with merge commit 8a29e12 |
Diff for pulumi-azuread with merge commit eba64ec |
Diff for pulumi-random with merge commit eba64ec |
Diff for pulumi-gcp with merge commit 8a29e12 |
Diff for pulumi-azure with merge commit eba64ec |
Diff for pulumi-azuread with merge commit 28e449e |
Diff for pulumi-random with merge commit 28e449e |
Diff for pulumi-gcp with merge commit 28e449e |
Diff for pulumi-azure with merge commit 28e449e |
Diff for pulumi-azuread with merge commit 3452060 |
Diff for pulumi-random with merge commit 3452060 |
Diff for pulumi-gcp with merge commit 3452060 |
Diff for pulumi-azure with merge commit 3452060 |
So it turns out if one follows instructions from Pulumi troubleshooting page, the logs are written out to a file already, and Pulumi adds timestamps, so that's great. I removed timestamps at TF level. Addressed the other bits. Will merge once I get the tests to pass. |
Diff for pulumi-random with merge commit 0536183 |
Diff for pulumi-azuread with merge commit 0536183 |
Diff for pulumi-gcp with merge commit 0536183 |
Diff for pulumi-azure with merge commit 0536183 |
A recent PR #891 has accidentally changed the signature of an exported func NewProvider in the pf/tfbridge package. This function is used in tests including tests of pulumi-random provider and should not change. The original signature is now restored.
A recent PR #891 has accidentally changed the signature of an exported func NewProvider in the pf/tfbridge package. This function is used in tests including tests of pulumi-random provider and should not change. The original signature is now restored.
) A recent PR #891 has accidentally changed the signature of an exported func NewProvider in the pf/tfbridge package. This function is used in tests including tests of pulumi-random provider and should not change. The original signature is now restored.
Fixes #820
Dependencies (required upstream fixes to pass tests):
github.com/pulumi/pulumi/pkg/v3 v3.58.0
github.com/pulumi/pulumi/sdk/v3 v3.58.0
Currently this gives output that looks something like this through Pulumi CLI: