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

Goal import in production #231

Merged
merged 2 commits into from
Mar 12, 2021
Merged

Goal import in production #231

merged 2 commits into from
Mar 12, 2021

Conversation

rahearn
Copy link

@rahearn rahearn commented Mar 12, 2021

Description of change

  • Retrieve goal csv files from s3 bucket
  • Both command line flags are now required.
  • Adding await to the db close in this test seemed to fix my local issues with open handles so 🤞🏻

How to test

  1. Run db seeds locally
  2. Upload GranteeTTAPlanTest.csv to minio
  3. Run yarn import:goals:local -f GranteeTTAPlanTest.csv --region 14

Note: using the shorthand -r does not work because babel-node swallows the argument and tries to require the 14 module, which doesn't work

Issue(s)

Checklist

  • Meets issue criteria
  • Code tested
  • Meets accessibility standards (WCAG 2.1 Levels A, AA)
  • Documentation updated

Copy link
Collaborator

@kryswisnaskas kryswisnaskas left a comment

Choose a reason for hiding this comment

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

Looks good! Verified that the test file could be downloaded from minio and the goals were imported without errors.z
The R9 file worked also.

downloadFile.mockReset();
});
afterAll(async () => {
await db.sequelize.close();
Copy link
Collaborator

Choose a reason for hiding this comment

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

🎉

Copy link
Collaborator

@dcloud dcloud left a comment

Choose a reason for hiding this comment

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

This works as advertised. I uploaded GranteeTTAPlanTest.csv to minio, then ran the command. Where there where 4 goals (from a seeder), then there were 16 (and the new 12 were isFromSmartsheetTtaPlan = True). Reran it and there were still the same goals, so no duplicates.

@rahearn rahearn merged commit 008d2bd into main Mar 12, 2021
@rahearn rahearn deleted the goal-import-production branch March 12, 2021 20:46
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.

3 participants