-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
VTAdmin(web): Initiate MoveTables workflow create screen #16707
VTAdmin(web): Initiate MoveTables workflow create screen #16707
Conversation
Signed-off-by: Noble Mittal <[email protected]>
Signed-off-by: Noble Mittal <[email protected]>
Signed-off-by: Noble Mittal <[email protected]>
Signed-off-by: Noble Mittal <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Noble Mittal <[email protected]>
Signed-off-by: Noble Mittal <[email protected]>
ae379cc
to
03303b1
Compare
Signed-off-by: Noble Mittal <[email protected]>
Signed-off-by: Noble Mittal <[email protected]>
Signed-off-by: Noble Mittal <[email protected]>
Signed-off-by: Noble Mittal <[email protected]>
Signed-off-by: Noble Mittal <[email protected]>
03303b1
to
0c66429
Compare
Signed-off-by: Noble Mittal <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16707 +/- ##
==========================================
- Coverage 69.52% 69.49% -0.03%
==========================================
Files 1568 1568
Lines 202442 202467 +25
==========================================
- Hits 140741 140701 -40
- Misses 61701 61766 +65 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Noble Mittal <[email protected]>
Good start, tested a couple of happy flows and error checks and it worked well! Some changes needed: Many of the controls are way bigger than they need to. We need to use multiple columns, to use space more efficiently. Also we should move the rarely used items to an Advanced section. See attached paper sketch for possibilities. Misc:
|
Signed-off-by: Noble Mittal <[email protected]>
@@ -54,7 +65,7 @@ const Dropdown: React.FC<DropdownProps> = ({ children, dropdownButton, position | |||
<Menu.Items | |||
className={`py-2 z-10 origin-top-right absolute ${ | |||
positions[position as string] || positions.default | |||
} md:-left-3full mt-2 w-max rounded-lg shadow-lg bg-white ring-1 ring-black ring-opacity-5 divide-y divide-gray-100 focus:outline-none`} | |||
} mt-2 w-max rounded-lg shadow-lg bg-white ring-1 ring-black ring-opacity-5 divide-y divide-gray-100 focus:outline-none`} |
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.
Removed md:-left-3full
from here, not sure why this was added. Even for "bottom-right" position, the dropdown menu was rendered at "bottom-left". Please let me know if this was done intentionally, and this change needs to be reverted.
@@ -22,7 +22,7 @@ const WorkflowActions: React.FC<WorkflowActionsProps> = ({ refetchWorkflows, key | |||
|
|||
return ( | |||
<div className="w-min inline-block"> | |||
<Dropdown dropdownButton={Icons.info} position="bottom-right"> |
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.
We don't need position="bottom-right"
, as we want to render it on "bottom-left". But, with the dropdown fix we don't need to mention a position as by default dropdown menu renders on "bottom-left"
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.
Nice work! Requested a couple of minor verbiage changes.
web/vtadmin/src/components/routes/createWorkflow/CreateMoveTables.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Noble Mittal <[email protected]>
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 awesome! ❤️ I played around with it for a bit, my only thoughts are:
- As Rohit noted, I think it makes sense to have a hidden (with expand option) for advanced options. And it should cover all of the remaining flags (not sure why e.g. we chose source time zone above others):
Flags:
-a, --all-cells Copy table data from any existing cell.
--all-tables Copy all tables from the source.
--atomic-copy (EXPERIMENTAL) A single copy phase is run for all tables from the source. Use this, for example, if your source keyspace has tables which use foreign key constraints.
--auto-start Start the workflow after creating it. (default true)
-c, --cells strings Cells and/or CellAliases to copy table data from.
--defer-secondary-keys Defer secondary index creation for a table until after it has been copied.
--exclude-tables strings Source tables to exclude from copying.
-h, --help help for create
--no-routing-rules (Advanced) Do not create routing rules while creating the workflow. See the reference documentation for limitations if you use this flag.
--on-ddl string What to do when DDL is encountered in the VReplication stream. Possible values are IGNORE, STOP, EXEC, and EXEC_IGNORE. (default "IGNORE")
--remove-sharded-auto-increment If moving the table(s) to a sharded keyspace, remove any auto_increment clauses when copying the schema to the target as sharded keyspaces should rely on either user/application generated values or Vitess sequences to ensure uniqueness. (default true)
--shards strings (EXPERIMENTAL: Multi-tenant migrations only) Specify that vreplication streams should only be created on this subset of target shards. Warning: you should first ensure that all rows on the source route to the specified subset of target shards using your VIndex of choice or you could lose data during the migration.
--source-keyspace string Keyspace where the tables are being moved from.
--source-shards strings Source shards to copy data from when performing a partial MoveTables (experimental).
--source-time-zone string Specifying this causes any DATETIME fields to be converted from the given time zone into UTC.
--stop-after-copy Stop the workflow after it's finished copying the existing rows and before it starts replicating changes.
--tables strings Source tables to copy.
--tablet-types strings Source tablet types to replicate table data from (e.g. PRIMARY,REPLICA,RDONLY).
--tablet-types-in-preference-order When performing source tablet selection, look for candidates in the type order as they are listed in the tablet-types flag. (default true)
--tenant-id string (EXPERIMENTAL: Multi-tenant migrations only) The tenant ID to use for the MoveTables workflow into a multi-tenant keyspace.
- It would be great if we could have a hover over tooltip for each field that shows the same help output we have for the command-line flags. Source time zone is a good example as it's not clear at all what that means and why you might want to use it.
These improvements can be made in follow-up work though as this is just the initial work.
Thank you for this!
Agree with your comments @mattlord. cc @beingnoble03 We just wanted to add a few flags now to avoid complicating the UI design. The aim of the initial PRs in vtadmin that Noble is working on is to get all basic functionality up with most frequently used features. Once that is done it will be easy for him, us or any one interested in OSS to quickly iterate/enhance since all the front-end and API plumbing will be ready. Maybe once we have the first phase completed we can come up with UI ideas for improving each of the screens. Good idea about the help text. It will be good if we can figure out a way to keep the help text in a common place so that we don't need have a redundant copy in vtadmin. We can start with cut/paste for now, so we are not blocked, and once we figure out a better way, migrate to that. |
Signed-off-by: Noble Mittal <[email protected]>
Signed-off-by: Noble Mittal <[email protected]>
@rohit-nayak-ps @mattlord Added the help text tooltips for the fields. Please have a look. Will add the other workflow options in follow-ups. |
Signed-off-by: Rohit Nayak <[email protected]>
Looks perfect!
Sounds good. Thanks! |
Description
This PR adds a MoveTables workflow create screen to the VTAdmin. Borrows API changes from #16690.
Related Issue(s)
Screenshots
Checklist
Deployment Notes