-
Notifications
You must be signed in to change notification settings - Fork 2
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
Depreciate data-plane gateway authorization for shard and journal information #1264
Depreciate data-plane gateway authorization for shard and journal information #1264
Conversation
@@ -29,6 +29,7 @@ const baseColumns = [ | |||
'spec_type', | |||
'updated_at', | |||
'last_pub_id', | |||
'shard_template_id', |
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.
🎉 🎉 🎉 🎉 🎉 🎉
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.
Future change (cause my branch is not done yet) but I'll probably pull this filter into the entity-utils
file.
brokerAddress && | ||
brokerToken |
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.
I really wish typescript was smart enough to not need this.
dataPlaneListResponse.result.journals && | ||
dataPlaneListResponse.result.journals.length > 0 | ||
? dataPlaneListResponse.result.journals | ||
: [], |
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.
If we know that the dataPlaneListResponse.result.journals
is always an array then I think we could just always return it. Cause even if it is an empty array then that is basically what we're defaulting here.
) { | ||
await refreshAuthToken( | ||
session.access_token, | ||
collectionName, |
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.
This is fine for now... but we probably don't want to use the collectionName
from the outer scope. Rather I think we can read it from the swr
config that should be getting passed in to the onError
.
taskSelector, | ||
'ShardsList' | ||
); | ||
const shardPromises = catalogNames.map(async (name) => { |
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.
I think we need to limit this and make sure there is some limits of how many will be called all at once.
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.
Lgtm
Issues
The issues directly below are advanced by this PR:
estuary/flow#1627
Changes
1627
Integrate the following control-plane APIs:
/authorize/user/task
and/authorize/user/collection
.Use the dynamic broker address and authorization token generated by the authorize collection, control-plane API to retrieve the journal data for data preview. Previously, the journal client was used to source this information.
Create a journal store to house journal state independent of the ops logs table.
Remove the warning that displayed on the Logs tab of the Details page in a local environment.
Tests
Manually tested
Validate that shard information can be fetched for display on the entity tables and the Details page of a given entity.
Validate that the authorize task, control-plane API is not called for collections.
Validate that journal information can be fetched for display in the ops logs table and in the data preview section of the Overview tab.
Automated tests
N/A
Playwright tests ran locally
Screenshots
N/A