-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI for editing mirror parameters (#1190)
`IdleTimeoutSeconds` and `SyncBatchSize` can be changed anytime, tables can only be added IF mirror is paused, otherwise the button will be disabled. Additional changes for this: 1) moved CDC dynamic properties to the main signal selector and blocking on the main signal selector while paused, so we can receive mirror edits even while paused. 2) pass `TableNameSchemaMapping` from state always to `NormalizeFlow` in case new tables were added. 3) added a new property to the tables component to disable selecting of tables already in the mirror. There is a bug where tables added to the mirror dynamically will not reflect in the status screen, will be fixed in a follow up PR. `TableMappings` Needs to be stored in state as well.
- Loading branch information
1 parent
99fa32e
commit 91a2643
Showing
12 changed files
with
347 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { | ||
MirrorStatusRequest, | ||
MirrorStatusResponse, | ||
} from '@/grpc_generated/route'; | ||
import { GetFlowHttpAddressFromEnv } from '@/rpc/http'; | ||
|
||
export async function POST(request: Request) { | ||
const body: MirrorStatusRequest = await request.json(); | ||
const flowServiceAddr = GetFlowHttpAddressFromEnv(); | ||
console.log('/mirrors/state: req:', body); | ||
try { | ||
const res: MirrorStatusResponse = await fetch( | ||
`${flowServiceAddr}/v1/mirrors/${body.flowJobName}`, | ||
{ cache: 'no-store' } | ||
).then((res) => { | ||
return res.json(); | ||
}); | ||
|
||
return new Response(JSON.stringify(res)); | ||
} catch (e) { | ||
console.error(e); | ||
} | ||
} |
Oops, something went wrong.