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

[PLATFORM-399] feat(cli): Add —debug flag #108

Merged
merged 1 commit into from
Apr 6, 2021
Merged

Conversation

raulb
Copy link
Member

@raulb raulb commented Apr 6, 2021

Description of change

So far we've got MEROXA_DEBUG=1 as an option to debug CLI commands, although this is not documented anywhere and really difficult for users to discover this option.

By adding the flag --debug we'll be able to expose this so they could figure it out themselves and maybe reach out to us directly with more useful information to debug their issues.

ℹ️ We're still giving support to MEROXA_DEBUG=1.

Fixes https://meroxa.atlassian.net/browse/PLATFORM-399

Type of change

  • New feature
  • Bug fix
  • Refactor
  • Documentation

Demo

❯ .m list connectors
 ID        NAME          TYPE                   STREAMS                STATE    PIPELINE
===== ============== ============= ================================= ========= ==========
 255   my-connector   jdbc-source   output:                           running   11
                                    resource-149-499379-public.User


❯ .m list connectors --debug
2021/04/06 11:38:33 GET /v1/connectors HTTP/1.1
Host: api.meroxa.io
User-Agent: Meroxa CLI dev
Accept: application/json
Authorization: REDACTED
Content-Type: application/json
Accept-Encoding: gzip

2021/04/06 11:38:33 HTTP/2.0 200 OK
Content-Length: 321
Content-Type: application/json; charset=utf-8
Date: Tue, 06 Apr 2021 09:38:33 GMT
Meroxa-Request-Id: 972b55e1-a521-42e0-b786-21ef1e113873
Vary: Origin

[{"id":255,"name":"my-connector","type":"jdbc-source","config":{},"state":"running","resource_id":149,"pipeline_id":11,"streams":{"output":["resource-149-499379-public.User"],"dynamic":false},"metadata":{"mx:connectorType":"source"},"created_at":"2021-03-31T20:52:34.776287Z","updated_at":"2021-04-06T09:38:26.378847Z"}]
 ID        NAME          TYPE                   STREAMS                STATE    PIPELINE
===== ============== ============= ================================= ========= ==========
 255   my-connector   jdbc-source   output:                           running   11
                                    resource-149-499379-public.User


❯ MEROXA_DEBUG=1 .m list connectors
2021/04/06 11:38:39 GET /v1/connectors HTTP/1.1
Host: api.meroxa.io
User-Agent: Meroxa CLI dev
Accept: application/json
Authorization: REDACTED
Content-Type: application/json
Accept-Encoding: gzip

2021/04/06 11:38:41 HTTP/2.0 200 OK
Content-Length: 321
Content-Type: application/json; charset=utf-8
Date: Tue, 06 Apr 2021 09:38:41 GMT
Meroxa-Request-Id: 30a09194-3afa-4e96-aadf-12bc9ff9b2d7
Vary: Origin

[{"id":255,"name":"my-connector","type":"jdbc-source","config":{},"state":"running","resource_id":149,"pipeline_id":11,"streams":{"output":["resource-149-499379-public.User"],"dynamic":false},"metadata":{"mx:connectorType":"source"},"created_at":"2021-03-31T20:52:34.776287Z","updated_at":"2021-04-06T09:38:36.904751Z"}]
 ID        NAME          TYPE                   STREAMS                STATE    PIPELINE
===== ============== ============= ================================= ========= ==========
 255   my-connector   jdbc-source   output:                           running   11
                                    resource-149-499379-public.User

@raulb raulb self-assigned this Apr 6, 2021
@raulb raulb merged commit bded80a into master Apr 6, 2021
@raulb raulb deleted the add-debug-flag branch April 6, 2021 13:03
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