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

Every action on the provider results in the api calls being output to the console. #9

Closed
zbuchheit opened this issue May 10, 2024 · 7 comments · Fixed by pulumi/pulumi#17943
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@zbuchheit
Copy link
Contributor

What happened?

While using the provider, all resources I was creating or functions I was using resulted in the corresponding api call being logged to the output.

Example

import * as pulumi from "@pulumi/pulumi";
import * as ise from "@pulumi/ise";


    const username = process.env["ISE_USERNAME"] || "";
    const password = process.env["ISE_PASSWORD"] || "";
    if (username === "" || password === "") {
        throw new Error("Missing ISE username and/or password");
    }

    const url = process.env["ISE_URL"] || "";
    if (url === "") {
        throw new Error("Missing ISE URL");
    }

    const provider = new ise.Provider("ise", {
        username: username,
        password: password,
        url: url,
        retries: 0
    });

    const pulumiEmployeeGroup = new ise.identitymanagement.UserIdentityGroup("pulumi-employee-group", {
        name: "PulumiEmployeeGroup",
        description: "My pulumi employee identity group",
    });
Updating (dev):
     Type                                         Name                   Status              Info
 +   pulumi:pulumi:Stack                          zbuchheit-ise-dev      created (2s)        3 messages
 +   ├─ pulumi:providers:ise                      ise                    created (0.06s)
 +   └─ ise:identitymanagement:UserIdentityGroup  pulumi-employee-group  created (0.44s)
Diagnostics:
  pulumi:pulumi:Stack (zbuchheit-ise-dev):
    2024/05/10 01:32:35 [DEBUG] HTTP Request: POST, https://{REDACTED}/ers/config/identitygroup, {{"IdentityGroup":{"name":"PulumiEmployeeGroup","description":"My pulumi employee identity group"}}}
    2024/05/10 01:32:36 [DEBUG] HTTP Response:
    2024/05/10 01:32:36 [DEBUG] Exit from Do method

Output of pulumi about

CLI
Version      3.115.2
Go Version   go1.22.2
Go Compiler  gc

Plugins
KIND      NAME    VERSION
resource  ise     0.1.1
language  nodejs  unknown

Host
OS       Microsoft Windows Server 2022 Datacenter
Version  10.0.20348 Build 20348
Arch     x86_64

This project is written in nodejs: executable='C:\Program Files\nodejs\node.exe' version='v20.13.1'

Backend
Name           EC2AMAZ-V236MOS
URL            file://~
User           EC2AMAZ-V236MOS\Administrator
Organizations
Token type     personal

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@zbuchheit zbuchheit added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels May 10, 2024
@VenelinMartinov VenelinMartinov added blocked The issue cannot be resolved without 3rd party action. and removed needs-triage Needs attention from the triage team labels May 13, 2024
@VenelinMartinov
Copy link
Contributor

VenelinMartinov commented May 13, 2024

Thanks for reporting and for the detailed repro!

Unfortunately, we'd need to sort out access credentials for the provider before we can address issues here.

Opened #16

@zbuchheit
Copy link
Contributor Author

adding some additional details to this as i have created my own instance of ISE in AWS.

In my testing, the provider is behaving as if the TF_LOG level is set to DEBUG automatically. When I test the equivalent in TF, I don't get the same behavior so this does appear to be a bug in the bridged provider.

@VenelinMartinov
Copy link
Contributor

VenelinMartinov commented Aug 9, 2024

Note similar issues in Meraki and pulumi/pulumi-databricks#474.
Potentially related too: pulumi/pulumi-gitlab#514

@zbuchheit
Copy link
Contributor Author

When digging into it, it looks like this is likely coming from the go library used. That being said, I am curious why this behaves differently in the upstream provider.

source: https://github.com/netascode/go-ise/blob/b9cb4ca5f659fcad3ca9b0d4526abcfa5766e390/client.go#L142

@iwahbe
Copy link
Member

