Conversation
Pull Request Test Coverage Report for Build 12939904652Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
std function slices.Contains Co-authored-by: Stefan Majewsky <majewsky@gmx.net>
Co-authored-by: Stefan Majewsky <majewsky@gmx.net>
Co-authored-by: Stefan Majewsky <majewsky@gmx.net>
…ls, as opposed to the export
This reverts commit d3922da.
This reverts commit 5941370. I wasn't thinking clearly here, this moves it outside of where it should be. Logically, I see what I was going for, but it doesn't make any sense
|
@majewsky is this sane? Have I addressed your feedback appropriately? |
kayrus
left a comment
There was a problem hiding this comment.
Thanks a lot for this PR! I wanted to implement this logic since I developed this tool, but I had other priorities.
General note is about exported functions/methods/types. Do they really need to be exported? Is there a need to consume them outside of this project? For example the ProgressReader struct or ParseExportFormat func
Another type of notes, I see a lot of go deps, which implement the Write/Read methods. Wouldn't it be more efficient to transfer the data from the hermes service output directly to the swift using pipes instead of collecting all this data in memory and only then upload to swift?
My gut feeling tells me that there are further minor issues, but this is a very good start anyway.
@stefanhipfel thank you for your review as well!
The reality is this is the, good for now solution. This whole thing will ultimately be replaced by Hermes doing this in the future, but there are some hold ups on that happening at the moment. I am trying to urgently get a solution out, I have meetings where I need to provide this next week. I understand that's not the best response to feedback on a PR. I can try to do more, but I really would like to get a good enough solution out, that I can get released and available to customers asap. I apologize for the attempt to get this through, however I'm trying to turn a couple rather contentious meetings next week, into reasonably lovely meetings. |
client/export.go
Outdated
| // Create upload progress bar | ||
| uploadBar := pb.Full.Start64(int64(buf.Len())) | ||
| uploadBar.Set(pb.Bytes, true) | ||
| uploadBar.SetWidth(80) |
There was a problem hiding this comment.
is it a static width? I just grepped a project and found this:
hermescli$ grep -r pb.SetWidth
vendor/github.com/cheggaaa/pb/v3/pb.go: pb.SetWidth(s.AdaptiveElWidth())maybe it make sense to do this dynamic or configurable
There was a problem hiding this comment.
Thinking about it, I'm not sure making this configurable adds anything of value. It becomes another option in the list that is fairly meaningless when it's just a nice to have indication of the process.
I've committed a change which makes the terminal width automatic. Does that satisfy your request?
I thought this was a feature to not allow people to export the entire system. :) It would be more efficient. It would also be more complex, and wouldn't show the total progress as far as I can tell. I don't know, I feel like this is fairly functional like this but I recognize and understand what you're asking for here. |
For giggles I tried to build this out, and it was a nightmare I didn't get fully working. Yaml, Json, and CSV all have different requirements, and trying to stream events like that just gets ridiculously complex. If you want to explain out what you're thinking of here, maybe I'm totally wrong in how I'm doing it. Like, moving to json lines or something would make it more achievable. |
if this is PR has a time pressure, then leave it as is. We can improve the performance later on demand. |
add swift export to hermescli to enable fast and easy swift exports of audit data.