Closed anitalySuper closed 1 month ago
Hi @anitalySuper, thank you for reporting this bug. We're sorry that this happened.
I'm unfortunately unable to reproduce this behavior exactly; our test account is not of a high enough tier to allow for multi-cluster warehouses.
I did do the following:
Run pulumi up
with the following YAML file:
`name: snowflake-673
runtime: yaml
description: A minimal Pulumi YAML program
config: {'pulumi:tags': {value: {'pulumi:template': yaml}}}
resources:
kafka-warehouse--warehouse--object:
type: snowflake:Warehouse
properties:
autoResume: true
autoSuspend: 60
name: KAFKA_WAREHOUSE
resourceMonitor: null
warehouseSize: XSMALL
enableQueryAcceleration: false
options:
version: 0.55.0
Relevant section of stack file:
"inputs": {
"__defaults": [
"comment",
"maxConcurrencyLevel",
"queryAccelerationMaxScaleFactor",
"statementQueuedTimeoutInSeconds",
"statementTimeoutInSeconds",
"warehouseType"
],
"autoResume": true,
"autoSuspend": 60,
"comment": "",
"enableQueryAcceleration": false,
"maxConcurrencyLevel": 8,
"name": "KAFKA_WAREHOUSE",
"queryAccelerationMaxScaleFactor": 8,
"statementQueuedTimeoutInSeconds": 0,
"statementTimeoutInSeconds": 172800,
"warehouseSize": "XSMALL",
"warehouseType": "STANDARD"
Update the version
field to 0.56.0 and explicitly set `maxConcurrencyLevel:
name: snowflake-673
runtime: yaml
description: A minimal Pulumi YAML program
resources:
kafka-warehouse--warehouse--object:
type: snowflake:Warehouse
properties:
autoResume: true
autoSuspend: 60
name: KAFKA_WAREHOUSE
resourceMonitor: null
warehouseSize: XSMALL
maxConcurrencyLevel: 8
enableQueryAcceleration: false # I cannot set this to true due to now having an Enterprise subscription
options:
version: 0.56.0
The upgrade succeds for me. Relevant stack.json output:
"parameters": [
{
"maxConcurrencyLevels": [
{
"default": "8",
"description": "Maximum number of SQL statements a warehouse cluster can execute concurrently before queuing them. Small SQL statements count as a fraction of 1.",
"key": "MAX_CONCURRENCY_LEVEL",
"level": "WAREHOUSE",
"value": "8"
}
],
"statementQueuedTimeoutInSeconds": [
{
"default": "0",
"description": "Timeout in seconds for queued statements: statements will automatically be canceled if they are queued on a warehouse for longer than this amount of time; disabled if set to zero.",
"key": "STATEMENT_QUEUED_TIMEOUT_IN_SECONDS",
"level": "WAREHOUSE",
"value": "0"
}
],
"statementTimeoutInSeconds": [
{
"default": "172800",
"description": "Timeout in seconds for statements: statements are automatically canceled if they run for longer; if set to zero, max value (604800) is enforced.",
"key": "STATEMENT_TIMEOUT_IN_SECONDS",
"level": "",
"value": "172800"
}
]
}
],
"queryAccelerationMaxScaleFactor": 8,
My best guess is that there's something about the additional parameters that you're setting for your multi-cluster warehouses are not playing well together.
One thing you could try is set `"enableQueryAcceleration": "true", or try tweaking some of the other affected defaults changes.
Please let us know how it goes!
Hi @guineveresaenger thanks for testing this.
As part of the migration to v0.56.0, I have set the other default values as specified and I'm still getting this error.
I've looked into a historical checkpoint file before the migration; this is what the state looks like:
{
"urn": "urn:pulumi:prod::snowflake-warehouses::snowflake:index/warehouse:Warehouse::kafka-warehouse--warehouse--object",
"custom": true,
"id": "KAFKA_WAREHOUSE",
"type": "snowflake:index/warehouse:Warehouse",
"inputs": {
"__defaults": [
"comment",
"enableQueryAcceleration",
"maxConcurrencyLevel",
"queryAccelerationMaxScaleFactor",
"statementQueuedTimeoutInSeconds",
"statementTimeoutInSeconds",
"warehouseType"
],
"autoResume": true,
"autoSuspend": 60,
"comment": "",
"enableQueryAcceleration": false,
"maxClusterCount": 2,
"maxConcurrencyLevel": 8,
"minClusterCount": 1,
"name": "KAFKA_WAREHOUSE",
"queryAccelerationMaxScaleFactor": 8,
"scalingPolicy": "STANDARD",
"statementQueuedTimeoutInSeconds": 0,
"statementTimeoutInSeconds": 172800,
"warehouseSize": "XSMALL",
"warehouseType": "STANDARD"
},
"outputs": {
"autoResume": true,
"autoSuspend": 60,
"comment": "",
"enableQueryAcceleration": false,
"id": "KAFKA_WAREHOUSE",
"maxClusterCount": 2,
"maxConcurrencyLevel": 8,
"minClusterCount": 1,
"name": "KAFKA_WAREHOUSE",
"queryAccelerationMaxScaleFactor": 8,
"resourceMonitor": "null",
"scalingPolicy": "STANDARD",
"statementQueuedTimeoutInSeconds": 0,
"statementTimeoutInSeconds": 172800,
"warehouseSize": "XSMALL",
"warehouseType": "STANDARD"
},
"parent": "urn:pulumi:prod::snowflake-warehouses::pulumi:pulumi:Stack::snowflake-warehouses-prod",
"provider": "urn:pulumi:prod::snowflake-warehouses::pulumi:providers:snowflake::default::38fad7dd-c35e-45c1-b54a-6a703bae095b",
"propertyDependencies": {
"autoResume": [],
"autoSuspend": [],
"maxClusterCount": [],
"minClusterCount": [],
"name": [],
"scalingPolicy": [],
"warehouseSize": []
},
"created": "2024-03-22T19:19:02.066689238Z",
"modified": "2024-04-03T03:13:03.519544689Z"
},
The parameters (including the min/max cluster counts) haven't changed in between, so I'm not sure why there would be incompatibility between versions of pulumi-snowflake.
I have separate warehouse where I already set `"enableQueryAcceleration": "true". Here's the latest state (reporting the invalid MAX_CONCURRENCY_LEVEL error under initErrors):
{
"urn": "urn:pulumi:prod::snowflake-warehouses::snowflake:index/warehouse:Warehouse::reporting-warehouse--warehouse--object",
"custom": true,
"id": "REPORTING_WAREHOUSE",
"type": "snowflake:index/warehouse:Warehouse",
"inputs": {
"__defaults": [],
"autoResume": "true",
"autoSuspend": 60,
"enableQueryAcceleration": "true",
"maxClusterCount": 6,
"minClusterCount": 1,
"name": "REPORTING_WAREHOUSE",
"queryAccelerationMaxScaleFactor": 5,
"scalingPolicy": "STANDARD",
"warehouseSize": "LARGE"
},
"outputs": {
"__meta": "{\"schema_version\":\"1\"}",
"autoResume": "true",
"autoSuspend": 60,
"comment": "",
"enableQueryAcceleration": "true",
"id": "REPORTING_WAREHOUSE",
"maxClusterCount": 6,
"minClusterCount": 1,
"name": "REPORTING_WAREHOUSE",
"parameters": [
{
"maxConcurrencyLevels": [
{
"default": "8",
"description": "Maximum number of SQL statements a warehouse cluster can execute concurrently before queuing them. Small SQL statements count as a fraction of 1.",
"key": "MAX_CONCURRENCY_LEVEL",
"level": "",
"value": "8"
}
],
"statementQueuedTimeoutInSeconds": [
{
"default": "0",
"description": "Timeout in seconds for queued statements: statements will automatically be canceled if they are queued on a warehouse for longer than this amount of time; disabled if set to zero.",
"key": "STATEMENT_QUEUED_TIMEOUT_IN_SECONDS",
"level": "",
"value": "0"
}
],
"statementTimeoutInSeconds": [
{
"default": "172800",
"description": "Timeout in seconds for statements: statements are automatically canceled if they run for longer; if set to zero, max value (604800) is enforced.",
"key": "STATEMENT_TIMEOUT_IN_SECONDS",
"level": "",
"value": "172800"
}
]
}
],
"queryAccelerationMaxScaleFactor": 5,
"resourceMonitor": "null",
"scalingPolicy": "STANDARD",
"warehouseSize": "LARGE",
"warehouseType": ""
},
"parent": "urn:pulumi:prod::snowflake-warehouses::pulumi:pulumi:Stack::snowflake-warehouses-prod",
"initErrors": [
"updating urn:pulumi:prod::snowflake-warehouses::snowflake:index/warehouse:Warehouse::reporting-warehouse--warehouse--object: 1 error occurred:\n\t* 001008 (22023): SQL compilation error:\ninvalid value [0] for parameter 'MAX_CONCURRENCY_LEVEL'\n\n"
],
"provider": "urn:pulumi:prod::snowflake-warehouses::pulumi:providers:snowflake::default::38fad7dd-c35e-45c1-b54a-6a703bae095b",
"propertyDependencies": {
"autoResume": [],
"autoSuspend": [],
"comment": [],
"enableQueryAcceleration": [],
"maxClusterCount": [],
"maxConcurrencyLevel": [],
"minClusterCount": [],
"name": [],
"queryAccelerationMaxScaleFactor": [],
"scalingPolicy": [],
"statementQueuedTimeoutInSeconds": [],
"statementTimeoutInSeconds": [],
"warehouseSize": [],
"warehouseType": []
},
"created": "2024-03-22T19:19:01.676779748Z",
"modified": "2024-07-25T18:26:56.158716445Z"
},
When I check snowflake's query history to see what the ALTER WAREHOUSE statement is, I get the following:
ALTER WAREHOUSE "REPORTING_WAREHOUSE" SET MAX_CONCURRENCY_LEVEL = 0
So for some reason, Pulumi is not picking up the stated value of 8 in the yaml file. Any thoughts?
One thing that looks off between my state output for parameters vs yours, is the the level
value is blank in mine but is set to WAREHOUSE
for yours.
"maxConcurrencyLevels": [
{
"default": "8",
"description": "Maximum number of SQL statements a warehouse cluster can execute concurrently before queuing them. Small SQL statements count as a fraction of 1.",
"key": "MAX_CONCURRENCY_LEVEL",
"level": "",
"value": "8"
}
]
Why is that and does it matter?
One thing that looks off between my state output for parameters vs yours, is the the level value is blank in mine but is set to WAREHOUSE for yours.
That is not the case for your initial example - it is also WAREHOUSE, so I don't think that's necessarily related, although the docs state that this parameter is set on Warehouse
I have separate warehouse where I already set `"enableQueryAcceleration": "true". Here's the latest state (reporting the invalid MAX_CONCURRENCY_LEVEL error under initErrors):
I think it would help here if we'd stick to one single minimal reproduction to avoid confusion - it's hard to look at a stack file but not see the corresponding program, and I can't tell if all newly explicit fields are set.
In your first example, it looks like you have two remaining default inputs in your stack state after the update:
"__defaults": [
"enableQueryAcceleration",
"queryAccelerationMaxScaleFactor"
],
for KAFKA_WAREHOUSE
and
"__defaults": [
"comment",
"maxConcurrencyLevel",
"queryAccelerationMaxScaleFactor",
"statementQueuedTimeoutInSeconds",
"warehouseType"
],
for ANALYST_WAREHOUSE
.
This does seem as though there's a few of the formerly-default, now-explicit parameters missing from your updated resource file for both Warehouses.
Could you try to set all of these defaults explicitly and try your upgrade again?
Hi @guineveresaenger, I have set all the remaining default values. Here they are:
kafka-warehouse--warehouse--object:
type: snowflake:Warehouse
properties:
autoResume: true
autoSuspend: 60
comment: ""
maxClusterCount: 2
minClusterCount: 1
name: KAFKA_WAREHOUSE
resourceMonitor: null
scalingPolicy: STANDARD
statementTimeoutInSeconds: 172800
statementQueuedTimeoutInSeconds: 0
warehouseSize: XSMALL
warehouseType: STANDARD
enableQueryAcceleration: false
queryAccelerationMaxScaleFactor: 8
maxConcurrencyLevel: 8
analyst-warehouse--warehouse--object:
type: snowflake:Warehouse
properties:
autoResume: true
autoSuspend: 60
comment: ""
maxClusterCount: 4
minClusterCount: 1
name: ANALYST_WAREHOUSE
resourceMonitor: null
scalingPolicy: STANDARD
statementTimeoutInSeconds: 3600
statementQueuedTimeoutInSeconds: 0
warehouseSize: XSMALL
warehouseType: STANDARD
enableQueryAcceleration: false
queryAccelerationMaxScaleFactor: 8
maxConcurrencyLevel: 8
reporting-warehouse--warehouse--object:
type: snowflake:Warehouse
properties:
autoResume: true
autoSuspend: 60
comment: ""
maxClusterCount: 6
minClusterCount: 1
name: REPORTING_WAREHOUSE
resourceMonitor: null
scalingPolicy: STANDARD
statementTimeoutInSeconds: 172800
statementQueuedTimeoutInSeconds: 0
warehouseSize: LARGE
warehouseType: STANDARD
enableQueryAcceleration: true
queryAccelerationMaxScaleFactor: 5
maxConcurrencyLevel: 8
Here's their state:
{
"urn": "urn:pulumi:prod::snowflake-warehouses::snowflake:index/warehouse:Warehouse::kafka-warehouse--warehouse--object",
"custom": true,
"id": "KAFKA_WAREHOUSE",
"type": "snowflake:index/warehouse:Warehouse",
"inputs": {
"__defaults": [
"enableQueryAcceleration",
"queryAccelerationMaxScaleFactor"
],
"autoResume": "true",
"autoSuspend": 60,
"enableQueryAcceleration": "default",
"maxClusterCount": 2,
"minClusterCount": 1,
"name": "KAFKA_WAREHOUSE",
"queryAccelerationMaxScaleFactor": 8,
"scalingPolicy": "STANDARD",
"warehouseSize": "XSMALL"
},
"outputs": {
"__meta": "{\"schema_version\":\"1\"}",
"autoResume": "true",
"autoSuspend": 60,
"comment": "",
"enableQueryAcceleration": "default",
"id": "KAFKA_WAREHOUSE",
"maxClusterCount": 2,
"minClusterCount": 1,
"name": "KAFKA_WAREHOUSE",
"parameters": [
{
"maxConcurrencyLevels": [
{
"default": "8",
"description": "Maximum number of SQL statements a warehouse cluster can execute concurrently before queuing them. Small SQL statements count as a fraction of 1.",
"key": "MAX_CONCURRENCY_LEVEL",
"level": "",
"value": "8"
}
],
"statementQueuedTimeoutInSeconds": [
{
"default": "0",
"description": "Timeout in seconds for queued statements: statements will automatically be canceled if they are queued on a warehouse for longer than this amount of time; disabled if set to zero.",
"key": "STATEMENT_QUEUED_TIMEOUT_IN_SECONDS",
"level": "",
"value": "0"
}
],
"statementTimeoutInSeconds": [
{
"default": "172800",
"description": "Timeout in seconds for statements: statements are automatically canceled if they run for longer; if set to zero, max value (604800) is enforced.",
"key": "STATEMENT_TIMEOUT_IN_SECONDS",
"level": "",
"value": "172800"
}
]
}
],
"queryAccelerationMaxScaleFactor": 8,
"resourceMonitor": "null",
"scalingPolicy": "STANDARD",
"warehouseSize": "XSMALL",
"warehouseType": ""
},
"parent": "urn:pulumi:prod::snowflake-warehouses::pulumi:pulumi:Stack::snowflake-warehouses-prod",
"initErrors": [
"updating urn:pulumi:prod::snowflake-warehouses::snowflake:index/warehouse:Warehouse::kafka-warehouse--warehouse--object: 1 error occurred:\n\t* 001008 (22023): SQL compilation error:\ninvalid value [0] for parameter 'MAX_CONCURRENCY_LEVEL'\n\n"
],
"provider": "urn:pulumi:prod::snowflake-warehouses::pulumi:providers:snowflake::default::38fad7dd-c35e-45c1-b54a-6a703bae095b",
"propertyDependencies": {
"autoResume": [],
"autoSuspend": [],
"comment": [],
"enableQueryAcceleration": [],
"maxClusterCount": [],
"maxConcurrencyLevel": [],
"minClusterCount": [],
"name": [],
"queryAccelerationMaxScaleFactor": [],
"scalingPolicy": [],
"statementQueuedTimeoutInSeconds": [],
"statementTimeoutInSeconds": [],
"warehouseSize": [],
"warehouseType": []
},
"created": "2024-03-22T19:19:02.066689238Z",
"modified": "2024-07-25T20:30:32.089184757Z"
},
{
"urn": "urn:pulumi:prod::snowflake-warehouses::snowflake:index/warehouse:Warehouse::analyst-warehouse--warehouse--object",
"custom": true,
"id": "ANALYST_WAREHOUSE",
"type": "snowflake:index/warehouse:Warehouse",
"inputs": {
"__defaults": [
"comment",
"maxConcurrencyLevel",
"queryAccelerationMaxScaleFactor",
"statementQueuedTimeoutInSeconds",
"warehouseType"
],
"autoResume": "true",
"autoSuspend": 60,
"comment": "",
"enableQueryAcceleration": "false",
"maxClusterCount": 4,
"maxConcurrencyLevel": 8,
"minClusterCount": 1,
"name": "ANALYST_WAREHOUSE",
"queryAccelerationMaxScaleFactor": 8,
"scalingPolicy": "STANDARD",
"statementQueuedTimeoutInSeconds": 0,
"statementTimeoutInSeconds": 3600,
"warehouseSize": "XSMALL",
"warehouseType": "STANDARD"
},
"outputs": {
"__meta": "{\"schema_version\":\"1\"}",
"autoResume": "true",
"autoSuspend": 60,
"comment": "",
"enableQueryAcceleration": "false",
"id": "ANALYST_WAREHOUSE",
"maxClusterCount": 4,
"minClusterCount": 1,
"name": "ANALYST_WAREHOUSE",
"parameters": [
{
"maxConcurrencyLevels": [
{
"default": "8",
"description": "Maximum number of SQL statements a warehouse cluster can execute concurrently before queuing them. Small SQL statements count as a fraction of 1.",
"key": "MAX_CONCURRENCY_LEVEL",
"level": "",
"value": "8"
}
],
"statementQueuedTimeoutInSeconds": [
{
"default": "0",
"description": "Timeout in seconds for queued statements: statements will automatically be canceled if they are queued on a warehouse for longer than this amount of time; disabled if set to zero.",
"key": "STATEMENT_QUEUED_TIMEOUT_IN_SECONDS",
"level": "",
"value": "0"
}
],
"statementTimeoutInSeconds": [
{
"default": "172800",
"description": "Timeout in seconds for statements: statements are automatically canceled if they run for longer; if set to zero, max value (604800) is enforced.",
"key": "STATEMENT_TIMEOUT_IN_SECONDS",
"level": "WAREHOUSE",
"value": "3600"
}
]
}
],
"queryAccelerationMaxScaleFactor": 8,
"resourceMonitor": "null",
"scalingPolicy": "STANDARD",
"showOutputs": [
{
"autoResume": true,
"autoSuspend": 60,
"available": 0,
"comment": "",
"createdOn": "2019-08-26 22:20:15.862 +0000 UTC",
"enableQueryAcceleration": false,
"isCurrent": true,
"isDefault": false,
"maxClusterCount": 4,
"minClusterCount": 1,
"name": "ANALYST_WAREHOUSE",
"other": 0,
"owner": "ACCOUNTADMIN",
"ownerRoleType": "ROLE",
"provisioning": 0,
"queryAccelerationMaxScaleFactor": 8,
"queued": 0,
"quiescing": 0,
"resourceMonitor": "",
"resumedOn": "2024-07-25 20:25:17.693 +0000 UTC",
"running": 15,
"scalingPolicy": "STANDARD",
"size": "XSMALL",
"startedClusters": 1,
"state": "STARTED",
"type": "STANDARD",
"updatedOn": "2024-07-25 20:25:17.693 +0000 UTC"
}
],
"statementTimeoutInSeconds": 3600,
"warehouseSize": "XSMALL",
"warehouseType": "STANDARD"
},
"parent": "urn:pulumi:prod::snowflake-warehouses::pulumi:pulumi:Stack::snowflake-warehouses-prod",
"initErrors": [
"updating urn:pulumi:prod::snowflake-warehouses::snowflake:index/warehouse:Warehouse::analyst-warehouse--warehouse--object: 1 error occurred:\n\t* 001008 (22023): SQL compilation error:\ninvalid value [0] for parameter 'MAX_CONCURRENCY_LEVEL'\n\n"
],
"provider": "urn:pulumi:prod::snowflake-warehouses::pulumi:providers:snowflake::default::38fad7dd-c35e-45c1-b54a-6a703bae095b",
"propertyDependencies": {
"autoResume": [],
"autoSuspend": [],
"comment": [],
"enableQueryAcceleration": [],
"maxClusterCount": [],
"maxConcurrencyLevel": [],
"minClusterCount": [],
"name": [],
"queryAccelerationMaxScaleFactor": [],
"scalingPolicy": [],
"statementQueuedTimeoutInSeconds": [],
"statementTimeoutInSeconds": [],
"warehouseSize": [],
"warehouseType": []
},
"created": "2024-03-22T19:19:02.188742734Z",
"modified": "2024-07-25T20:30:28.822337006Z"
},
{
"urn": "urn:pulumi:prod::snowflake-warehouses::snowflake:index/warehouse:Warehouse::reporting-warehouse--warehouse--object",
"custom": true,
"id": "REPORTING_WAREHOUSE",
"type": "snowflake:index/warehouse:Warehouse",
"inputs": {
"__defaults": [],
"autoResume": "true",
"autoSuspend": 60,
"enableQueryAcceleration": "true",
"maxClusterCount": 6,
"minClusterCount": 1,
"name": "REPORTING_WAREHOUSE",
"queryAccelerationMaxScaleFactor": 5,
"scalingPolicy": "STANDARD",
"warehouseSize": "LARGE"
},
"outputs": {
"__meta": "{\"schema_version\":\"1\"}",
"autoResume": "true",
"autoSuspend": 60,
"comment": "",
"enableQueryAcceleration": "true",
"id": "REPORTING_WAREHOUSE",
"maxClusterCount": 6,
"minClusterCount": 1,
"name": "REPORTING_WAREHOUSE",
"parameters": [
{
"maxConcurrencyLevels": [
{
"default": "8",
"description": "Maximum number of SQL statements a warehouse cluster can execute concurrently before queuing them. Small SQL statements count as a fraction of 1.",
"key": "MAX_CONCURRENCY_LEVEL",
"level": "",
"value": "8"
}
],
"statementQueuedTimeoutInSeconds": [
{
"default": "0",
"description": "Timeout in seconds for queued statements: statements will automatically be canceled if they are queued on a warehouse for longer than this amount of time; disabled if set to zero.",
"key": "STATEMENT_QUEUED_TIMEOUT_IN_SECONDS",
"level": "",
"value": "0"
}
],
"statementTimeoutInSeconds": [
{
"default": "172800",
"description": "Timeout in seconds for statements: statements are automatically canceled if they run for longer; if set to zero, max value (604800) is enforced.",
"key": "STATEMENT_TIMEOUT_IN_SECONDS",
"level": "",
"value": "172800"
}
]
}
],
"queryAccelerationMaxScaleFactor": 5,
"resourceMonitor": "null",
"scalingPolicy": "STANDARD",
"warehouseSize": "LARGE",
"warehouseType": ""
},
"parent": "urn:pulumi:prod::snowflake-warehouses::pulumi:pulumi:Stack::snowflake-warehouses-prod",
"initErrors": [
"updating urn:pulumi:prod::snowflake-warehouses::snowflake:index/warehouse:Warehouse::reporting-warehouse--warehouse--object: 1 error occurred:\n\t* 001008 (22023): SQL compilation error:\ninvalid value [0] for parameter 'MAX_CONCURRENCY_LEVEL'\n\n"
],
"provider": "urn:pulumi:prod::snowflake-warehouses::pulumi:providers:snowflake::default::38fad7dd-c35e-45c1-b54a-6a703bae095b",
"propertyDependencies": {
"autoResume": [],
"autoSuspend": [],
"comment": [],
"enableQueryAcceleration": [],
"maxClusterCount": [],
"maxConcurrencyLevel": [],
"minClusterCount": [],
"name": [],
"queryAccelerationMaxScaleFactor": [],
"scalingPolicy": [],
"statementQueuedTimeoutInSeconds": [],
"statementTimeoutInSeconds": [],
"warehouseSize": [],
"warehouseType": []
},
"created": "2024-03-22T19:19:01.676779748Z",
"modified": "2024-07-25T20:30:34.845286563Z"
},
Hi @anitalySuper, thank you for your reply.
We're looking into whether there's something odd going on with the way we update defaults in the stack state.
In the meantime, it would be awesome if you could do the following for us:
Try to retrace your update if you can:
export PULUMI_DEBUG_GRPC=logs.jsonl
in your terminal (this will log the GRPC calls to a file called logs.jsonl
pulumi up
, can you additionally get logs: pulumi up --logtostderr --logflow -v=10
While doing so, can you capture the following (I apologize- I know I've asked this before; I'm trying to pinpoint exactly where things went wrong):
KAFKA_WAREHOUSE
before the update, meaning on v0.55.0
KAFKA_WAREHOUSE
at the old version (v0.55.0
)KAFKA_WAREHOUSE
code with defaults set explicitly, now on v0.56.0
KAFKA_WAREHOUSE
at the new version (v0.56.0
)Thank you very much for your patience! 🙏
Hi @guineveresaenger,
First, I had to revert the state file to a previous checkpoint to downgrade from v0.56.0.
Here's the yaml for KAFKA_WAREHOUSE for v0.55.0 (note that I left out the default values that v0.56.0 requires):
kafka-warehouse--warehouse--object:
type: snowflake:Warehouse
properties:
autoResume: true
autoSuspend: 60
maxClusterCount: 2
minClusterCount: 1
name: KAFKA_WAREHOUSE
resourceMonitor: null
scalingPolicy: STANDARD
warehouseSize: XSMALL
I ran this command: pulumi up --logtostderr --logflow -v=10 --target urn:pulumi:prod::snowflake-warehouses::snowflake:index/warehouse:Warehouse::kafka-warehouse--warehouse--object
Here are the logs (github wouldn't let me upload a jsonl file): logs-old.json
Here's the full state file: prod-old.json
The state file section specific to KAFKA_WAREHOUSE:
{
"urn": "urn:pulumi:prod::snowflake-warehouses::snowflake:index/warehouse:Warehouse::kafka-warehouse--warehouse--object",
"custom": true,
"id": "KAFKA_WAREHOUSE",
"type": "snowflake:index/warehouse:Warehouse",
"inputs": {
"__defaults": [
"comment",
"enableQueryAcceleration",
"maxConcurrencyLevel",
"queryAccelerationMaxScaleFactor",
"statementQueuedTimeoutInSeconds",
"statementTimeoutInSeconds",
"warehouseType"
],
"autoResume": true,
"autoSuspend": 60,
"comment": "",
"enableQueryAcceleration": false,
"maxClusterCount": 2,
"maxConcurrencyLevel": 8,
"minClusterCount": 1,
"name": "KAFKA_WAREHOUSE",
"queryAccelerationMaxScaleFactor": 8,
"scalingPolicy": "STANDARD",
"statementQueuedTimeoutInSeconds": 0,
"statementTimeoutInSeconds": 172800,
"warehouseSize": "XSMALL",
"warehouseType": "STANDARD"
},
"outputs": {
"autoResume": true,
"autoSuspend": 60,
"comment": "",
"enableQueryAcceleration": false,
"id": "KAFKA_WAREHOUSE",
"maxClusterCount": 2,
"maxConcurrencyLevel": 8,
"minClusterCount": 1,
"name": "KAFKA_WAREHOUSE",
"queryAccelerationMaxScaleFactor": 8,
"resourceMonitor": "null",
"scalingPolicy": "STANDARD",
"statementQueuedTimeoutInSeconds": 0,
"statementTimeoutInSeconds": 172800,
"warehouseSize": "XSMALL",
"warehouseType": "STANDARD"
},
"parent": "urn:pulumi:prod::snowflake-warehouses::pulumi:pulumi:Stack::snowflake-warehouses-prod",
"provider": "urn:pulumi:prod::snowflake-warehouses::pulumi:providers:snowflake::default::38fad7dd-c35e-45c1-b54a-6a703bae095b",
"propertyDependencies": {
"autoResume": [],
"autoSuspend": [],
"maxClusterCount": [],
"minClusterCount": [],
"name": [],
"scalingPolicy": [],
"warehouseSize": []
},
"created": "2024-03-22T19:19:02.066689238Z",
"modified": "2024-04-03T03:13:03.519544689Z"
},
Here's the yaml for KAFKA_WAREHOUSE for v0.56.0 (note I have now added in the default values):
kafka-warehouse--warehouse--object:
type: snowflake:Warehouse
properties:
autoResume: true
autoSuspend: 60
comment: ""
maxClusterCount: 2
minClusterCount: 1
name: KAFKA_WAREHOUSE
resourceMonitor: null
scalingPolicy: STANDARD
statementTimeoutInSeconds: 172800
statementQueuedTimeoutInSeconds: 0
warehouseSize: XSMALL
warehouseType: STANDARD
enableQueryAcceleration: false
queryAccelerationMaxScaleFactor: 8
maxConcurrencyLevel: 8
Here are the logs: logs-new.json
Here's the full state file: prod-new.json
The state file section specific to KAFKA_WAREHOUSE:
{
"urn": "urn:pulumi:prod::snowflake-warehouses::snowflake:index/warehouse:Warehouse::kafka-warehouse--warehouse--object",
"custom": true,
"id": "KAFKA_WAREHOUSE",
"type": "snowflake:index/warehouse:Warehouse",
"inputs": {
"__defaults": [
"comment",
"maxConcurrencyLevel",
"queryAccelerationMaxScaleFactor",
"statementQueuedTimeoutInSeconds",
"statementTimeoutInSeconds",
"warehouseType"
],
"autoResume": "true",
"autoSuspend": 60,
"comment": "",
"enableQueryAcceleration": "false",
"maxClusterCount": 2,
"maxConcurrencyLevel": 8,
"minClusterCount": 1,
"name": "KAFKA_WAREHOUSE",
"queryAccelerationMaxScaleFactor": 8,
"scalingPolicy": "STANDARD",
"statementQueuedTimeoutInSeconds": 0,
"statementTimeoutInSeconds": 172800,
"warehouseSize": "XSMALL",
"warehouseType": "STANDARD"
},
"outputs": {
"__meta": "{\"schema_version\":\"1\"}",
"autoResume": "true",
"autoSuspend": 60,
"comment": "",
"enableQueryAcceleration": "false",
"id": "KAFKA_WAREHOUSE",
"maxClusterCount": 2,
"minClusterCount": 1,
"name": "KAFKA_WAREHOUSE",
"parameters": [
{
"maxConcurrencyLevels": [
{
"default": "8",
"description": "Maximum number of SQL statements a warehouse cluster can execute concurrently before queuing them. Small SQL statements count as a fraction of 1.",
"key": "MAX_CONCURRENCY_LEVEL",
"level": "",
"value": "8"
}
],
"statementQueuedTimeoutInSeconds": [
{
"default": "0",
"description": "Timeout in seconds for queued statements: statements will automatically be canceled if they are queued on a warehouse for longer than this amount of time; disabled if set to zero.",
"key": "STATEMENT_QUEUED_TIMEOUT_IN_SECONDS",
"level": "",
"value": "0"
}
],
"statementTimeoutInSeconds": [
{
"default": "172800",
"description": "Timeout in seconds for statements: statements are automatically canceled if they run for longer; if set to zero, max value (604800) is enforced.",
"key": "STATEMENT_TIMEOUT_IN_SECONDS",
"level": "",
"value": "172800"
}
]
}
],
"queryAccelerationMaxScaleFactor": 8,
"resourceMonitor": "null",
"scalingPolicy": "STANDARD",
"showOutputs": [
{
"autoResume": true,
"autoSuspend": 60,
"available": 0,
"comment": "",
"createdOn": "2021-09-01 14:04:25.163 +0000 UTC",
"enableQueryAcceleration": false,
"isCurrent": false,
"isDefault": false,
"maxClusterCount": 2,
"minClusterCount": 1,
"name": "KAFKA_WAREHOUSE",
"other": 0,
"owner": "ACCOUNTADMIN",
"ownerRoleType": "ROLE",
"provisioning": 0,
"queryAccelerationMaxScaleFactor": 8,
"queued": 0,
"quiescing": 0,
"resourceMonitor": "",
"resumedOn": "2022-11-14 19:58:23.937 +0000 UTC",
"running": 0,
"scalingPolicy": "STANDARD",
"size": "XSMALL",
"startedClusters": 0,
"state": "SUSPENDED",
"type": "STANDARD",
"updatedOn": "2024-07-22 19:57:54.984 +0000 UTC"
}
],
"warehouseSize": "XSMALL",
"warehouseType": "STANDARD"
},
"parent": "urn:pulumi:prod::snowflake-warehouses::pulumi:pulumi:Stack::snowflake-warehouses-prod",
"initErrors": [
"updating urn:pulumi:prod::snowflake-warehouses::snowflake:index/warehouse:Warehouse::kafka-warehouse--warehouse--object: 1 error occurred:\n\t* 001008 (22023): SQL compilation error:\ninvalid value [0] for parameter 'MAX_CONCURRENCY_LEVEL'\n\n"
],
"provider": "urn:pulumi:prod::snowflake-warehouses::pulumi:providers:snowflake::default::38fad7dd-c35e-45c1-b54a-6a703bae095b",
"propertyDependencies": {
"autoResume": [],
"autoSuspend": [],
"comment": [],
"enableQueryAcceleration": [],
"maxClusterCount": [],
"maxConcurrencyLevel": [],
"minClusterCount": [],
"name": [],
"queryAccelerationMaxScaleFactor": [],
"scalingPolicy": [],
"statementQueuedTimeoutInSeconds": [],
"statementTimeoutInSeconds": [],
"warehouseSize": [],
"warehouseType": []
},
"created": "2024-03-22T19:19:02.066689238Z",
"modified": "2024-07-30T04:10:27.869052546Z"
}
Hey @anitalySuper, thanks for providing the logs.
I've reproduced an issue, which I believe is the same as yours module account differences - our account does not have some enterprise features enabled.
Steps:
name: snowflake_673_repro
runtime: yaml
resources:
prov:
type: pulumi:providers:snowflake
defaultProvider: true
options:
version: 0.55.0
db:
type: snowflake:Warehouse
properties:
autoResume: true
autoSuspend: 60
resourceMonitor: null
warehouseSize: XSMALL
provision the above warehouse. Then change the program to, without any intermediate updates!
name: snowflake_673_repro
runtime: yaml
resources:
prov:
type: pulumi:providers:snowflake
defaultProvider: true
options:
version: 0.56.0
db:
type: snowflake:Warehouse
properties:
autoResume: true
autoSuspend: 60
resourceMonitor: null
warehouseSize: XSMALL
maxConcurrencyLevel: 8
enableQueryAcceleration: false
queryAccelerationMaxScaleFactor: 0
Run pulumi up
and observe:
error: 1 error occurred:
* updating urn:pulumi:dev::snowflake_673_repro::snowflake:index/warehouse:Warehouse::db: 1 error occurred:
* 001423 (22023): SQL compilation error:
invalid property 'QUERY_ACCELERATION_MAX_SCALE_FACTOR'; feature 'Query Acceleration Service' not enabled
Note that this should not happen as we've specified enableQueryAcceleration: false
but it seems to get the old value from state.
The workaround here is to either run pulumi up
again - that seems to succeed for me.
Another workaround is to specify PULUMI_ENABLE_PLAN_RESOURCE_CHANGE=1
when running pulumi up. This enables a feature which more faithfully represents the underlying TF provider to the pulumi engine. That also seems to get around the issue.
I'll open a PR to enable this by default.
Describe what happened
Updated to pulumi-snowflake v.0.56.0. Per the migration guide, I added in the value of 8 for maxConcurrencyLevel for every warehouse (this was previously not directly set in Pulumi as each warehouse would take on the default value of 8). Note, I was just specifying the default value and did not change the value.
When running
pulumi up
, I get a series of errors:And
Sample program
This is the corresponding yaml:
Below is the corresponding state after running
pulumi up
:Log output
No response
Affected Resource(s)
Warehouses
Output of
pulumi about
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).