iwahbe commented Oct 29, 2024

When digging into it, it looks like this is likely coming from the go library used. That being said, I am curious why this behaves differently in the upstream provider.

source: https://github.com/netascode/go-ise/blob/b9cb4ca5f659fcad3ca9b0d4526abcfa5766e390/client.go#L142

Terraform doesn't display provider stdout to the user by default, but we do. pulumi/pulumi-terraform-bridge#2489 tracks that discrepancy.

iwahbe added a commit to pulumi/pulumi-terraform-bridge that referenced this issue Dec 5, 2024
Will fix (probably) pulumi/pulumi-ise#9

<!-- Word order above is to work around GitHub's auto-fix mechanism --!>
iwahbe added a commit to pulumi/pulumi-terraform-bridge that referenced this issue Dec 5, 2024
Will fix (probably) pulumi/pulumi-ise#9

<!-- Word order above is to work around GitHub's auto-fix mechanism --!>
iwahbe added a commit to pulumi/pulumi-terraform-bridge that referenced this issue Dec 5, 2024
Will fix (probably) pulumi/pulumi-ise#9

<!-- Word order above is to work around GitHub's auto-fix mechanism --!>
iwahbe added a commit to pulumi/pulumi-terraform-bridge that referenced this issue Dec 5, 2024
Will fix (probably) pulumi/pulumi-ise#9

<!-- Word order above is to work around GitHub's auto-fix mechanism --!>
iwahbe added a commit to pulumi/pulumi-terraform-bridge that referenced this issue Dec 5, 2024
Will fix (probably) pulumi/pulumi-ise#9

<!-- Word order above is to work around GitHub's auto-fix mechanism --!>
iwahbe added a commit to pulumi/pulumi-terraform-bridge that referenced this issue Dec 5, 2024
Will fix (probably) pulumi/pulumi-ise#9

Related to #2489

---

By not calling the redirect, all logs were shown directly to the user
(as INFO logs). This gets PF to respect TF_LOG, similar to /pkg.
iwahbe added a commit to pulumi/pulumi that referenced this issue Dec 6, 2024
This commit changes the log level from plugin stdout&stderr to debug, from info. This
change is significant because info is shown by default to users, but debug is not. While
this is a change of plugin aesthetics, it does not effect any runtime behavior. All
plugins, both component providers and custom resource providers, are effected.

> [!IMPORTANT]
> This is a breaking change, in that information which used to be displayed to users will
> now be hidden by default.
>
> We will need to share this change with our users before rolling it out.

