pulumi / pulumi-onelogin

Apache License 2.0
1 stars 2 forks source link

Several hundred lines of DEBUG/INFO output when running `pulumi up`, etc. #208

Open MitchellGerdisch opened 8 months ago

MitchellGerdisch commented 8 months ago

What happened?

Run pulumi up (or pulumi preview etc) with the program below and several hundred lines of DEBUG/INFO type of output is spewed. This makes it impossible to see certain results on the command line since the buffer fills up and makes it very difficult even in the Pulumi Cloud UI if looking for diagnostics information.

Screen grab of just the first bit of output:

image

Example

Run pulumi up with the following program.

(NOTE: This program works around the credentials issue described in another issue.)

import pulumi
import pulumi_onelogin as onelogin
import requests

onelogin_config = pulumi.Config("onelogin")
onelogin_client_id = onelogin_config.require("clientId")
onelogin_client_secret = onelogin_config.require("clientSecret")
onelogin_auth_url = onelogin_config.require("url") # https://<your_domain>.onelogin.com/auth/oauth2/v2/token

onelogin_oauth = requests.post(onelogin_auth_url, 
                               auth=(onelogin_client_id, onelogin_client_secret),
                               json={
                                       "grant_type": "client_credentials"
                               }
)
response = onelogin_oauth.json()

onelogin_provider = onelogin.Provider("onelogin_provider",
                                      apikey_auth=response["access_token"])

role = onelogin.Role("testrole",
  name="testrole",
  opts=pulumi.ResourceOptions(provider=onelogin_provider)
)

Output of pulumi about

CLI Version 3.100.0 Go Version go1.21.5 Go Compiler gc

Plugins NAME VERSION onelogin 0.6.0 python unknown

Host OS darwin Version 13.5 Arch x86_64

This project is written in python: executable='/Users/mitch/Downloads/pequod-user-management-work/pequod-demo-management/user-management/onelogin-access/venv/bin/python3' version='3.11.3'

Current Stack: pequod/onelogin-access/demo-mgmt

TYPE URN pulumi:pulumi:Stack urn:pulumi:demo-mgmt::onelogin-access::pulumi:pulumi:Stack::onelogin-access-demo-mgmt pulumi:providers:onelogin urn:pulumi:demo-mgmt::onelogin-access::pulumi:providers:onelogin::onelogin_provider onelogin:index/role:Role urn:pulumi:demo-mgmt::onelogin-access::onelogin:index/role:Role::testrole

Found no pending operations associated with pequod/demo-mgmt

Backend Name pulumi.com

Dependencies: NAME VERSION pip 22.3.1 pulumi-onelogin 0.6.0 requests 2.31.0 setuptools 65.5.0

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).

iwahbe commented 8 months ago

That's definitely not helpful. It looks like the wrong logging value is being set. Do you see the debug log for all resources, or just for onelogin.Role?

MitchellGerdisch commented 8 months ago

I see it for at least role and user and I believe when instantiating a provider as well.