This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Executors: add general dequeue endpoint#51892
Merged
Merged
Conversation
…alid version test
Contributor
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 2f9fb8e...1b158f7.
|
efritz
reviewed
May 12, 2023
efritz
approved these changes
May 12, 2023
Piszmog
reviewed
May 12, 2023
Piszmog
left a comment
Contributor
There was a problem hiding this comment.
Great job! Just some questions and nits, but looks good!
I do wonder if we should wrap the logic ServeHTTP in something like handler.wrapHander. There are a lot of exit points in the code that require return. So it could be easy to forget a return when handling an error. Something like handler.wrapHander could make it so an error is returned that way we can have confidence that the logic ends with the error.
But not a big deal right now
Piszmog
reviewed
May 15, 2023
Piszmog
left a comment
Contributor
There was a problem hiding this comment.
Looking good! Just a couple more comments
Contributor
Author
|
@Piszmog thanks for the last review, merging with the last changes. I've added some demo videos as well. |
cesrjimenez
pushed a commit
that referenced
this pull request
May 17, 2023
- Closes https://github.com/sourcegraph/sourcegraph/issues/50613 This PR adds a first implementation of a general dequeue endpoint that can accept multiple queues. ### Improvements Due to generics, it's pretty difficult to not break this up into queue specific components due to the record types handled by each queue. This means there's still a bunch of reproduced code in the current implementation. It currently imlements `ServeHTTP`. Once https://github.com/sourcegraph/sourcegraph/issues/51656 is added, it might make sense to turn this into a new interface. ## Demo ### Only batch change jobs https://github.com/sourcegraph/sourcegraph/assets/2979513/ebe6844c-0fb9-4207-a3ce-f651a1a48631 ### Only codeintel jobs https://github.com/sourcegraph/sourcegraph/assets/2979513/af027eed-6950-4a55-b94c-73847f31ddb8 ### Both queue jobs https://github.com/sourcegraph/sourcegraph/assets/2979513/255c8716-15cb-44e4-9241-f5e28d8d8c7e ## Test plan - [x] Unit tests - [x] Demo <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> --------- Co-authored-by: Randell Callahan <piszmogcode@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a first implementation of a general dequeue endpoint that can accept multiple queues.
Improvements
Due to generics, it's pretty difficult to not break this up into queue specific components due to the record types handled by each queue. This means there's still a bunch of reproduced code in the current implementation.
It currently imlements
ServeHTTP. Once https://github.com/sourcegraph/sourcegraph/issues/51656 is added, it might make sense to turn this into a new interface.Demo
Only batch change jobs
batches.mp4
Only codeintel jobs
codeintel.mp4
Both queue jobs
both.queues.mp4
Test plan