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

🪟 🐛 Fix messages and improve connector log #17344

Merged
merged 3 commits into from
Oct 3, 2022

Conversation

timroes
Copy link
Contributor

@timroes timroes commented Sep 28, 2022

What

This fixes some missing messages for the JobItem component as well as putting the logs after a connector check behind the advanced mode toggle (unless they failed).

So far after a connector check we'd always show the log of the job, even if the job itself succeeded. This leads to the following confusing scenario for users:

screenshot-20220928-184026

The actual job to check if the connection is valid ran successfully (thus the log itself is green and successful), but the test that ran in that job determined that the actual data is wrong (i.e. wrong pokemon name in this case) and thus the actual check is failed.

As of this PR we're now no longer showing this log (which most of the time anyway doesn't have any useful information) unless advanced mode is on, or the actual job that should execute the connector check failed (e.g. because we had issues communicating with Temporal), in which case that log might contain useful information for debugging.

@timroes timroes requested a review from a team as a code owner September 28, 2022 18:09
@github-actions github-actions bot added area/platform issues related to the platform area/frontend Related to the Airbyte webapp labels Sep 28, 2022
@@ -68,12 +68,12 @@ const MainInfo: React.FC<MainInfoProps> = ({ job, attempts = [], isOpen, onExpan
} else if (isPartialSuccess) {
status = "partialSuccess";
} else {
return <FormattedMessage id="sources.jobStatus.unknown" />;
return <FormattedMessage id="jobs.jobStatus.unknown" />;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ I've renamed this prefix to jobs, since this can show for source, connections, destinations, so I felt jobs might be a better prefix.

Comment on lines +283 to +287
"jobs.jobStatus.check_connection_source.succeeded": "Configuration check finished",
"jobs.jobStatus.check_connection_destination.failed": "Configuration check failed",
"jobs.jobStatus.check_connection_destination.succeeded": "Configuration check finished",
"jobs.jobStatus.discover_schema.succeeded": "Discovering schema succeeded",
"jobs.jobStatus.discover_schema.failed": "Discovering schema failed",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ Since those types of jobs are Synchronous jobs, they can only result in success or failed and not in any of the other states.

"jobs.jobStatus.sync.cancelled": "Sync Cancelled",
"jobs.jobStatus.sync.partialSuccess": "Sync Partial Success",
"jobs.jobStatus.check_connection_source.failed": "Configuration check failed",
"jobs.jobStatus.check_connection_source.succeeded": "Configuration check finished",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ I tried to avoid calling it "succeeded" here for the connector check jobs, since the actual check inside that job might still determined the connection would fail (as shown in the screenshot in the PR description). Thus I felt "finished" would be the better term for those two types of jobs.

@timroes timroes changed the title Fix messages and improve connector log 🪟 🐛 Fix messages and improve connector log Sep 28, 2022
Copy link
Contributor

@lmossman lmossman left a comment

Choose a reason for hiding this comment

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

@timroes I had a question about the approach here that I'd like to get your take on before I approve

airbyte-webapp/src/locales/en.json Outdated Show resolved Hide resolved
Comment on lines +282 to +285
"jobs.jobStatus.check_connection_source.failed": "Configuration check failed",
"jobs.jobStatus.check_connection_source.succeeded": "Configuration check finished",
"jobs.jobStatus.check_connection_destination.failed": "Configuration check failed",
"jobs.jobStatus.check_connection_destination.succeeded": "Configuration check finished",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"jobs.jobStatus.check_connection_source.failed": "Configuration check failed",
"jobs.jobStatus.check_connection_source.succeeded": "Configuration check finished",
"jobs.jobStatus.check_connection_destination.failed": "Configuration check failed",
"jobs.jobStatus.check_connection_destination.succeeded": "Configuration check finished",
"jobs.jobStatus.check_connection_source.failed": "Connection check failed",
"jobs.jobStatus.check_connection_source.succeeded": "Connection check finished",
"jobs.jobStatus.check_connection_destination.failed": "Connection check failed",
"jobs.jobStatus.check_connection_destination.succeeded": "Connection check finished",

I think these should be Connection check ... instead of Configuration check .... It would be confusing if this said Configuration check succeeded but then part of the configuration was wrong, e.g. a wrong pokemon name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason I tried to avoid "Connection" here was that the we also have "Connections" as a concept in the application, and I found it a bit confusing saying that the "Connection (check) failed", while the user is just setting up connectors. Also not all connectors necessarily do a "connection check", e.g. the pokeapi wouldn't do. So I feel what really happens is that the "Connector configuration is validated", and tried to phrase that.

Regarding your point about "Configuration check succeeded" but the actual configuration being broken, that's exactly why I avoided the word "Succeeded" here, but said "Configuration check finished" in the success case, so it's not being confused with the configuration being actual correct.

Given that thoughts, what would be your preferred way for phrasing here? (I have no strong feelings either way so happy having you make the call on that)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah okay, I wasn't sure if using Configuration instead of Connection here was intentional, but I think your justification makes sense, so I think this is fine. I agree that using finished instead of succeeded for that case makes sense due to the issue I pointed out

Comment on lines +114 to +115
{/* Show the job log only if advanced mode is turned on or the actual job failed (not the check inside the job) */}
{job && (advancedMode || !job.succeeded) && <JobItem job={job} />}
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make any sense to present the "check connection" job as "Failed" if the check inside the job was not successful?

To me, a "check connection" job is "unsuccessful" if either

  1. The job itself failed to complete for some reason (e.g. could not connect to temporal), or
  2. The check that is performed in the job failed (since that is the whole point of the check connection job)

I think it is useful to differentiate between these cases by having different failure messages/reasons shown, but I still consider both situations as a "failed check". So I feel that we should only show the "check connection" job as "successful" if it ran to completion and the check itself was successful. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given that we hide it by default now from the UI at all, I feel we should keep it as successful even if the actual result of the check was negative (which we still show as negative, but the user won't see the successful Job run anymore unless they are in advanced mode). Given that it's a technical detail in advanced mode, I feel more inclined to not mess with the actual job status, and have that represent what happened to the actual technical job under the hood instead of trying to rewrite this. Also in case of the job being successful but the configuration check failed the logs won't have any error inside, which makes it a bit confusing if we'd show the job now as failed, but only have "successful" logs insight.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm okay I think I'm convinced that it's fine to leave it as is then. My only other suggestion is that maybe we could add a note or a tooltip somewhere in the successful job case that explains that even though the job was successful, that doesn't necessarily mean the actual check was successful

Copy link
Contributor

@lmossman lmossman left a comment

Choose a reason for hiding this comment

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

Had one more small suggestion about adding a note/tooltip for the successful job, but I don't feel super strongly about that so I'll leave that up to you if you want to do anything like that.

I tested this out locally and it works as expected for the poke API. I think the Configuration check finished label feels pretty clear to me that it is just indicating that the configuration check ran to completion, so an extra note/tooltip may not be very necessary.

Comment on lines +114 to +115
{/* Show the job log only if advanced mode is turned on or the actual job failed (not the check inside the job) */}
{job && (advancedMode || !job.succeeded) && <JobItem job={job} />}
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm okay I think I'm convinced that it's fine to leave it as is then. My only other suggestion is that maybe we could add a note or a tooltip somewhere in the successful job case that explains that even though the job was successful, that doesn't necessarily mean the actual check was successful

Comment on lines +282 to +285
"jobs.jobStatus.check_connection_source.failed": "Configuration check failed",
"jobs.jobStatus.check_connection_source.succeeded": "Configuration check finished",
"jobs.jobStatus.check_connection_destination.failed": "Configuration check failed",
"jobs.jobStatus.check_connection_destination.succeeded": "Configuration check finished",
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah okay, I wasn't sure if using Configuration instead of Connection here was intentional, but I think your justification makes sense, so I think this is fine. I agree that using finished instead of succeeded for that case makes sense due to the issue I pointed out

@timroes timroes merged commit 06fafa8 into master Oct 3, 2022
@timroes timroes deleted the tim/fix-connector-logs branch October 3, 2022 14:22
jhammarstedt pushed a commit to jhammarstedt/airbyte that referenced this pull request Oct 31, 2022
* Fix messages and improve connector log

* Remove deprecated strings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp area/platform issues related to the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants