-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Cleans and Rebase Error Message Factory PR #16202
Conversation
NOTE
|
/test connector=connectors/source-mysql |
/test connector=connectors/source-postgres |
/test connector=connectors/source-mysql
Build FailedTest summary info:
|
/test connector=connectors/source-postgres
Build PassedTest summary info:
|
739c782
to
7aa7a37
Compare
/test connector=connectors/source-mysql
Build PassedTest summary info:
|
6ac79c0
to
3040e38
Compare
NOTE
|
3040e38
to
d0dd001
Compare
NOTE
|
/test connector=connectors/source-mysql
Build PassedTest summary info:
|
Thank you for driving these changes to 🏁 as well as paying attention to small details! |
/publish connector=connectors/source-mysql run-tests=false
if you have connectors that successfully published but failed definition generation, follow step 4 here |
/publish connector=connectors/source-mysql-strict-encrypt auto-bump-version=false
if you have connectors that successfully published but failed definition generation, follow step 4 here |
/publish connector=connectors/source-mysql-strict-encrypt auto-bump-version=false run-tests=false
if you have connectors that successfully published but failed definition generation, follow step 4 here |
* Cleaned error messages factory PR * Bumped MySQL and Postgres version * Fixed messages and typos in test * Fixes the changelog conflict with per-stream state * Added note for flaky test * Bumps mysql version to match changelog * Added exception objects to all LOGGER.error for more visibility * auto-bump connector version [ci skip] Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
@@ -59,6 +64,12 @@ public AirbyteConnectionStatus check(final JsonNode config) { | |||
final String outputSchema = namingResolver.getIdentifier(config.get(JdbcUtils.SCHEMA_KEY).asText()); | |||
attemptSQLCreateAndDropTableOperations(outputSchema, database, namingResolver, sqlOperations); | |||
return new AirbyteConnectionStatus().withStatus(Status.SUCCEEDED); | |||
} catch (final ConnectionErrorException ex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can someone teach me about what's happening at this spot? We are throwing ConnectionErrorException
from various spots. I assume that means "There is a config error" (which is different than the generic programming errors). So we catch it here.
The difference from this block and the generic one below is:
- A different message - that makes sense to me because we can do a better job instructing the user what's going on.
AirbyteTraceMessageUtility.emitConfigErrorTrace(ex, message);
- what does this do?
My overall hope is that this ConnectionErrorException
ends up not creating a sentry error and the below Exception
one does. Is that the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the code throws ConnectionErrorException
in areas where a configuration error can arise
AirbyteTraceMessage
is used to provide to the surface the stack trace using AirbyteMessage
as a delivery vehicle. To be quite frank, this was lesser so a decision made from my end an implementation that was carried from the previous revisions/reviews prior to my work
Agreed, that ConnectionErrorException
should ideally not be a sentry error, however how much value will be lost if this is excluded from Sentry? From what I was able to quickly search there's an ability to filter out certain Errors, can this be broadly applied where to filter the ConnectionErrorException
into a folder so that it's not lost but rather just limited interaction and no github issues created?
EDIT: Currently ConnectionErrorException
ends up in sentry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the AirbyteTraceMessageUtility.emitConfigErrorTrace
that makes it go to Sentry? If so, do you know why that is not in the general Exception
catching? cc @pedroslopez
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bleonard It looks like emitConfigErrorTrace
is properly setting the FailureType to config_error
- we're not currently doing anything with the tag, but it means we can use this tag to correctly exclude them from triggering alerts or otherwise.
Sentry does have some server-side filtering to prevent the issue from showing up in sentry at all, but it's a feature of their Business plan (i believe we're on the Team plan)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative to sentry's server-side filtering would be in our implementation we can ignore anything that's a config_error
failure type and don't send it to sentry. We didn't do this originally to get a sense of whether seeing the kinds of config errors users are facing would be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think regardless we should still wrap it in a trace message so that the failure reason is properly recorded and shown to users in the right place
* Cleaned error messages factory PR * Bumped MySQL and Postgres version * Fixed messages and typos in test * Fixes the changelog conflict with per-stream state * Added note for flaky test * Bumps mysql version to match changelog * Added exception objects to all LOGGER.error for more visibility * auto-bump connector version [ci skip] Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
What
Closes PR that had race condition with publishing connector. Bumped connector after rebase on master
Previously work was done by GL in these two PRs:
How
Adds new
ConnectionErrorException
that will include more information with underlying database error and SQLSTATE codes as well a support message if availableRecommended reading order
ConnectionErrorException.java
ErrorMessage.java
AbstractDbSource.java
<Connector>Destination.java
NOTE: culled the previous PR's format and will have a separate PR that covers the
./gradlew format
unless the build fails due to formatting issues🚨 User Impact 🚨
Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.
No breaking changes, merely updates the Exception thrown so that when it's cause there's now a message including SQLSTATE code and error code to help diagnose the issue as well as documentation to error codes for the main DB sources (Postgres & MySQL)
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereConnector Generator
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changesTests
Unit
Put your unit tests output here.
Integration
Put your integration tests output here.
Acceptance
Put your acceptance tests output here.