terraform-provider-snowflake icon indicating copy to clipboard operation
terraform-provider-snowflake copied to clipboard

Trying to modify last task after with a task without full name on 83.1 release

Open mdefariaborges-rbi opened this issue 1 year ago • 5 comments

Terraform CLI and Provider Versions

Terraform v1.1.9 on linux_amd64 ... terraform { required_providers { snowflake = { source = "Snowflake-Labs/snowflake" version = "0.83.1" } } }

Terraform Configuration

The code is working fine with the 0.69.0 release version and there is no changes on the after parameter.

Expected Behavior

NO CHANGES OR

 # module.instance.snowflake_task.parse_incoming_data will be updated in-place
  ~ resource "snowflake_task" "parse_incoming_data" {
      ~ after                           = [
          - "<SOME OTHER TASK FULLNAME>",
          + "CTG_DEV_PLK.INGESTION.COPY_FROM_KINESIS_S3_DELIVERY",
        ]
        id                              = "CTG_DEV_PLK|INGESTION|PARSE_INCOMING_DATA_DELIVERY"
        name                            = "PARSE_INCOMING_DATA_DELIVERY"
      + suspend_task_after_num_failures = 0
        # (8 unchanged attributes hidden)
    }

Actual Behavior


 # module.instance.snowflake_task.parse_incoming_data will be updated in-place
  ~ resource "snowflake_task" "parse_incoming_data" {
      ~ after                           = [
          - "CTG_DEV_PLK.INGESTION.COPY_FROM_KINESIS_S3_DELIVERY",
          + "COPY_FROM_KINESIS_S3_DELIVERY",
        ]
        id                              = "CTG_DEV_PLK|INGESTION|PARSE_INCOMING_DATA_DELIVERY"
        name                            = "PARSE_INCOMING_DATA_DELIVERY"
      + suspend_task_after_num_failures = 0
        # (8 unchanged attributes hidden)
    }

Steps to Reproduce

  1. terraform apply

How much impact is this issue causing?

High

Logs

No response

Additional Information

It seems that we have a related issue https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2207

mdefariaborges-rbi avatar Jan 12 '24 17:01 mdefariaborges-rbi

Hey @mdefariaborges-rbi. Thanks for reporting the issue.

It seems that moving to SDK implementation broke something in the task resource. It is the same problem as in #2207. I will bump its priority.

sfc-gh-asawicki avatar Jan 15 '24 09:01 sfc-gh-asawicki

@mdefariaborges-rbi hey. In your example, is CTG_DEV_PLK.INGESTION.COPY_FROM_KINESIS_S3_DELIVERY just the task's name, or is it db.schema.name (i.e. db = CTG_DEV_PLK, schema = INGESTION, name = COPY_FROM_KINESIS_S3_DELIVERY)?

Can you share the configuration for the two tasks you mentioned?

BTW, I found the cause of errors in #2207, but from the descriptions, these two issues seem to have different causes.

sfc-gh-asawicki avatar Feb 08 '24 14:02 sfc-gh-asawicki

@mdefariaborges-rbi could you validate if the issue persists in v0.86.0? If so, please share the configurations of the two tasks you mentioned.

sfc-gh-asawicki avatar Feb 16 '24 13:02 sfc-gh-asawicki

@mdefariaborges-rbi @sgavrilov-rbi @cmogren-rbi is this issue still present in the newest provider version?

sfc-gh-asawicki avatar Mar 13 '24 13:03 sfc-gh-asawicki

Closing due to inactivity. Please report a new issue if the problem persists in the newer provider versions.

sfc-gh-asawicki avatar Apr 17 '24 18:04 sfc-gh-asawicki