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

feat: respond to CancelACHFile events with FileCancellationResponse #228

Merged
merged 4 commits into from
Mar 13, 2024

Conversation

adamdecaf
Copy link
Member

Fixes: #141, #142

@adamdecaf adamdecaf force-pushed the feat-cancellation-responses branch from 836d081 to dd50370 Compare March 7, 2024 20:26
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 57.35294% with 29 lines in your changes are missing coverage. Please review.

Project coverage is 47.69%. Comparing base (8722d44) to head (dd50370).

Files Patch % Lines
internal/pipeline/aggregate.go 0.00% 11 Missing ⚠️
internal/pipeline/merging.go 0.00% 10 Missing ⚠️
pkg/models/events.go 0.00% 3 Missing ⚠️
internal/pipeline/file_receiver.go 83.33% 2 Missing ⚠️
internal/pipeline/mock_xfer_merging.go 0.00% 2 Missing ⚠️
internal/incoming/web/api_files.go 96.55% 0 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #228      +/-   ##
==========================================
+ Coverage   47.61%   47.69%   +0.08%     
==========================================
  Files          97       97              
  Lines        4379     4426      +47     
==========================================
+ Hits         2085     2111      +26     
- Misses       1962     1983      +21     
  Partials      332      332              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

path := filepath.Join("mergable", m.shard.Name, fmt.Sprintf("%s.ach", cancel.FileID))

// Check if the file exists already
file, _ := m.storage.Open(path)

Choose a reason for hiding this comment

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

Why don't we check the error here?

Copy link
Member Author

Choose a reason for hiding this comment

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

We're just looking for if the file exists. Cancellation can only be successful if the file gets renamed.

Choose a reason for hiding this comment

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

👍

@adamdecaf adamdecaf merged commit 73a5949 into master Mar 13, 2024
7 checks passed
@adamdecaf adamdecaf deleted the feat-cancellation-responses branch March 13, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: emit event confirming cancelation
3 participants