-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Better handle control messages while editing the connector through UI (Part 1: API update) #20913
Comments
@sherifnada / @flash1293 is this front-end change something you can help us with? |
@evantahler Absolutely, this seems like an important change. Two questions about this:
|
Thanks @flash1293 !
If you'd like, we can split this up and Connector Ops could implement the backend change of returning whether the config was updated as part of |
Grooming Notes:
So for now, this ticket remains with Connector Ops - new story for @flash1293 coming soon! The technical path forward in the API is:
This comparison method handles cases where the config didn't save, we re-saved the same values, and other shenanigans |
Part 2 of this story is now here: #21041 and added to the Connector Extensibility backlog. @flash1293 can you please get this into your backlog for next sprint? |
@sherifnada I think the implementation part of this issue is on the connector ops team, once it's done we will take care of #21041. Could you confirm @evantahler ? |
Correct! |
@flash1293 The API changes have been merged in, and #21041 is unblocked |
Tell us about the problem you're trying to solve
#20894 introduced updating connector configuration in check commands when the connector emits a config control message. This is mainly used for supporting single-use refresh tokens in an OAuth implementation, but can also be used for config migrations.
If the
check
operation changed your configuration (whether due to token refresh or config migration), the values in the form would become outdated. Because the UI calls anupdate
after a successful check, the (non-secret) values updated by the control message would be reverted to those set on the form.This is mostly a problem in the case of a reauthenticating a connector that always refreshes tokens ("eager token refresh"), since the
check
will invalidate the credentials and the UI will save the invalid credentials again. But it also means we're reverting any other changes that may be happening.Describe the solution you’d like
We should:
check_connection_for_update
endpoint to return whether the configuration has changed as a result of the check. We can do this by comparing the provided config with the currently stored config after the check has completed.true
, don't issue theupdate
call (since something else updated the config) and show a message indicating to the user that the configuration has changed and they should reload the page.Describe the alternative you’ve considered or used
Instead of showing a message telling users to reload, we could return the config and update the frontend to reflect the new configuration, but this is a bit more complex and doesn't seem high priority right now.
The text was updated successfully, but these errors were encountered: