-
Notifications
You must be signed in to change notification settings - Fork 125
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
refactor unit testing framework to have less need for allow
#1148
Comments
Hi @Licenser, looking into it! |
Awesome :) some of it (unit tests) have been touched in #1143 that might give an idea on how to go about it |
Thanks @Licenser, lemme see and work around it. |
Awesome :) it can get a bit tricky with lifetimes and figuring out which inputs can be grouped together if you have a plan and want to run it by someone or need a hand feel free to reach out. |
Heya @afzal442 I just wanted to check in how things are going and if you could use help with anything? |
This comment has been minimized.
This comment has been minimized.
thanks I just had a connection with @mfelsche. he helped me how to debug that unit testing on vscode, etc. |
That's always a bit tough since we're all working, it's best and generally preferred to post questions in a forum like this or the general chat so it's easier for others to comment/learn from and get involved. It also prevents knowledge silos which is quite important in a large project like tremor, what happens in a voice chat is lost after the end, what happens in text in an open forum like the ticket is saved for later. |
Yep r8! I agree with you.
But I was interested in this issue by looking at the label as gfi. |
It is, it's a fairly self-contained issue that doesn't require a deep understanding of the system or rust. And we're generally happy to help, but it doesn't change the fact that we also have other responsibilities throughout the day. We try to make time where we can but we can't just drop everything at any particular time. So as explained above, asynchronous communication, with all the other benefits, is the most efficient way as we can take the 15 minutes we have here and there to help out. And, as explained above as well, it allows someone else to hope in and help that might have an easier time on that day :). Otherwise, we have open office hours every second Tuesday of the month you can look at the schedule here https://community.cncf.io/tremor-community/ |
Describe the problem you are trying to solve
The unit testing framework uses a large number of arguments in most of it's functions, this can be unwieldy and easy to get wrong. This is highlighted by the need to have a large number of
allow
statements that circumvent the clippy lints.Describe the solution you'd like
Refactor the function signatures by grouping repeated data together. A starting point could be to group
Into a shared struct that can be re-used over functions. This might apply to other parts of the CLI as well.
As an additional bonus this reduces the risk of mistakes by accidentally swapping parameters with similar types but different meanings (like
includes
andexcludes
)The text was updated successfully, but these errors were encountered: