Titan-Systems / titan

Titan Core - Snowflake infrastructure-as-code. Provision environments, automate deploys, CI/CD. Manage RBAC, users, roles, and data access. Declarative Python Resource API. Change Management tool for the Snowflake data warehouse.
Apache License 2.0
414 stars 27 forks source link

bp.plan() gets stuck at SHOW TAGS IN ACCOUNT #95

Closed aleenprd closed 1 week ago

aleenprd commented 2 months ago
[redacted:ACCOUNTADMIN] > 
        SELECT
            CURRENT_ACCOUNT_NAME() as account,
            CURRENT_ACCOUNT() as account_locator,
            CURRENT_USER() as user,
            CURRENT_ROLE() as role,
            CURRENT_AVAILABLE_ROLES() as available_roles,
            CURRENT_SECONDARY_ROLES() as secondary_roles,
            CURRENT_DATABASE() as database,
            CURRENT_SCHEMAS() as schemas,
            CURRENT_WAREHOUSE() as warehouse,
            CURRENT_VERSION() as version
            (1 rows, 0.17s)
[redacted:ACCOUNTADMIN] > SHOW TAGS IN ACCOUNT    (2 rows, 14.75s)

I haven't tried the package in a while now. It seems like at least in version 0.8.9 I can't make the plan. It just gets stuck after showing the tags...

aleenprd commented 2 months ago

Update. It's not actually stuck-stuck but the performance is terrible. It's just extremely, extremely slow, compared to a month ago or so. It takes ages to complete the plan.

teej commented 2 months ago

I'll try to repro.

aleenprd commented 2 months ago

I'll try to repro.

See comment. It actually does not get completely stuck but freezes at that step for a long time. There is perhaps some other task running in the background but it's not logged.

aleenprd commented 2 months ago

I'll try to repro.

Hi teej, I was mistaken, it's just the next statement it is running that is very slow. It shows grants on a role which returns 37k rows, takes 243s, sounds about right.

teej commented 1 week ago

Fixed in v0.10