outbox: Make stream_id required on StreamOutbox#5056
Merged
gnprice merged 5 commits intozulip:mainfrom Oct 19, 2021
Merged
Conversation
Contributor
|
Great, thanks, this LGTM! Please merge at will. |
This property is required (since 60847c9 / zulip#4667, earlier this year), so we can rely on it to simplify away this workaround. This workaround was in fact the original prompt that caused me to notice we didn't have sender_id (or stream_id) on Outbox, and file zulip#3968 (comment)
We started supplying this property in 0c251bf / zulip#5000. That went out to users a few weeks ago, in v17.171 which rolled out 2021-09-23, so by this point the bulk of our users have upgraded to that version. Now we mark the property as required, and drop any old outbox messages that lack it in the unlikely case that there are any. This completes zulip#3998 because we've already done the same thing for `sender_id`, in a1fad7c / zulip#4304 and then 60847c9 / zulip#4667. Fixes: zulip#3998
Much nicer! Simpler and more efficient. This takes care of the followup described here: zulip#4899 (comment) which was the remaining open followup specifically mentioned on zulip#3998.
I went searching for calls to streamNameOfStreamMessage, as likely places where we could switch to a stream ID now that zulip#3998 is done. These are the sites that were easy to switch over. There remain a few that are showing the name in the UI (so legitimately should be using the name), or constructing a Narrow (which is a known cluster of cases that will require its own focused effort), as well as some that will take a bit more work for miscellaneous other reasons.
24e99ca to
8b33321
Compare
Member
Author
|
Thanks for the review! Merged. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 completes the last step of #3998 by making this property required, now that the code which started supplying it (0c251bf / #5000) has been out to users for a few weeks (in v17.171 which rolled out 2021-09-23) and the bulk of our users have upgraded.
We also take care of the two specific followups mentioned in #3998. There's still the more general followup of carrying on with #3918, converting uses of stream names to stream IDs.
Fixes: #3998