Repository navigation
feat(migrate): add runs and undo, and continue a stopped import #515
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
Merged
Merged
Changes from all commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
73553e3
feat(migrate): add runs and undo, and continue a stopped import
royanger 6d37212
test(migrate): undo the e2e import and check the users are gone
royanger 0183073
docs(changeset): Add clerk migrate runs and undo, and continue a stop…
royanger 9dfe6c3
fix(migrate): lock the import run while undo deletes its users
royanger a7ffea0
fix(migrate): refuse an undo when another undo finished during its pr…
royanger 0a9ea71
docs(migrate): say undo skips consent when no users remain
royanger 3e949a9
fix(migrate): check a continued run again once its lock is held
royanger 926b9a5
fix(migrate): count an adopted user against dev headroom once
royanger 6263cb8
fix(migrate): refuse to start over when Clerk can't name a resumed ru…
royanger 7b25fd5
test(migrate): check undo's users are gone by Clerk's not-found answer
royanger 92c8891
fix(migrate): adopt an in-flight user only if Clerk created it during…
royanger 84d5103
fix(migrate): pause every undo delete on a 429, not just the one that…
royanger 19a6a2c
fix(migrate): check for an unfinished undo again once a continue hold…
royanger f20d670
fix(migrate): still check other users against an adopted user's ident…
royanger 1762e5e
fix(migrate): adopt an in-flight user only if it carries the run's ma…
royanger 1a80a39
fix(migrate): never reject an adopted user, nor count it against the …
royanger 76e0d8e
docs(migrate): say a cut-off create is redone only when nothing matches
royanger 3d39832
refactor(migrate): drop the adopted-user guard the checks made dead w…
royanger 595e4a5
fix(migrate): say a plain re-run sends the users a quota stop left, n…
royanger 258fdd4
fix(migrate): record a created user with its pending attaches in one …
royanger 8f53c88
fix(migrate): still reject a second record with an adopted user's sou…
royanger 83a0a1a
docs(migrate): say the run's marker replaces one the source already c…
royanger fc70e18
fix(migrate): reject an earlier record that claims an identifier an a…
royanger 798b486
fix(migrate): let adopted users claim their identifiers before the fi…
royanger e643e32
fix(migrate): have a dry run say the run it would start or continue
royanger 5f99502
fix(migrate): have undo --yes refuse once users have signed in, unles…
royanger 98ca4d7
docs(changeset): say every imported user carries the run marker in pr…
royanger 41912cf
fix(migrate): refuse an undo whose preview another undo overtook
royanger 3d5ae69
fix(migrate): keep the runs folder and target in every suggested migr…
royanger 927ac90
fix(migrate): report a continued run with nothing left as finished in…
royanger 1583996
fix(migrate): print undo's import as undone, recheck sign-ins before …
royanger 44a4aa3
fix(migrate): recheck undo's sign-ins by user, not count, and fail a …
royanger 1572605
fix(migrate): print undo's preview under --json when another process …
royanger 9614c1e
fix(migrate): print undo's preview once for anything that stops it af…
royanger 9e63b93
fix(migrate): raise a stalled lookup as a CliError, log the run store…
royanger 97eb4d3
refactor(migrate): share the unfinished-undo lookup, the undo command…
royanger 11aff60
fix(migrate): count attach-only users in the import's progress, and l…
royanger 325d2ab
fix(migrate): list the same runs folder in run hints, and suggest the…
royanger b3726b0
refactor(migrate): one JSON printer for undo, one scan in findResume,…
royanger 632ac20
docs(migrate): list --include-signed-in in the synopsis, keep the con…
royanger bb0adf4
fix(migrate): suggest a run's continue only when importing its file a…
royanger 98be418
refactor(migrate): one runs-command builder, findResume through openU…
royanger dba20fc
fix(migrate): share findResume's file filter with runs <id>, and leav…
royanger 731e04c
fix(migrate): carry the environment for a stand-in --app run, and sha…
royanger d3f4e24
fix(migrate): record the instance --app or a linked profile names whe…
royanger 6316d77
fix(migrate): carry --instance for a linked-profile run, and keep the…
royanger 363a18f
fix(migrate): carry every key source's target in runs <id>, from one …
royanger 6593740
fix(migrate): name the key for a CLERK_SECRET_KEY run, and build ever…
royanger 77aa3d7
fix(migrate): carry the key a run's latest attempt used, including a …
royanger 095e529
fix(migrate): carry the key for a stand-in run continued with --app, …
royanger 45ba726
fix(migrate): show unconfirmed creates and identifiers left to attach…
royanger c962ad5
fix(migrate): offer the continue for any partial import, and count a …
royanger 95cad7f
fix(migrate): offer no continue when only --require-password skips ar…
royanger 35570f3
fix(migrate): point --require-password's skipped users at the re-run …
royanger 7f16165
fix(migrate): offer the continue when --new-run refuses a partial run…
royanger 46a2b10
fix(migrate): offer the refusal's continue only when findResume would…
royanger 299cb03
fix(migrate): count an unfinished run as having users to retry
royanger 5292ffe
fix(migrate): answer the open #515 review comments
royanger 0897892
fix(migrate): leave out runs <id>'s continue when the run's flags can…
royanger cb57e05
docs(migrate): say an unfinished run counts as having users to retry
royanger 5e05934
fix(migrate): count attach-only users as created, show unsent users i…
royanger 4eb8299
fix(migrate): stop suggesting a continue for skips the same file brin…
royanger 74e7b96
fix(migrate): don't offer --allow-partial when a refusal rejects ever…
royanger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,7 @@ | ||
| --- | ||
| "clerk": minor | ||
| --- | ||
|
|
||
| Add `clerk migrate runs` and `clerk migrate undo`, and let a re-run of `clerk migrate import` continue where a stopped one left off. `clerk migrate` is still experimental and needs `CLERK_EXPERIMENTAL=migrate`. | ||
|
|
||
| Every user an import creates now carries `clerkMigrateRun` (the run's ID) in its `private_metadata`, replacing any value the source had under that key. A re-run reads it to adopt a user whose create was cut off. Nothing removes it afterwards, and your backend can read it. | ||
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.