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

Notifications Workflow #18735

Merged
merged 35 commits into from
Nov 15, 2022
Merged

Notifications Workflow #18735

merged 35 commits into from
Nov 15, 2022

Conversation

alovew
Copy link
Contributor

@alovew alovew commented Oct 31, 2022

  • New Connection Notifications Workflow for sending schema change notifications
  • Two new activities for this workflow: SlackConfigActivity and NotifySchemaChangeActivity

@github-actions github-actions bot added area/platform issues related to the platform area/worker Related to worker labels Oct 31, 2022
@alovew alovew temporarily deployed to more-secrets October 31, 2022 22:30 Inactive
@alovew alovew temporarily deployed to more-secrets November 3, 2022 20:49 Inactive
@alovew alovew temporarily deployed to more-secrets November 3, 2022 21:17 Inactive
@alovew alovew force-pushed the anne/notifications-workflow branch from 3747282 to 3790d4f Compare November 7, 2022 19:00
@alovew alovew temporarily deployed to more-secrets November 7, 2022 19:02 Inactive
@alovew alovew temporarily deployed to more-secrets November 7, 2022 19:20 Inactive
@alovew alovew temporarily deployed to more-secrets November 7, 2022 19:23 Inactive
@alovew alovew force-pushed the anne/notifications-workflow branch from ebecf5e to 2740661 Compare November 7, 2022 20:11
@alovew alovew temporarily deployed to more-secrets November 7, 2022 20:13 Inactive
@alovew alovew temporarily deployed to more-secrets November 7, 2022 21:01 Inactive
@alovew alovew temporarily deployed to more-secrets November 8, 2022 00:18 Inactive
@alovew alovew marked this pull request as ready for review November 8, 2022 00:34
@alovew alovew temporarily deployed to more-secrets November 8, 2022 01:16 Inactive
@alovew alovew temporarily deployed to more-secrets November 14, 2022 23:55 Inactive
@alovew alovew temporarily deployed to more-secrets November 15, 2022 00:24 Inactive
@alovew alovew temporarily deployed to more-secrets November 15, 2022 00:30 Inactive
@alovew alovew force-pushed the anne/notifications-workflow branch from e1a50d3 to acb5ab5 Compare November 15, 2022 00:50
Copy link
Contributor

@gosusnp gosusnp left a comment

Choose a reason for hiding this comment

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

LGTM with a few side notes:

  • there's some missing finals that should be addressed
  • I am not sure about how granular we want our integration to temporal here (I left a comment in tho ConnectionNotificationWorkflowImpl. I would opt for a more high level integration, that might be a longer discussion, I am fine not blocking on this.

public boolean sendSchemaChangeNotification(UUID connectionId, boolean isBreaking) throws IOException, InterruptedException, ApiException {
public boolean sendSchemaChangeNotification(UUID connectionId)
throws IOException, InterruptedException, ApiException, ConfigNotFoundException, JsonValidationException {
StandardSync standardSync = configFetchActivity.getStandardSync(connectionId);
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
StandardSync standardSync = configFetchActivity.getStandardSync(connectionId);
final StandardSync standardSync = configFetchActivity.getStandardSync(connectionId);

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 final are missing in the rest of this function. You might want to double check your IDE settings.

private ConfigFetchActivity configFetchActivity;

@Override
public boolean sendSchemaChangeNotification(UUID connectionId)
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be a style issue, we can discuss this outside of this PR if it helps.

The activity breakdown doesn't feel natural to me which brings up a few questions:

  • Do we really want to have one activity per API request? I find that tedious to follow, code end up very truncated, having to hop through interfaces/implementations to read. Side note, probably not a concern here due to the load of notifications, but technically, that's a few extra round trips, in terms of networking.
  • Looking at line 41: intuitively, I think this bit of logic should be done in the notifySchemaChangeActivity rather than in the workflow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I see what you're saying here. I'll make this a followup issue

@alovew alovew temporarily deployed to more-secrets November 15, 2022 00:52 Inactive
@alovew alovew temporarily deployed to more-secrets November 15, 2022 01:12 Inactive
@alovew alovew temporarily deployed to more-secrets November 15, 2022 01:41 Inactive
@alovew alovew temporarily deployed to more-secrets November 15, 2022 02:36 Inactive
@alovew alovew temporarily deployed to more-secrets November 15, 2022 03:35 Inactive
@@ -275,6 +275,11 @@ spec:
configMapKeyRef:
name: airbyte-env
key: USE_STREAM_CAPABLE_STATE
- name: SHOULD_RUN_NOTIFY_WORKFLOWS
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 that the MAX_NOTIFY_WORKERS env is missing here

@alovew alovew temporarily deployed to more-secrets November 15, 2022 18:08 Inactive
@alovew alovew temporarily deployed to more-secrets November 15, 2022 19:08 Inactive
@alovew alovew temporarily deployed to more-secrets November 15, 2022 21:14 Inactive
@alovew alovew merged commit fdb96d0 into master Nov 15, 2022
@alovew alovew deleted the anne/notifications-workflow branch November 15, 2022 21:58
colesnodgrass pushed a commit that referenced this pull request Nov 16, 2022
* notification workflow
colesnodgrass added a commit that referenced this pull request Nov 30, 2022
* wip; add micronaut

* add additional json deserializer methods

* wip; converting to micronaut

* misc cleanup

* wip; broken

* wip; still broken

* wip

* formatting

* minor code cleanup; no actual changes

* wip; still broken

* removed commented out code; no longer broken

* wip; clean-up micronaut code

* cleanup; format

* fix pmd issues

* remove unused file

* init ApplicationTest

* edited link (#19444)

* move 'Example values' into intl (#19446)

* Revert "Update action.yml (#19416)" (#19450)

This reverts commit 78fb528.

* Notifications Workflow (#18735)

* notification workflow

* Bmoric/remove unused code (#19188)

* Tmp

* Move when the deletion is performed

* Re-enable disable test

* PR comments

* Use cancel

* rename

* Fix test and version check position

* remove unused temporal deletion code

* Remove false todo

* Rm repeated test

* Rm unused import

* Make sure that long running activity are not retried (#19452)

* Parse list of dicts in json_schema_helper.find_nodes() (#19386)

* Get test on nested list/dict passing - use index to query next object for list

* Fix flakecheck

* Test that get_node provides correct value

* Improve test and test cases

* Rewrite method for better comprehension

* Add test for base-level key. Rewrite method for comprehension and handling this case

* adding tests

* fix test

* formatting

* remove unused dependencies

* add missing test resource

* format

* add missing test resource (real)

* format

* add back protocol-models dep

* format

* pr feedback; log stacktrace

Co-authored-by: Sophia Wiley <106352739+sophia-wiley@users.noreply.github.com>
Co-authored-by: Lake Mossman <lake@airbyte.io>
Co-authored-by: Topher Lubaway <asimplechris@gmail.com>
Co-authored-by: Anne <102554163+alovew@users.noreply.github.com>
Co-authored-by: Benoit Moriceau <benoit@airbyte.io>
Co-authored-by: Ella Rohm-Ensing <erohmensing@gmail.com>
akashkulk pushed a commit that referenced this pull request Dec 2, 2022
* notification workflow
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/worker Related to worker kubernetes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants