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

Closes #2083: Migrate legacy accounts away from wiki #2096

Merged
merged 1 commit into from
Apr 9, 2021

Conversation

chrispinkney
Copy link
Contributor

@chrispinkney chrispinkney commented Apr 8, 2021

Co-authored-by: Josue [email protected]

Issue This PR Addresses

Closes #2083

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

This tool fetches legacy users from the planet feed wiki list, parses them, and dumps to a JSON file for later use (in the parsing service).

How to test

  1. gh pr checkout 2096
  2. cd src\api\users\tools\migrate
  3. npm install
  4. npm start

The users are dumped to src\api\users\tools\migrate\legacy_users.json

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

c3ho
c3ho previously requested changes Apr 8, 2021
src/api/users/tools/migrate/migrate.js Outdated Show resolved Hide resolved
Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

I wrote something like this to check for dead feeds too, in case it's useful:

https://github.com/humphd/planet-clean

@@ -0,0 +1,68 @@
const fetch = require('node-fetch');
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this live in tools/ vs. src/api/users/tools?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@manekenpix and I had some discussion about this too, we weren't sure so we decided to leave it here and see what others thought.

It originally was made to help with testing the paginated GET route, but now it instead dumps users to a json file so perhaps tools/ is the better place after all.

src/api/users/tools/migrate/migrate.js Outdated Show resolved Hide resolved
tools/migrate/migrate.js Outdated Show resolved Hide resolved
humphd
humphd previously approved these changes Apr 9, 2021
* Initial implementation of planet feed wiki migration tool
* Removed satellite & migrated to console.log (and friends) instead
* Added README, review fixes
* Refactor README to be more a-temporal
* Change feeds into string
* Removed env.local
@chrispinkney chrispinkney merged commit da076a4 into Seneca-CDOT:master Apr 9, 2021
@chrispinkney chrispinkney deleted the issue-2083 branch April 22, 2021 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate legacy accounts away from wiki
5 participants