-
Notifications
You must be signed in to change notification settings - Fork 31
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
Rename websocket notification channel URL path #537
Rename websocket notification channel URL path #537
Conversation
How does this handle the |
Looks like I misunderstood the issue. Breaking that requirement down:
I'm just a bit confused because I thought with the deprecation of Commands we would want to remove any mention of them. Are we waiting to do that until the 2.0 API is published and completely replaces the 1.0 API? |
It can just return the new path, as you've done. This is what clients are supposed to use to check what the notification channel URL is, so it should tell them what the newest/preferred place to go is. But, clients aren't required to do a GET on this endpoint before connecting - it's just there as a reference and the "correct" way to check where to connect to before opening a connection. The handler may as well be renamed while we're here, too.
Right. Even though we want to stop referring to the notification channel as a command channel, since that is now a misleading name, it should also be cheap and easy for us to still support clients that try to connect on the old path. If a redirect (ex. HTTP 301) can be used here then that's probably ideal.
The Commands removal definitely won't be going into |
On the other hand, since |
Thanks for the explanation, it cleared up any misconceptions I had. I think a |
@andrewazores (not sure if you get notified for comments on draft PRs) I'm almost done but had a few questions first:
|
Yes, I still get notified on drafts.
|
I've finished writing up the integration test; had a few difficulties extracting the HTTP status code from the thrown exception(s) so I settled with comparing the error message instead. |
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.
Looks good! Again, I will hold off on approving/merging this until there is a corresponding change in -web. Are you interested in taking a look at that yourself? It should be a pretty small patch.
Sure, I can do that. It looks like Were there any other corresponding changes you had in mind? |
No, that's all that comes to mind. |
web-client change is merged. Please update this PR with a commit bumping the submodule version again, and then I'll approve and merge this too. |
Just double-checking, but the merge conflict is because the web-client is pointing to a different commit than the one on the main branch, right? |
Yes, something like that. I think the easiest way to resolve it would be to `git fetch upstream`, then `git rebase -i upstream/main` and drop your commit where you updated the web-client commit. This should remove the conflict. Then you can update the web-client and commit that again, and hopefully that would apply cleanly.
|
…th over command path
… channel with the notification channel
…ng -web PR changes
Looks like it worked. I guess in the future it's best to rebase at the end to prevent merge conflicts? I've only been rebasing my branches right before opening the PR. |
Usually you don't need to do a rebase before merging - if you do, you'll see the merge conflict status like it was here. This time it only happened because git couldn't figure out how to apply the different changes to the web-client from both of the changed branches. If your PR can be replayed on top of main, and there are either no conflicts or git can figure out how to resolve them automatically, then the pre-merge rebase is typically unnecessary. However, for a submodule commit hash change, there's no way to figure out how to merge those two changes - it has to just be one or the other, so we see the conflicting status.
|
Change the path from
api/v1/command
toapi/v1/notifications
since the websocket channel is now used for one-way notifications instead of commands.Fixes #478