Skip to content
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

Add migrate-external-ids tool #1384

Merged
merged 2 commits into from
Feb 25, 2021
Merged

Conversation

smatting
Copy link
Contributor

@smatting smatting commented Feb 24, 2021

This pr adds tools/db/migrate-external-ids

This tool fills entries in the table spar.scim_external (introduced in #1359 and rreleased 2021-02-16) from table spar.scim_external_ids and brig.user. It is meant to be used in the migration from spar.scim_external_ids to spar.scim_external.

@smatting smatting requested a review from fisx February 24, 2021 15:46
@smatting
Copy link
Contributor Author

I tested locally with ~20 external ids created by the spar integration tests.
Tested:

  • migration. all external ids are inserted
  • dry-run doesn't insert any rows
  • brig user with missing team id is handled and reported at the end

tools/db/migrate-external-ids/README.md Show resolved Hide resolved

isDebug :: Debug -> Bool
isDebug Debug = True
isDebug NoDebug = False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to the type definition? (No strong opinion.)

tools/db/migrate-external-ids/src/Work.hs Outdated Show resolved Hide resolved
@fisx
Copy link
Contributor

fisx commented Feb 25, 2021

@smatting good to ship! feel free to ignore everything i write in the review, it's all nit-picks!

Co-authored-by: fisx <mf@zerobuzz.net>
@smatting smatting merged commit 414c3ea into develop Feb 25, 2021
@smatting smatting deleted the SQSERVICES-268-data-migration branch February 25, 2021 09:37
@arianvp arianvp mentioned this pull request Feb 26, 2021
arianvp added a commit that referenced this pull request Feb 26, 2021
## Bug fixes and other updates

* Pin kubectl image in sftd chart (#1383)
* Remove imagePullPolicy: Always for reaper chart (#1387)


## Internal changes

* Use mu-haskell to implement one initial federation request across backends (#1319)
* Add migrate-external-ids tool (#1384)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants