-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: Skip request #2397
Feat: Skip request #2397
Conversation
I would probably omit this |
Hey @JorgeTrovisco, thanks for creating this PR. I will test it and get back to you soon! |
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.
I just checked out your branch locally and run into this issue if I try to use the new function:
Same thing happens if I remove the if before the skip condition, but doesn't happen if I remove the skip function call. Did I do it wrong? If yes I would recommend to implement some intuitive error handling
if (type === 'request-skipped') { | ||
const item = collection.runnerResult.items.find((i) => i.uid === request.uid); | ||
item.status = 'skipped'; | ||
item.responseReceived = action.payload.responseReceived; |
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.
What's the reason item.responseReceived
is set here?
Seems like a copy paste mistake but I could be wrong.
I would expect action.payload.responseReceived
to be undefined when the request is skipped so item.responseReceived
would be as well?
Also why are we using .find()
here, whereas all the other types use .findLast()
?
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.
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.
Thank you so much for your fast reply! Looks very good (on code level)
So have you been able to reproduce my error or do I need to set up some collection to reproduce the error?
Or did I use the function not as intended?
Shouldn't it be also implemented for bruno-cli ? |
So this is the smallest reproducible example I was able to build: example.bru
For reproduction it is the easiest to set up a new ENV with the var |
The skip request is just for collection running, so when you execute the request manually it should still be executed. It works without the creation of the environment variables? Is the error related with trying to get a unavailable variable? |
|
What you are saying is actually a very valid point. I think to break it down, there are two different requirements behind it. Your Requirement: (I suppose)
My Requirement:
However, honestly, I feel like the implementation you did with the
In any case we both agree, that, if you execute a single request which is using the Does this make sense? Do you agree? Thank you so much already for all your efforts, I really appreciate your work! |
I think that is good at this point
Is there any guide like https://github.com/usebruno/bruno/blob/main/contributing.md to run the CLI version? |
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.
I haven't tested in cli but in UI it works very well for both runner and single request, thank you so much!
Thank you for your work on this! This feature is essential for our current project. Implementing this functionality will greatly enhance endpoint testing, and I believe many other users will benefit from it as well |
Hi! When this future will be available? |
Still no update on this @helloanoop @lohxt1 ? I would love to further collaborate to the project, but waiting for over 6 months for a PR with no progress or feedback feels annoying sorry. |
Really, I was also very excited to contribute to this project, but the effort put into a feature that I really needed with no return was very frustrating. I didn’t even resolve the conflicts because I was expecting some type of feedback. |
There are many great PRs just filling with cobwebs. In my case I've incorporated changes of you both and work great. I thing community are already testing and validation this kind of changes so, code quality shouln't be an issue for merging Lack of feedback only causes fragmentation and stops the willing of collaborating. |
Since there's no update still and there is no progress, and for me personally this feature would be more important than any other updates from the recent months I was wondering if we could just merge and build this version? I would be fine with not receiving updates from the main version and keeping this fork. I have no experience in how the bundling works and if this can be done easily, but maybe we could give it a try, what do you think @JorgeTrovisco ? |
I was about to merge with the current version when I came across this PR (#3719). I haven’t had the chance to review its implementation yet, but it seems to cover this feature. Therefore, I believe there’s no need to proceed with the one I was working on. |
I had the opportunity to review its implementation, and while it addresses the need to skip the request, it unfortunately results in the loss of features. We can add However:
I believe we can proceed with the #3719 version, as it addresses the issue of skipping requests on the runner and it is already merged. @lohxt1 When can we expect a version 1.38.0 with this feature included? |
Hi @JorgeTrovisco thank you soo much again! And well this is actually kinda great news! For me the features added in #3719 add a lot of value to Bruno. However, I personally preferred your implementation of the request skipping (especially those diffs you pointed out). I personally would wanna see how many requests were skipped and would like to skip a single request if certain pre-conditions are not met. (This avoids generating error logs on my server) I however don't understand why there was not any Feedback on this thread @lohxt1 and you just created a new PR taking the chance of @JorgeTrovisco to have a contribution to the project. Neither this PR nor the original feature request are mentioned in your PR. This gives the feeling community contributions are not appreciated, as the something similar already happened with #3105 and most likely other community created PRs. Especially seeing that the good ideas implemented with this PR seem to not taken into consideration for the merged PR. |
As the skipping was released with the latest version I gave it a try. It does a decent job, with the tradeoffs @JorgeTrovisco mentioned in mind. In order to keep track of the missing features of the current released version I opened two new feature requests. One Covering the single request skipping #3764 and one covering the UI improvements #3765. While I personally don't see much chance for an implementation covering #3764 done by the community to be merged, I was wondering if we would want to give the points mentioned in #3765 a try at least. For my impression this should be done easily without too much of an effort. I could even migrate your implementation details to a new branch with the current head. However, as I would do this in a new branch, I would not be able to keep the history and kinda "steal" your contribution @JorgeTrovisco. As you put in all the work already, it would feel more fair to have it merged with your name on it. So let me know if you would like to give this a try maybe or if you would prefer me doing that for you. |
@nikischin Yes, the points mentioned in #3765 should be relatively straightforward to implement even with the current version. However, given the possibility that the implementation might be ignored or replaced with similar code without any mention, I don’t think I’ll pursue it myself. That said, feel free to implement it. I’d be happy to review and validate it afterward. |
Hi @JorgeTrovisco, First, I’d like to sincerely apologize for not addressing your PR in a timely manner. It was absolutely not our intention to overlook your contribution. We recently had to build utility functions - We had a team meeting internally around this hiccup and we deeply regret how this situation unfolded (given the discussions and time spent by the community in shaping up this feature by you and @nikischin) @JorgeTrovisco We've gone ahead and attributed credits for your work in the release changelog As we perused through the PR and comments, we noticed there are additional enhancements in your work (as described in #3764 and #3765) that were not included in the version we released. Thank you @nikischin for helping shape this PR and helping with creating follow-up tickets to track the additional enhancements. Again, we deeply regret how this situation unfolded here and are committed to doing better. Thanks, |
Mostly taken from @JorgeTrovisco 's implementation usebruno#2397
Description
Adds the feature mentioned on #2116. This functionality is important because some endpoints cannot be tested recurrently when we invoke complex APIs. This way we can keep these endpoints in the collection with examples and documentation without running the risk of invoking them in the collection run.
Contribution Checklist:
Screenshots