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

feat(connector): Include connector trace in connector describe #196

Merged
merged 3 commits into from
Sep 30, 2021

Conversation

ahmeroxa
Copy link
Member

@ahmeroxa ahmeroxa commented Sep 29, 2021

Description of change

A trace error is returned along with failed connectors. This PR displays the contents of the trace when the connector describe command is used.

Fixes https://github.com/meroxa/product/issues/186

Type of change

  • New feature
  • Bug fix
  • Refactor
  • Documentation

How was this tested?

  • Unit Tests
  • Tested in staging

Demo

Before this pull-request

➜  cli git:(ah/output-trace) ✗ meroxa connector describe cdbsrc
  ID     NAME         TYPE                      STREAMS                 STATE    PIPELINE
====== ======== ================= ==================================== ======== ==========
 2470   cdbsrc   cosmosdb-source   (output) resource-2957-203946-demo   failed   vercel

After this pull-request

➜  cli git:(ah/output-trace) ✗ ./meroxa connector describe cdbsrc
       ID:   2470
     Name:   cdbsrc
     Type:   cosmosdb-source
  Streams:   (output) resource-2957-203946-demo
    State:   failed
 Pipeline:   Vercel
    Trace:   java.lang.RuntimeException: Client initialization failed. Check if the endpoint is reachable and if your auth token is valid
             at com.azure.cosmos.implementation.RxDocumentClientImpl.initializeGatewayConfigurationReader(RxDocumentClientImpl.java:392)
             at com.azure.cosmos.implementation.RxDocumentClientImpl.init(RxDocumentClientImpl.java:419)
             at com.azure.cosmos.implementation.AsyncDocumentClient$Builder.build(AsyncDocumentClient.java:241)
             at com.azure.cosmos.CosmosAsyncClient.<init>(CosmosAsyncClient.java:123)
             at com.azure.cosmos.CosmosClientBuilder.buildAsyncClient(CosmosClientBuilder.java:741)
             at com.azure.cosmos.kafka.connect.source.CosmosDBSourceTask.getCosmosClient(CosmosDBSourceTask.java:241)
             at com.azure.cosmos.kafka.connect.source.CosmosDBSourceTask.start(CosmosDBSourceTask.java:58)
             at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:213)
             at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:184)
             at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:234)
             at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
             at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
             at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
             at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
             at java.base/java.lang.Thread.run(Thread.java:834)

Additional references

Any additional links (if appropriate)

Documentation updated

No doc change required.

@ahmeroxa ahmeroxa requested review from raulb and removed request for raulb September 29, 2021 17:24
@ahmeroxa ahmeroxa requested a review from raulb September 29, 2021 21:46
@ahmeroxa ahmeroxa marked this pull request as ready for review September 29, 2021 23:41
Copy link
Member

@raulb raulb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahmeroxa looks great thank you! Just one comment regarding pipelineName to not capitalize it. Otherwise, this looks great. Glad we're bringing this one in. The describe always bothered me because it pretty much showed the same information as when listing connectors.

Once we ship this, we should create a changelog. I could help with that if you need/want me to.

utils/display_test.go Show resolved Hide resolved
utils/display.go Outdated Show resolved Hide resolved
utils/display.go Show resolved Hide resolved
@raulb raulb changed the title Include Connector Trace in Connector Describe feat(connector) Include connector trace in connector describe Sep 30, 2021
@raulb raulb changed the title feat(connector) Include connector trace in connector describe feat(connector): Include connector trace in connector describe Sep 30, 2021
Co-authored-by: Raúl Barroso <[email protected]>
@ahmeroxa ahmeroxa merged commit f046a99 into master Sep 30, 2021
@ahmeroxa ahmeroxa deleted the ah/output-trace branch September 30, 2021 15:16
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.

2 participants