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

Do not wait the end of a reset to return an update #17591

Merged
merged 8 commits into from
Oct 5, 2022

Conversation

benmoriceau
Copy link
Contributor

@benmoriceau benmoriceau commented Oct 5, 2022

What

return the update endpoint without having to wait for a reset to finish running.

Important files to review

ConnectionManagerWorkflow.java -> add a new signal
WorkflowState.java -> Add a new state that allow to continue the new run without waiting for the scheduling
ConnectionManagerWorkflowImpl.java -> User the new state
TemporalClient.java -> Remove the synchronous reset and call the new signal if needed.

Address #16178

@benmoriceau benmoriceau marked this pull request as draft October 5, 2022 01:10
@github-actions github-actions bot added area/platform issues related to the platform area/server area/worker Related to worker labels Oct 5, 2022
@benmoriceau benmoriceau temporarily deployed to more-secrets October 5, 2022 01:11 Inactive
@benmoriceau benmoriceau changed the title Directly save after update Do not wait the end of a reset to return an update Oct 5, 2022
@benmoriceau benmoriceau temporarily deployed to more-secrets October 5, 2022 15:04 Inactive
@benmoriceau benmoriceau temporarily deployed to more-secrets October 5, 2022 15:50 Inactive
@benmoriceau benmoriceau temporarily deployed to more-secrets October 5, 2022 15:57 Inactive
@benmoriceau benmoriceau marked this pull request as ready for review October 5, 2022 16:27
@benmoriceau
Copy link
Contributor Author

Hmm I don't know why the build didn't run.

@benmoriceau benmoriceau temporarily deployed to more-secrets October 5, 2022 17:00 Inactive
@benmoriceau benmoriceau temporarily deployed to more-secrets October 5, 2022 17:45 Inactive
@benmoriceau
Copy link
Contributor Author

I tested the Basic and Advance Acceptance Test locally. They passed

Copy link
Contributor

@jdpgrailsdev jdpgrailsdev left a comment

Choose a reason for hiding this comment

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

:shipit:

@benmoriceau
Copy link
Contributor Author

I relaunched the test, I think that the error is transient

@benmoriceau benmoriceau temporarily deployed to more-secrets October 5, 2022 19:44 Inactive
@@ -642,7 +643,7 @@ void testUpdateConnectionWithUpdatedSchemaLegacy() throws JsonValidationExceptio
when(configRepository.getAllStreamsForConnection(expected.getConnectionId())).thenReturn(connectionStreams);

final ManualOperationResult successfulResult = ManualOperationResult.builder().jobId(Optional.empty()).failingReason(Optional.empty()).build();
when(eventRunner.synchronousResetConnection(any(), any())).thenReturn(successfulResult);
when(eventRunner.resetConnection(any(), any(), anyBoolean())).thenReturn(successfulResult);
when(eventRunner.startNewManualSync(any())).thenReturn(successfulResult);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Comment also applies for the other tests: I think we no longer need this mock, can we remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gosusnp The build is green, I'll merge/deploy and address your comments in another PR

@Override
public void resetConnectionAndSkipNextScheduling() {
if (workflowState.isDoneWaiting()) {
workflowState.setCancelledForReset(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

For my understanding, setCancelledForReset means that we cancel the current run and start a reset?

@benmoriceau benmoriceau merged commit b4fd1ea into master Oct 5, 2022
@benmoriceau benmoriceau deleted the bmoric/fix-long-running-endpoint branch October 5, 2022 20:22
benmoriceau added a commit that referenced this pull request Oct 5, 2022
letiescanciano added a commit that referenced this pull request Oct 6, 2022
…vation

* master: (26 commits)
  supply a source id for schema discovery in connector integration tests (#17662)
  Source Iterable: Add permission check for stream (#17602)
  Moving TrackingClientSingleton.initialize into the bean itself (#17631)
  Handle null workspace IDs in tracking/reporting methods gracefully (#17641)
  Bump Airbyte version from 0.40.11 to 0.40.12 (#17653)
  Revert "Do not wait the end of a reset to return an update (#17591)" (#17640)
  Standardize HttpRequester's url_base and path format (#17524)
  Create geography_type enum and add geography column in connection and workspace table (#16818)
  airbyte-cron: update connector definitions from remote (#16438)
  Do not wait the end of a reset to return an update (#17591)
  Remove redundant title labels from connector specs (#17544)
  Updated GA4 status
  support large schema discovery (#17394)
  🪟 🐛 Fixes connector checks not properly ending their loading state (#17620)
  🪟🧪 [Experiment] add hideOnboarding experiment (#17605)
  Source Recharge: change releaseStage to GA (#17606)
  Source Recharge: skip stream if 403 received (#17608)
  remove sonar-scan workflow (#17609)
  Mark/tables should be full width on all pages (#17401)
  Auto fail all workfow if there is a Versioning issue (#17562)
  ...
benmoriceau added a commit that referenced this pull request Oct 6, 2022
letiescanciano added a commit that referenced this pull request Oct 7, 2022
…vation

* master: (32 commits)
  fixed octavia position and z-index on onboarding page (#17708)
  Revert "Revert "Do not wait the end of a reset to return an update (#17591)" (#17640)" (#17669)
  source-google-analytics-v4: use hits metric for check (#17717)
  Source linkedin-ads: retry 429/5xx when refreshing access token (#17724)
  🐛 Source Mixpanel: solve cursor field none expected array (#17699)
  🎉 8890 Source MySql: Fix large table issue by fetch size (#17236)
  Test e2e testing tool commands (#17722)
  fixed escape character i18n error (#17706)
  Docs: adds missing " in transformations-with-airbyte.md (#17723)
  Change Osano token to new project (#17720)
  Source Github: improve 502 handling for `comments` stream (#17715)
  #17506 source snapchat marketing: retry failed request for refreshing access token (#17596)
  MongoDb Source: Increase performance of discover (#17614)
  Testing tool commands for run scenarios (#17550)
  Kustomize: Missing NORMALIZATION_JOB_* environment variables in stable-with-resource-limits overlays (#17713)
  Fix console errors (#17696)
  Revert: #17047 Airbyte CDK: Improve error for returning non-iterable from connectors parse_response (#17707)
  #17047 Airbyte CDK: Improve error for returning non-iterable from connectors parse_response (#17626)
  📝 Postgres source: document occasional full refresh under cdc mode (#17705)
  Bump Airbyte version from 0.40.12 to 0.40.13 (#17682)
  ...
jhammarstedt pushed a commit to jhammarstedt/airbyte that referenced this pull request Oct 31, 2022
* Directly save after update

* Fix existing tests

* Rm unused

* Format

* Add test t

* Format
jhammarstedt pushed a commit to jhammarstedt/airbyte that referenced this pull request Oct 31, 2022
jhammarstedt pushed a commit to jhammarstedt/airbyte that referenced this pull request Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform area/server area/worker Related to worker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants