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

save queue name into Attempts table #17921

Merged
merged 8 commits into from
Oct 20, 2022
Merged

save queue name into Attempts table #17921

merged 8 commits into from
Oct 20, 2022

Conversation

xiaohansong
Copy link
Contributor

@xiaohansong xiaohansong commented Oct 12, 2022

What

#15898

save queue name into Attempts table so we can analysis and monitor data by data plane.

@github-actions github-actions bot added area/api Related to the api area/documentation Improvements or additions to documentation area/platform issues related to the platform area/server area/worker Related to worker labels Oct 12, 2022
@xiaohansong xiaohansong temporarily deployed to more-secrets October 12, 2022 22:54 Inactive
@xiaohansong xiaohansong requested a review from pmossman October 13, 2022 00:14
@xiaohansong xiaohansong marked this pull request as ready for review October 13, 2022 00:14
@xiaohansong xiaohansong temporarily deployed to more-secrets October 13, 2022 00:17 Inactive
@xiaohansong xiaohansong temporarily deployed to more-secrets October 13, 2022 05:04 Inactive
@xiaohansong xiaohansong temporarily deployed to more-secrets October 13, 2022 20:57 Inactive
@@ -18,6 +18,7 @@ public interface ReplicationActivity {
StandardSyncOutput replicate(JobRunConfig jobRunConfig,
IntegrationLauncherConfig sourceLauncherConfig,
IntegrationLauncherConfig destinationLauncherConfig,
StandardSyncInput syncInput);
StandardSyncInput syncInput,
final String taskQueue);
Copy link
Contributor

Choose a reason for hiding this comment

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

Talked about this on zoom, but to recap in writing:

Because this is changing the signature of an ActivityMethod, we should be careful around how this would affect any running workflows when we deploy the change.

I think that Temporal will basically replay the activity by passing in 'null' for any existing workflows that started before this was added, so we should make sure the code can handle 'null' as an input. Might be good to add a @Nullable annotation here with a comment explaining that this is to handle backwards compatibility with older Temporal workflows.

Once we're confident the older workflows are all finished, we can remove the @nullable annotation and cleanup if we'd like.

Copy link
Contributor

@pmossman pmossman left a comment

Choose a reason for hiding this comment

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

@xiaohansong let me know when you've addressed the Temporal versioning / backwards compatibility concern and I can review again! Also let me know if you have any questions along the way!

@xiaohansong xiaohansong temporarily deployed to more-secrets October 18, 2022 23:57 Inactive
@xiaohansong xiaohansong temporarily deployed to more-secrets October 19, 2022 21:34 Inactive
@xiaohansong
Copy link
Contributor Author

@pmossman tested and it worked without failing! (Previously was failing due to Optional.of not accepting null value)

@xiaohansong xiaohansong requested a review from pmossman October 19, 2022 22:17
@xiaohansong xiaohansong temporarily deployed to more-secrets October 19, 2022 22:18 Inactive
Copy link
Contributor

@pmossman pmossman left a comment

Choose a reason for hiding this comment

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

Looks good! Left a few small comments, and there's some load_test cleanup files that were accidentally committed. Good to merge once those are addressed!

@@ -116,7 +117,8 @@ public ReplicationActivityImpl(@Named("containerOrchestratorConfig") final Optio
public StandardSyncOutput replicate(final JobRunConfig jobRunConfig,
final IntegrationLauncherConfig sourceLauncherConfig,
final IntegrationLauncherConfig destinationLauncherConfig,
final StandardSyncInput syncInput) {
final StandardSyncInput syncInput,
@Nullable final String taskQueue) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it'd be worth adding a comment explaining that this is only nullable so that workflow executions from before the change still work. Could also add a TODO comment that we can make this non-nullable in the future once there aren't any older workflow executions still running

@@ -0,0 +1 @@
null
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like these got accidentally committed

@xiaohansong xiaohansong temporarily deployed to more-secrets October 19, 2022 23:27 Inactive
@xiaohansong xiaohansong merged commit 6b1c5ee into master Oct 20, 2022
@xiaohansong xiaohansong deleted the xiaohan/queue branch October 20, 2022 00:10
jhammarstedt pushed a commit to jhammarstedt/airbyte that referenced this pull request Oct 31, 2022
* save queue name

* make input nullable because we changed signature

* PR Comments fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Related to the api area/documentation Improvements or additions to documentation 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.

2 participants