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

Backfill synonym slugs (DO NOT MERGE) #2785

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Courey
Copy link
Contributor

@Courey Courey commented Dec 13, 2024

DO NOT MERGE!!! for review only
closes #2784

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.

Project coverage is 6.04%. Comparing base (909af08) to head (c7d450e).

Files with missing lines Patch % Lines
app/backfill-synonym-slugs.ts 0.00% 25 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #2785      +/-   ##
========================================
- Coverage   6.08%   6.04%   -0.04%     
========================================
  Files        171     172       +1     
  Lines       4340    4365      +25     
  Branches     476     479       +3     
========================================
  Hits         264     264              
- Misses      4074    4099      +25     
  Partials       2       2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +8 to +12
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)
}
}
Copy link
Member

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.

Comment on lines +16 to +18
const db = await tables()
const client = db._doc as unknown as DynamoDBDocument
const TableName = db.name('synonyms')
Copy link
Member

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.

@lpsinger lpsinger changed the title DO NOT MERGE Backfill synonym slugs (DO NOT MERGE) Dec 16, 2024
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.

backfill existing synonyms to add slugs
2 participants