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

stop reset job endpoint from blocking #2246

Merged
merged 2 commits into from
Mar 2, 2021
Merged

stop reset job endpoint from blocking #2246

merged 2 commits into from
Mar 2, 2021

Conversation

cgardens
Copy link
Contributor

@cgardens cgardens commented Mar 1, 2021

What

  • I think this may be underlying a bug I was looking at in the UI where a reset job modal never closes. Either way, this endpoint shouldn't block. Want to push this fix and see if it fixes the UI bug I was seeing. If it doesn't I will bring the bug to artem's attention.

@cgardens cgardens added this to the 2021-03-05 milestone Mar 1, 2021
@@ -26,6 +26,7 @@

import pendulum as pendulum
from base_python import BaseClient

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 ran format. promise.

@@ -195,8 +201,9 @@ public ConnectionRead webBackendUpdateConnection(WebBackendConnectionUpdate webB

// wait for this to execute
JobInfoRead resetJob = schedulerHandler.resetConnection(connectionId);
final JobInfoRead completedResetJob = waitForJobToComplete(resetJob.getJob().getId());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this endpoint (updating a connection, still needs to block and until the reset job is complete, so we have to add that logic here)

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is that?

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 guess we could just not. if the reset fails then the destination will have a combination of data from different schemas.

Copy link
Contributor

@jrhizor jrhizor left a comment

Choose a reason for hiding this comment

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

I saw weird behavior when using resets, thanks for fixing.


public class WebBackendConnectionsHandler {

private static final Set<JobStatus> TERMINAL_STATUSES = Sets.newHashSet(JobStatus.FAILED, JobStatus.SUCCEEDED, JobStatus.CANCELLED);
Copy link
Contributor

Choose a reason for hiding this comment

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

I can see this set becoming handy outside of the webbackend. Is there a more approriate place where it could belong?

@@ -195,8 +201,9 @@ public ConnectionRead webBackendUpdateConnection(WebBackendConnectionUpdate webB

// wait for this to execute
JobInfoRead resetJob = schedulerHandler.resetConnection(connectionId);
final JobInfoRead completedResetJob = waitForJobToComplete(resetJob.getJob().getId());
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is that?

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.

3 participants