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

[SELC-5034] feature: added logic to discriminate event type in cdc module #288

Merged
merged 3 commits into from
Jun 5, 2024

Conversation

empassaro
Copy link
Contributor

List of Changes

Added logic to discriminate event type in cdc module before invoking function to send notifications

Motivation and Context

With this feature we have the ability to understand if the result of a change in an onboarding document we need to send an event on ADD or UPDATE on queues

How Has This Been Tested?

local env

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@empassaro empassaro requested review from a team as code owners June 5, 2024 14:46
@github-actions github-actions bot added functions Changes are related to functions ops labels Jun 5, 2024
Copy link

sonarqubecloud bot commented Jun 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@empassaro empassaro merged commit 41ff0d7 into main Jun 5, 2024
7 of 8 checks passed
@empassaro empassaro deleted the feature/SELC-5034 branch June 5, 2024 15:01
};
}

private boolean isOverUpdateThreshold(LocalDateTime updatedAt, LocalDateTime activatedAt) {
Copy link
Contributor

Choose a reason for hiding this comment

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

it might be better to add some comments about this function...what means "isOverUpdateThreshold" ?

@@ -15,6 +15,7 @@ onboarding-cdc.storage.connection-string=${STORAGE_CONNECTION_STRING:UseDevelopm
onboarding-cdc.retry.min-backoff=${ONBOARDING-CDC-RETRY-MIN-BACKOFF:1}
onboarding-cdc.retry.max-backoff=${ONBOARDING-CDC-RETRY-MAX-BACKOFF:2}
onboarding-cdc.retry=${ONBOARDING-CDC-RETRY:3}
onboarding-cdc.minutes-threshold-for-update-notification=${ONBOARDING-CDC-MINUTES-THRESHOLD-FOR-UPDATE-NOTIFICATION:5}
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functions Changes are related to functions ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants