-
Notifications
You must be signed in to change notification settings - Fork 7
feat(*): revert support v2 events as well as v3 events (#394)" #395
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
) | ||
|
||
func (a Activities) EventsSendConnectorReset(ctx context.Context, connectorID models.ConnectorID, at time.Time) error { | ||
return a.events.Publish(ctx, a.events.NewEventResetConnector(connectorID, at)...) | ||
return a.events.Publish(ctx, a.events.NewEventResetConnector(connectorID, at)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainStandardized event publishing pattern for v3 events The removal of the variadic syntax in this event publishing call is consistent with the changes in other files and aligns with the PR objective to standardize on v3 events. Similar to the other files, static analysis shows this line isn't covered by tests. Consider adding or extending tests to verify this functionality works as expected after removing v2 event support. 🏁 Script executed: #!/bin/bash
# Checking test coverage for connector reset events
echo "Searching for test files related to connector reset events..."
fd -e go -g "*test*" events_send_connector_reset
echo "\nChecking test coverage for NewEventResetConnector..."
fd -e go -g "*test*" events | xargs grep -l "NewEventResetConnector" || echo "No direct tests found for NewEventResetConnector" Length of output: 687 Standardized V3 Event Publishing – Test Coverage Needed The updated event publishing in return a.events.Publish(ctx, a.events.NewEventResetConnector(connectorID, at)) now aligns with the PR objective to standardize on v3 events. However, our investigation using static analysis indicates that there aren’t any direct tests covering the functionality of 🧰 Tools🪛 GitHub Check: codecov/patch[warning] 12-12: internal/connectors/engine/activities/events_send_connector_reset.go#L12 |
||
} | ||
|
||
var EventsSendConnectorResetActivity = Activities{}.EventsSendConnectorReset | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
) | ||
|
||
func (a Activities) EventsSendPaymentInitiation(ctx context.Context, pi models.PaymentInitiation) error { | ||
return a.events.Publish(ctx, a.events.NewEventSavedPaymentInitiation(pi)...) | ||
return a.events.Publish(ctx, a.events.NewEventSavedPaymentInitiation(pi)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainStandardized event handling for payment initiation events This modification removes the variadic syntax from the As with the other files, static analysis indicates this line isn't covered by tests. Consider adding test coverage to verify this critical functionality works correctly after the event structure changes. 🏁 Script executed: #!/bin/bash
# Checking test coverage for payment initiation events
echo "Searching for test files related to payment initiation events..."
fd -e go -g "*test*" events_send_payment_initiation
echo "\nChecking test coverage for NewEventSavedPaymentInitiation..."
fd -e go -g "*test*" events | xargs grep -l "NewEventSavedPaymentInitiation" || echo "No direct tests found for NewEventSavedPaymentInitiation"
# Check if there are broader integration tests covering event publishing
echo "\nChecking integration tests that might cover payment events..."
fd -e go -g "*integration*test*" | xargs grep -l "Payment" || echo "No integration tests found for payment events" Length of output: 1036 🏁 Script executed: #!/bin/bash
# Checking for changes in the event creation functions
echo "Looking at implementation of event creation functions that are being called..."
rg -A 5 -B 5 "func .* NewEventSavedPaymentInitiation" || echo "Function definition not found"
rg -A 5 -B 5 "func .* NewEventSavedBalances" || echo "Function definition not found"
rg -A 5 -B 5 "func .* NewEventSavedAccounts" || echo "Function definition not found"
rg -A 5 -B 5 "func .* NewEventResetConnector" || echo "Function definition not found" Length of output: 5292 Standardized event handling for payment initiation events – please add tests This change correctly updates the call to
🧰 Tools🪛 GitHub Check: codecov/patch[warning] 11-11: internal/connectors/engine/activities/events_send_payment_initiation.go#L11 |
||
} | ||
|
||
var EventsSendPaymentInitiationActivity = Activities{}.EventsSendPaymentInitiation | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -477,11 +477,8 @@ | |
}, | ||
workflow.RunSendEvents, | ||
workflow.SendEvents{ | ||
PaymentInitiation: &pi, | ||
SendEventPaymentInitiationAdjustment: &workflow.SendEventPaymentInitiationAdjustment{ | ||
PaymentInitiation: &pi, | ||
PaymentInitiationAdjustment: &adj, | ||
}, | ||
PaymentInitiation: &pi, | ||
PaymentInitiationAdjustment: &adj, | ||
}, | ||
Comment on lines
+480
to
482
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainSimplified event payload structure. Good refactoring to flatten the Static analysis indicates these lines lack test coverage. Consider adding a test case for 🏁 Script executed: #!/bin/bash
# Check if there are any tests covering the CreateFormancePaymentInitiation method
echo "Searching for tests that cover CreateFormancePaymentInitiation..."
rg -l "Test.*CreateFormancePaymentInitiation" --type go Length of output: 198 Simplified Event Payload Structure: Approval with Test Coverage Needed Great job on flattening the However, our search for tests covering the For example, you could start by double-checking the test coverage with: #!/bin/bash
echo "Searching for tests that cover CreateFormancePaymentInitiation..."
rg -l "Test.*CreateFormancePaymentInitiation" --type go Once the tests are in place, it will strengthen our confidence in this refactoring. 🧰 Tools🪛 GitHub Check: codecov/patch[warning] 480-481: internal/connectors/engine/engine.go#L480-L481 |
||
) | ||
if err != nil { | ||
|
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.
💡 Verification agent
🧩 Analysis chain
Consistent event publishing pattern for balance events
This change follows the same pattern as other event publishing modifications, removing the variadic syntax to align with the v3 events standardization goal.
The static analysis indicates this line isn't covered by tests. Consider ensuring test coverage for the updated event publishing functionality, particularly since this represents a fundamental change in how events are structured.
🏁 Script executed:
Length of output: 955
Action Required: Enhance Test Coverage for the Updated Events Publishing Functionality
The updated event publishing code follows the v3 events standardization, aligning with the approach used in other parts of the code. However, our analysis indicates that there are currently no tests covering the newly implemented
NewEventSavedBalances
functionality. This is concerning given that it represents a fundamental change in event structure. Please add appropriate unit and/or integration tests to verify that the balance events are published and structured correctly.internal/connectors/engine/activities/events_send_balance.go
NewEventSavedBalances
event publishing path. Consider both direct unit tests and integration tests to ensure comprehensive coverage.🧰 Tools
🪛 GitHub Check: codecov/patch
[warning] 11-12: internal/connectors/engine/activities/events_send_balance.go#L11-L12
Added lines #L11 - L12 were not covered by tests