-
Notifications
You must be signed in to change notification settings - Fork 45
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
Backfill synonym slugs (DO NOT MERGE) #2785
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2785 +/- ##
========================================
- Coverage 6.08% 5.88% -0.20%
========================================
Files 171 172 +1
Lines 4340 4365 +25
Branches 476 478 +2
========================================
- Hits 264 257 -7
- Misses 4074 4106 +32
Partials 2 2 ☔ View full report in Codecov by Sentry. |
app/backfill-synonym-slugs.ts
Outdated
function* chunks<T>(arr: T[], n: number): Generator<T[], void> { | ||
for (let i = 0; i < arr.length; i += n) { | ||
yield arr.slice(i, i + n) | ||
} | ||
} |
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.
You could use lodash's chunk here.
app/backfill-synonym-slugs.ts
Outdated
const db = await tables() | ||
const client = db._doc as unknown as DynamoDBDocument | ||
const TableName = db.name('synonyms') |
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.
Architect's service discovery will not work in this context. You'll need to look up the name of the table using Amazon SSM.
DO NOT MERGE!!! for review only
closes #2784