The providers team has met and believe that this is the best approach for our
ecosystem. For a full discussion on why this change is necessary, see
[this doc](https://docs.google.com/document/d/1yYrwTwsNoayaIzKyG1l5cl0MjJxiHLsH4NqAvZkQN-I/edit?tab=t.0#heading=h.34v61lg1x4kl).

Fixes pulumi/pulumi-terraform-bridge#2489
Fixes pulumi/pulumi-cloudngfwaws#23
Fixes pulumi/pulumi-ise#9

Taking this change will allow us to revert:
- pulumi/pulumi-databricks#609
- pulumi/pulumi-aws#4650
iwahbe added a commit to pulumi/pulumi that referenced this issue Dec 6, 2024
This commit changes the log level from plugin stdout&stderr to debug, from info. This
change is significant because info is shown by default to users, but debug is not. While
this is a change of plugin aesthetics, it does not effect any runtime behavior. All
plugins, both component providers and custom resource providers, are effected.

> [!IMPORTANT]
> This is a breaking change, in that information which used to be displayed to users will
> now be hidden by default.
>
> We will need to share this change with our users before rolling it out.

The providers team has met and believe that this is the best approach for our
ecosystem. For a full discussion on why this change is necessary, see
[this doc](https://docs.google.com/document/d/1yYrwTwsNoayaIzKyG1l5cl0MjJxiHLsH4NqAvZkQN-I/edit?tab=t.0#heading=h.34v61lg1x4kl).

Fixes pulumi/pulumi-terraform-bridge#2489
Fixes pulumi/pulumi-cloudngfwaws#23
Fixes pulumi/pulumi-ise#9

Taking this change will allow us to revert:
- pulumi/pulumi-databricks#609
- pulumi/pulumi-aws#4650
iwahbe added a commit to pulumi/pulumi that referenced this issue Dec 6, 2024
This commit changes the log level from plugin stdout&stderr to debug, from info. This
change is significant because info is shown by default to users, but debug is not. While
this is a change of plugin aesthetics, it does not effect any runtime behavior. All
plugins, both component providers and custom resource providers, are effected.

> [!IMPORTANT]
> This is a breaking change, in that information which used to be displayed to users will
> now be hidden by default.
>
> We will need to share this change with our users before rolling it out.

The providers team has met and believe that this is the best approach for our
ecosystem. For a full discussion on why this change is necessary, see
[this doc](https://docs.google.com/document/d/1yYrwTwsNoayaIzKyG1l5cl0MjJxiHLsH4NqAvZkQN-I/edit?tab=t.0#heading=h.34v61lg1x4kl).

Fixes pulumi/pulumi-terraform-bridge#2489
Fixes pulumi/pulumi-cloudngfwaws#23
Fixes pulumi/pulumi-ise#9

Taking this change will allow us to revert:
- pulumi/pulumi-databricks#609
- pulumi/pulumi-aws#4650
iwahbe added a commit to pulumi/pulumi that referenced this issue Dec 9, 2024
This commit changes the log level from plugin stdout&stderr to debug, from info. This
change is significant because info is shown by default to users, but debug is not. While
this is a change of plugin aesthetics, it does not effect any runtime behavior. All
plugins, both component providers and custom resource providers, are effected.

> [!IMPORTANT]
> This is a breaking change, in that information which used to be displayed to users will
> now be hidden by default.
>
> We will need to share this change with our users before rolling it out.

The providers team has met and believe that this is the best approach for our
ecosystem. For a full discussion on why this change is necessary, see
[this doc](https://docs.google.com/document/d/1yYrwTwsNoayaIzKyG1l5cl0MjJxiHLsH4NqAvZkQN-I/edit?tab=t.0#heading=h.34v61lg1x4kl).

Fixes pulumi/pulumi-terraform-bridge#2489
Fixes pulumi/pulumi-cloudngfwaws#23
Fixes pulumi/pulumi-ise#9

Taking this change will allow us to revert:
- pulumi/pulumi-databricks#609
- pulumi/pulumi-aws#4650

---

When a provider exists ungracefully, we dump *all* unstructured logs to the user. This
allows providers to output stack traces to users (so they can report them) when a provider
fails. We do not search for `panic` messages to isolate the stack trace, since we cannot
do that effectively in a cross-language way.
iwahbe added a commit to pulumi/pulumi that referenced this issue Dec 9, 2024
This commit changes the log level from plugin stdout&stderr to debug, from info. This
change is significant because info is shown by default to users, but debug is not. While
this is a change of plugin aesthetics, it does not effect any runtime behavior. All
plugins, both component providers and custom resource providers, are effected.

> [!IMPORTANT]
> This is a breaking change, in that information which used to be displayed to users will
> now be hidden by default.
>
> We will need to share this change with our users before rolling it out.

The providers team has met and believe that this is the best approach for our
ecosystem. For a full discussion on why this change is necessary, see
[this doc](https://docs.google.com/document/d/1yYrwTwsNoayaIzKyG1l5cl0MjJxiHLsH4NqAvZkQN-I/edit?tab=t.0#heading=h.34v61lg1x4kl).

Fixes pulumi/pulumi-terraform-bridge#2489
Fixes pulumi/pulumi-cloudngfwaws#23
Fixes pulumi/pulumi-ise#9

Taking this change will allow us to revert:
- pulumi/pulumi-databricks#609
- pulumi/pulumi-aws#4650

---

When a provider exists ungracefully, we dump *all* unstructured logs to the user. This
allows providers to output stack traces to users (so they can report them) when a provider
fails. We do not search for `panic` messages to isolate the stack trace, since we cannot
do that effectively in a cross-language way.
@zbuchheit
Copy link
Contributor Author

I have tested pulumi/pulumi-terraform-bridge#2686 with the provider and can confirm it does fix the issue

@iwahbe iwahbe self-assigned this Dec 10, 2024
@iwahbe iwahbe added the resolution/fixed This issue was fixed label Dec 10, 2024
@iwahbe
Copy link
Member

iwahbe commented Dec 10, 2024

As tested by @zbuchheit, this has been fixed by #154. The fix will be visible to users on the next release of this provider.

@iwahbe iwahbe closed this as completed Dec 10, 2024
iwahbe added a commit to pulumi/pulumi that referenced this issue Dec 12, 2024
This commit changes the log level from plugin stdout&stderr to debug, from info. This
change is significant because info is shown by default to users, but debug is not. While
this is a change of plugin aesthetics, it does not effect any runtime behavior. All
plugins, both component providers and custom resource providers, are effected.

> [!IMPORTANT]
> This is a breaking change, in that information which used to be displayed to users will
> now be hidden by default.
>
> We will need to share this change with our users before rolling it out.

The providers team has met and believe that this is the best approach for our
ecosystem. For a full discussion on why this change is necessary, see
[this doc](https://docs.google.com/document/d/1yYrwTwsNoayaIzKyG1l5cl0MjJxiHLsH4NqAvZkQN-I/edit?tab=t.0#heading=h.34v61lg1x4kl).

Fixes pulumi/pulumi-terraform-bridge#2489
Fixes pulumi/pulumi-cloudngfwaws#23
Fixes pulumi/pulumi-ise#9

Taking this change will allow us to revert:
- pulumi/pulumi-databricks#609
- pulumi/pulumi-aws#4650

---

When a provider exists ungracefully, we dump *all* unstructured logs to the user. This
allows providers to output stack traces to users (so they can report them) when a provider
fails. We do not search for `panic` messages to isolate the stack trace, since we cannot
do that effectively in a cross-language way.
iwahbe added a commit to pulumi/pulumi that referenced this issue Dec 12, 2024
This commit changes the log level from plugin stdout&stderr to debug, from info. This
change is significant because info is shown by default to users, but debug is not. While
this is a change of plugin aesthetics, it does not effect any runtime behavior. All
plugins, both component providers and custom resource providers, are effected.

> [!IMPORTANT]
> This is a breaking change, in that information which used to be displayed to users will
> now be hidden by default.
>
> We will need to share this change with our users before rolling it out.

The providers team has met and believe that this is the best approach for our
ecosystem. For a full discussion on why this change is necessary, see
[this doc](https://docs.google.com/document/d/1yYrwTwsNoayaIzKyG1l5cl0MjJxiHLsH4NqAvZkQN-I/edit?tab=t.0#heading=h.34v61lg1x4kl).

Fixes pulumi/pulumi-terraform-bridge#2489
Fixes pulumi/pulumi-cloudngfwaws#23
Fixes pulumi/pulumi-ise#9

Taking this change will allow us to revert:
- pulumi/pulumi-databricks#609
- pulumi/pulumi-aws#4650

---

When a provider exists ungracefully, we dump *all* unstructured logs to the user. This
allows providers to output stack traces to users (so they can report them) when a provider
fails. We do not search for `panic` messages to isolate the stack trace, since we cannot
do that effectively in a cross-language way.
iwahbe added a commit to pulumi/pulumi that referenced this issue Dec 12, 2024
This commit changes the log level from plugin stdout&stderr to debug, from info. This
change is significant because info is shown by default to users, but debug is not. While
this is a change of plugin aesthetics, it does not effect any runtime behavior. All
plugins, both component providers and custom resource providers, are effected.

> [!IMPORTANT]
> This is a breaking change, in that information which used to be displayed to users will
> now be hidden by default.
>
> We will need to share this change with our users before rolling it out.

The providers team has met and believe that this is the best approach for our
ecosystem. For a full discussion on why this change is necessary, see
[this doc](https://docs.google.com/document/d/1yYrwTwsNoayaIzKyG1l5cl0MjJxiHLsH4NqAvZkQN-I/edit?tab=t.0#heading=h.34v61lg1x4kl).

Fixes pulumi/pulumi-terraform-bridge#2489
Fixes pulumi/pulumi-cloudngfwaws#23
Fixes pulumi/pulumi-ise#9

Taking this change will allow us to revert:
- pulumi/pulumi-databricks#609
- pulumi/pulumi-aws#4650

---

When a provider exists ungracefully, we dump *all* unstructured logs to the user. This
allows providers to output stack traces to users (so they can report them) when a provider
fails. We do not search for `panic` messages to isolate the stack trace, since we cannot
do that effectively in a cross-language way.
iwahbe added a commit to pulumi/pulumi that referenced this issue Dec 12, 2024
This commit changes the log level from plugin stdout&stderr to debug, from info. This
change is significant because info is shown by default to users, but debug is not. While
this is a change of plugin aesthetics, it does not effect any runtime behavior. All
plugins, both component providers and custom resource providers, are effected.

> [!IMPORTANT]
> This is a breaking change, in that information which used to be displayed to users will
> now be hidden by default.
>
> We will need to share this change with our users before rolling it out.

The providers team has met and believe that this is the best approach for our
ecosystem. For a full discussion on why this change is necessary, see
[this doc](https://docs.google.com/document/d/1yYrwTwsNoayaIzKyG1l5cl0MjJxiHLsH4NqAvZkQN-I/edit?tab=t.0#heading=h.34v61lg1x4kl).

Fixes pulumi/pulumi-terraform-bridge#2489
Fixes pulumi/pulumi-cloudngfwaws#23
Fixes pulumi/pulumi-ise#9

Taking this change will allow us to revert:
- pulumi/pulumi-databricks#609
- pulumi/pulumi-aws#4650

---

When a provider exists ungracefully, we dump *all* unstructured logs to the user. This
allows providers to output stack traces to users (so they can report them) when a provider
fails. We do not search for `panic` messages to isolate the stack trace, since we cannot
do that effectively in a cross-language way.
github-merge-queue bot pushed a commit to pulumi/pulumi that referenced this issue Dec 12, 2024
This commit changes the log level from plugin stdout&stderr to debug,
from info. This
change is significant because info is shown by default to users, but
debug is not. While
this is a change of plugin aesthetics, it does not effect any runtime
behavior. All
plugins, both component providers and custom resource providers, are
effected.

> [!IMPORTANT]
> This is a breaking change, in that information which used to be
displayed to users will
> now be hidden by default.
>
> We will need to share this change with our users before rolling it
out.

The providers team has met and believe that this is the best approach
for our
ecosystem. For a full discussion on why this change is necessary, see
[this
doc](https://docs.google.com/document/d/1yYrwTwsNoayaIzKyG1l5cl0MjJxiHLsH4NqAvZkQN-I/edit?tab=t.0#heading=h.34v61lg1x4kl).

Fixes pulumi/pulumi-terraform-bridge#2489
Fixes pulumi/pulumi-cloudngfwaws#23
Fixes pulumi/pulumi-ise#9

Taking this change will allow us to revert:
- pulumi/pulumi-databricks#609
- pulumi/pulumi-aws#4650

---

When a provider exists ungracefully, we dump *all* unstructured logs to
the user. This
allows providers to output stack traces to users (so they can report
them) when a provider
fails. We do not search for `panic` messages to isolate the stack trace,
since we cannot
do that effectively in a cross-language way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants