-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Notifications Workflow #18735
Conversation
alovew
commented
Oct 31, 2022
•
edited
Loading
edited
- New Connection Notifications Workflow for sending schema change notifications
- Two new activities for this workflow: SlackConfigActivity and NotifySchemaChangeActivity
3747282
to
3790d4f
Compare
ebecf5e
to
2740661
Compare
e1a50d3
to
acb5ab5
Compare
There was a problem hiding this 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StandardSync standardSync = configFetchActivity.getStandardSync(connectionId); | |
final StandardSync standardSync = configFetchActivity.getStandardSync(connectionId); |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
@@ -275,6 +275,11 @@ spec: | |||
configMapKeyRef: | |||
name: airbyte-env | |||
key: USE_STREAM_CAPABLE_STATE | |||
- name: SHOULD_RUN_NOTIFY_WORKFLOWS |
There was a problem hiding this comment.
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
* notification workflow
* 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>