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 2 commits 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 36 lines in your changes missing coverage. Please review.

Project coverage is 5.88%. Comparing base (909af08) to head (2facdd6).
Report is 69 commits behind head on main.

Files with missing lines Patch % Lines
app/backfill-synonym-slugs.js 0.00% 36 Missing ⚠️
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.
📢 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