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

✨ Source Hubspot: improve error message during connector setup #28558

Conversation

arsenlosenko
Copy link
Contributor

@arsenlosenko arsenlosenko commented Jul 21, 2023

What

Define more concise error messages during connector setup, accordingly to this issue:
#28508

How

I have tried to invoke errors during check with both access token and OAuth configs and see what errors are raised if fields in configs are changed to invalid values. It boiled down to two main cases: either 401 if access token is invalid, or 400 if any of OAuth credentials are invalid. Considering that I have added handling to these two cases, if there are other errors that might be raised during connector setup, they will be presented to user as is.

In terms of unit tests, covered only the part which handles 400 errors, as the other case with HubspotInvalidAuth was already covered by other tests.

@arsenlosenko arsenlosenko self-assigned this Jul 21, 2023
@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/hubspot labels Jul 21, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 21, 2023

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan.
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • You've updated the connector's metadata.yaml file any other relevant changes, including a breakingChanges entry for major version bumps. See metadata.yaml docs
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • Migration guide updated in docs/integrations/<source or destination>/<name>-migrations.md with an entry for the new version, if the version is a breaking change. See migration guide example
  • If set, you've ensured the icon is present in the platform-internal repo. (Docs)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

@arsenlosenko arsenlosenko linked an issue Jul 21, 2023 that may be closed by this pull request
@octavia-squidington-iii
Copy link
Collaborator

source-hubspot test report (commit e1a102b54e) - ✅

⏲️ Total pipeline duration: 5.28s

Step Result

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-hubspot test

@octavia-squidington-iii
Copy link
Collaborator

source-hubspot test report (commit abef9407fb) - ✅

⏲️ Total pipeline duration: 2.87s

Step Result

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-hubspot test

@octavia-squidington-iii
Copy link
Collaborator

source-hubspot test report (commit 181d7a625f) - ❌

⏲️ Total pipeline duration: 10mn20s

Step Result
Validate airbyte-integrations/connectors/source-hubspot/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-hubspot docker image for platform linux/x86_64
Unit tests
Integration tests
Acceptance tests

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-hubspot test

@octavia-squidington-iii
Copy link
Collaborator

source-hubspot test report (commit b9ad9ce0c4) - ✅

⏲️ Total pipeline duration: 6.45s

Step Result

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-hubspot test

@octavia-squidington-iii
Copy link
Collaborator

source-hubspot test report (commit 56e87e0e56) - ✅

⏲️ Total pipeline duration: 18.86s

Step Result

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-hubspot test

@octavia-squidington-iii
Copy link
Collaborator

source-hubspot test report (commit 8afe40a8f0) - ❌

⏲️ Total pipeline duration: 10mn37s

Step Result
Validate airbyte-integrations/connectors/source-hubspot/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-hubspot docker image for platform linux/x86_64
Unit tests
Integration tests
Acceptance tests

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-hubspot test

@octavia-squidington-iii
Copy link
Collaborator

source-hubspot test report (commit 9600945894) - ❌

⏲️ Total pipeline duration: 10mn13s

Step Result
Validate airbyte-integrations/connectors/source-hubspot/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-hubspot docker image for platform linux/x86_64
Unit tests
Integration tests
Acceptance tests

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-hubspot test

@octavia-squidington-iii
Copy link
Collaborator

source-hubspot test report (commit d02b5c1af8) - ✅

⏲️ Total pipeline duration: 10mn13s

Step Result
Validate airbyte-integrations/connectors/source-hubspot/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-hubspot docker image for platform linux/x86_64
Unit tests
Integration tests
Acceptance tests

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-hubspot test

@octavia-squidington-iii
Copy link
Collaborator

source-hubspot test report (commit 7945638418) - ✅

⏲️ Total pipeline duration: 13mn13s

Step Result
Validate airbyte-integrations/connectors/source-hubspot/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-hubspot docker image for platform linux/x86_64
Unit tests
Integration tests
Acceptance tests

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-hubspot test

@octavia-squidington-iii
Copy link
Collaborator

source-hubspot test report (commit 534b86313e) - ✅

⏲️ Total pipeline duration: 12mn38s

Step Result
Validate airbyte-integrations/connectors/source-hubspot/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-hubspot docker image for platform linux/x86_64
Unit tests
Integration tests
Acceptance tests

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-hubspot test

@octavia-squidington-iii
Copy link
Collaborator

source-hubspot test report (commit 6fcfdf8293) - ✅

⏲️ Total pipeline duration: 11mn37s

Step Result
Validate airbyte-integrations/connectors/source-hubspot/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-hubspot docker image for platform linux/x86_64
Unit tests
Integration tests
Acceptance tests

🔗 View the logs here

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-hubspot test

@arsenlosenko arsenlosenko merged commit 277711a into master Jul 27, 2023
22 checks passed
@arsenlosenko arsenlosenko deleted the arsenlosenko/28508-source-hubspot-improve-setup-error-messages branch July 27, 2023 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/hubspot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source Hubspot: improve error messages during setup
3 participants