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

connectorUpdate() shouldn't proceed to connectorRead() where there's an error otherwise prompt success despite unable to update #28

Merged
merged 1 commit into from May 25, 2020
Merged

connectorUpdate() shouldn't proceed to connectorRead() where there's an error otherwise prompt success despite unable to update #28

merged 1 commit into from May 25, 2020

Conversation

growingspaghetti
Copy link
Contributor

Like #27, connectorUpdate() shouldn't proceed to connectorRead() where there's an error otherwise prompt success despite unable to update.

2020/05/25 16:03:16 [DEBUG] kafka-connect_connector.test: applying the planned Update change
2020/05/25 16:03:16 [INFO] Requesting update to connector sqlite-sink
2020/05/25 16:03:16 [INFO] Looking for sqlite-sink
2020/05/25 16:03:16 [DEBUG] kafka-connect_connector.test: apply errored, but we're indicating that via the Error pointer rather than returning it: Update connector : {"error_code":500,"message":"Not a valid JDBC URL: http://h2:8080"}
2020/05/25 16:03:16 [ERROR] <root>: eval: *terraform.EvalApplyPost, err: Update connector : {"error_code":500,"message":"Not a valid JDBC URL: http://h2:8080"}
2020/05/25 16:03:16 [ERROR] <root>: eval: *terraform.EvalSequence, err: Update connector : {"error_code":500,"message":"Not a valid JDBC URL: http://h2:8080"}
2020/05/25 16:03:16 [DEBUG] New state was assigned lineage "264e993b-83f4-4a1d-3f16-fe710f3ccd96"
    TestAccConnectorConfigUpdate: testing.go:568: Step 2 error: errors during apply:
        
        Error: Update connector : {"error_code":500,"message":"Not a valid JDBC URL: http://h2:8080"}
        
          on /tmp/tf-test579236420/main.tf line 2:
          (source code not available)
const testResourceConnector_initialConfig = `
resource "kafka-connect_connector" "test" {
  name = "sqlite-sink"

  config = {
		"name" = "sqlite-sink"
    "connector.class" = "io.confluent.connect.jdbc.JdbcSourceConnector"
    "tasks.max"       = "2"
    "topics"          = "orders"
    "connection.url"  = "jdbc:sqlite:test.db"
    "auto.create"     = "true"
    "topic.prefix" = "a"
    "mode" = "bulk"
  }
}
`

const testResourceConnector_updateConfig = `
resource "kafka-connect_connector" "test" {
  name = "sqlite-sink"

  config = {
		"name" = "sqlite-sink"
    "connector.class" = "io.confluent.connect.jdbc.JdbcSourceConnector"
    "tasks.max"       = "1"
    "topics"          = "orders"
    "connection.url"  = "http://h2:8080"
    "auto.create"     = "true"
    "topic.prefix" = "a"
    "mode" = "bulk"
  }
}
`

This pull request adds the ability to return error.

image
Before adding the changes in this pull request, it created inconsistency.

…an error otherwise prompt success despite unable to update
@Mongey Mongey merged commit 8c08cb4 into Mongey:master May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants