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

Fix integrations script #1352

Merged
merged 4 commits into from
Dec 16, 2024
Merged

Fix integrations script #1352

merged 4 commits into from
Dec 16, 2024

Conversation

delucis
Copy link
Member

@delucis delucis commented Dec 16, 2024

This PR fixes our script which updates integrations based on the npm registry.

We use a search endpoint in the npm registry API to look up integrations with one of our keywords. Previously we did this with a single call combining keywords into the query parameter: text=keyword:astro-component,withastro,astro-integration.

Some time around November 30, the response to this query changed. It looks like previously npm treated the list of keywords as “one of these” (i.e. OR), but is now treating it as “all of these” (i.e. AND). This meant our query only returned the ~100 packages that include all three keywords and the script tried to delete all the others we knew about.

This PR updates the script to run the search query separately for each keyword. This caused some “too many request” errors (at least running locally), so I’ve also added some retry logic to avoid that.

Browser Test Checklist

n/a — data change only

Copy link

netlify bot commented Dec 16, 2024

Deploy Preview for astro-www-2 ready!

Name Link
🔨 Latest commit bf67e65
🔍 Latest deploy log https://app.netlify.com/sites/astro-www-2/deploys/676031a8ada7950008ddeb2f
😎 Deploy Preview https://deploy-preview-1352--astro-www-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
5 paths audited
Performance: 99 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 90 (🔴 down 2 from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Just a thanks for catching and fixing this!

@delucis delucis merged commit a158ad7 into main Dec 16, 2024
6 checks passed
@delucis delucis deleted the chris/patch-up-integrations-script branch December 16, 2024 15:01
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