Skip to content

outbox: Make stream_id required on StreamOutbox #5056

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

Merged
merged 5 commits into from
Oct 19, 2021

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Oct 18, 2021

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

@gnprice gnprice added a-compose/send Compose box, autocomplete, camera/upload, outbox, sending api migrations labels Oct 18, 2021
@chrisbobbe
Copy link
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.
@gnprice gnprice merged commit 8b33321 into zulip:main Oct 19, 2021
@gnprice
Copy link
Member Author

gnprice commented Oct 19, 2021

Thanks for the review! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-compose/send Compose box, autocomplete, camera/upload, outbox, sending api migrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add sender_id and stream_id properties to Outbox
2 participants