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

Standardize watcher Download() interface #868

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

djjuhasz
Copy link
Collaborator

@djjuhasz djjuhasz commented Feb 23, 2024

Refs #867

  • Update existing watcher Download() method and interface signatures to take a destination filepath (string) instead of an io.Writer stream
  • Add a filewatcher.Download() method
  • Create a minio.Download() method and move implementation specific code from serviceImpl.Download() to it
  • Update mocks

djjuhasz added a commit that referenced this pull request Feb 23, 2024
Fixes #868

- Update existing watcher Download() method and interface signatures to
  take a destination filepath (string) instead of an io.Writer stream
- Add a `filewatcher.Download()` method
- Create a `minio.Download()` method and move implementation specific
  code from `serviceImpl.Download()` to it
- Update mocks
@djjuhasz djjuhasz force-pushed the dev/issue-867-standardize-watcher-download branch 2 times, most recently from 9cb1f5e to 0a39488 Compare February 23, 2024 00:51
Copy link

codecov bot commented Feb 23, 2024

Codecov Report

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

Project coverage is 47.23%. Comparing base (e23712e) to head (21095e5).

Files Patch % Lines
internal/watcher/minio.go 55.55% 4 Missing and 4 partials ⚠️
internal/watcher/filesystem.go 78.78% 4 Missing and 3 partials ⚠️
internal/filenotify/filenotify.go 50.00% 2 Missing ⚠️
internal/filenotify/poller.go 0.00% 2 Missing ⚠️
internal/watcher/watcher.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #868      +/-   ##
==========================================
+ Coverage   45.99%   47.23%   +1.23%     
==========================================
  Files          94       94              
  Lines        5061     5087      +26     
==========================================
+ Hits         2328     2403      +75     
+ Misses       2531     2462      -69     
- Partials      202      222      +20     

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

@djjuhasz djjuhasz force-pushed the dev/issue-867-standardize-watcher-download branch 2 times, most recently from 696bb2e to 0478086 Compare February 23, 2024 00:57
@sevein
Copy link
Contributor

sevein commented Feb 23, 2024

@djjuhasz I think that you're environment is somehow still using an old version of mockgen.

Using bash:

$ source hack/activate/bash 
$ mockgen -version
v0.4.0
$ ls ~/.cache/enduro-sdps/Linux/x86_64/versions/mockgen/
0.4.0

Not sure what's going on. Maybe you're using a version of mockgen installed globally, but that shouldn't happen afaik. You could try this:

$ rm ~/.cache/enduro-sdps/Linux/x86_64/versions/mockgen/*

That would force mockgen to be downloaded again when running: make gen-mock.

@djjuhasz
Copy link
Collaborator Author

@sevein I forgot to do the source hack/activate/bash, so I was generating mocks with mockgen v0.3.0. :( I've just added a commit with the mockgen v0.4.0 output.

@djjuhasz djjuhasz force-pushed the dev/issue-867-standardize-watcher-download branch from faef6e3 to 72b2994 Compare February 28, 2024 01:23
Copy link
Contributor

@sevein sevein left a comment

Choose a reason for hiding this comment

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

👍

internal/watcher/config.go Outdated Show resolved Hide resolved
internal/filenotify/filenotify.go Show resolved Hide resolved
internal/watcher/watcher.go Show resolved Hide resolved
@djjuhasz djjuhasz force-pushed the dev/issue-867-standardize-watcher-download branch 6 times, most recently from e934211 to 983284e Compare March 1, 2024 23:22
Refs #867

- Update the existing watcher `Download()` method and interface
  signatures to take a destination filepath (string) instead of an
  `io.Writer` stream
- Add a `filewatcher.Download()` method
- Create a `minio.Download()` method and move implementation specific
  code from `serviceImpl.Download()` to it
- Add `MinioConfig.URL` field to set bucket config by URL for testing
- Add unit tests
- Update mocks
@djjuhasz djjuhasz force-pushed the dev/issue-867-standardize-watcher-download branch from 983284e to 21095e5 Compare March 1, 2024 23:24
@djjuhasz djjuhasz merged commit aff8ee3 into main Mar 1, 2024
13 checks passed
@djjuhasz djjuhasz deleted the dev/issue-867-standardize-watcher-download branch March 1, 2024 23:29
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.

2 participants