Skip to content
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

Improvements #38

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Improvements #38

wants to merge 4 commits into from

Conversation

piegamesde
Copy link
Member

@piegamesde piegamesde commented Mar 31, 2023

Companion PR of magic-wormhole/magic-wormhole-protocols#36

I'm opening this mostly for CI atm, as I don't really have a development environment for this project

This avoids clients to have to call `claim` after `allocate` just in order
to know their mailbox.
@piegamesde piegamesde force-pushed the master branch 2 times, most recently from e63c317 to c345703 Compare March 31, 2023 14:06
@piegamesde piegamesde force-pushed the master branch 4 times, most recently from aa69e59 to 97746fb Compare March 31, 2023 14:26
Otherwise, one cannot retry after a call failed, because all succeeding
calls return "only one claim per connection"
@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03 🎉

Comparison is base (39672ae) 97.10% compared to head (63b1144) 97.13%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #38      +/-   ##
==========================================
+ Coverage   97.10%   97.13%   +0.03%     
==========================================
  Files           8        8              
  Lines         829      839      +10     
  Branches      140      143       +3     
==========================================
+ Hits          805      815      +10     
  Misses         16       16              
  Partials        8        8              
Impacted Files Coverage Δ
src/wormhole_mailbox_server/server.py 96.41% <100.00%> (+0.02%) ⬆️
src/wormhole_mailbox_server/server_tap.py 88.05% <100.00%> (+0.36%) ⬆️
src/wormhole_mailbox_server/server_websocket.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

self["websocket-protocol-options"] = []
self["allow-list"] = True
self["allow-list"] = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really want to flip around the CLI args like this -- it breaks everyone's command-lines with very little gain.

Instead we could suggest to operators that they should prefer to use --disallow-list in the immediate term, and that clients should not build in functionality that depends on list working all the time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um, not sure how this may break command lines? This was not my intention

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flips things around to turn list off by default. So if operators already wanted list to work, they'll have to change their command-lines (since the default changes).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well yes, that's how "enabling/disabling a feature by default" works? I wouldn't consider that breaking, but I can change it back if you don't like it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this: I keep the current default value, but also add the allow-list flag and print a warning that one should use it to keep that behavior in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, lets leave the flipping around of CLI flags alone in this PR. There's already a way to run with list on, and a way to run with list off.

(The CLI is the only public interface here, so I don't see a lot of gain in changing it merely to communicate "you should probably turn off list by default").

@meejah
Copy link
Member

meejah commented May 8, 2023

Deployment considerations: I think we have six possible configurations, if we ignore which "side" of the two peers is "new" versus "old" (otherwise there are more combinations).

We can have an old or new server and old or new peers (where the relevant distinction is "are they the same or different"). So we have "both-old" peers, "both-new" peers and "mixed" peers.

The six cases are:

  • old server, new peers
  • old server, old peers
  • old server, mixed peers
  • new server, new peers
  • new server, old peers
  • new server, mixed peers

So, for the new argument ("allocate=False") to claim we need to know what happens in these cases.

Same for the proposed new flag to allocated.

@meejah
Copy link
Member

meejah commented May 8, 2023

(Also: I really do want to ignore this until after Dilation improvements are completed as I don't think it's relevant to that, directly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants