Skip to content

fix: concurrent upload to strapi by content type#337

Open
bosbaber wants to merge 2 commits into
stagingfrom
stephan/web-163
Open

fix: concurrent upload to strapi by content type#337
bosbaber wants to merge 2 commits into
stagingfrom
stephan/web-163

Conversation

@bosbaber

Copy link
Copy Markdown
Contributor

Summary

This PR proposes an optimisation to improve strapi sync and dry run actions through concurrency.

Checks

  • pnpm run format
  • pnpm run lint

PR Checklist

  • PR title follows Conventional Commits (e.g. feat: ..., fix: ...)
  • Linked issue included
  • Scope is focused (target ~10-20 files when possible)
  • Screenshots for UI changes (if applicable)

@netlify

netlify Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploy Preview for interledger-org-v5 ready!

Name Link
🔨 Latest commit a2761da
🔍 Latest deploy log https://app.netlify.com/projects/interledger-org-v5/deploys/6a2c104152e3e70008fc2a9a
😎 Deploy Preview https://deploy-preview-337--interledger-org-v5.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@bosbaber bosbaber temporarily deployed to strapi-staging June 12, 2026 12:43 — with GitHub Actions Inactive
@bosbaber bosbaber temporarily deployed to strapi-staging June 12, 2026 13:57 — with GitHub Actions Inactive
@bosbaber bosbaber self-assigned this Jun 12, 2026
@bosbaber bosbaber marked this pull request as ready for review June 12, 2026 14:00
Copilot AI review requested due to automatic review settings June 12, 2026 14:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes the Strapi MDX sync script by running per-content-type sync work concurrently and improves dry-run logging for upload alt-text updates, aiming to reduce overall sync/dry-run duration.

Changes:

  • Run syncContentType for all configured content types concurrently and aggregate results afterward.
  • Improve dry-run log output for upload alt-text updates to show the target alt value and entry slug context.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
cms/scripts/sync-mdx/syncCoordinator.ts Runs content-type sync in parallel via Promise.all and aggregates per-type results.
cms/scripts/sync-mdx/mdxTransformer.ts Improves dry-run logging for upload alt text updates.

Comment on lines 309 to 313
if (dryRun) {
console.log(
` 🏷️ [DRY-RUN] Would update alt text for upload #${id} from "${pathSlug}".`
` 🏷️ [DRY-RUN] Would update alt text for upload #${id} to "${alt ?? 'null'}" (entry: "${pathSlug}").`
)
updatedAltIds.set(id, alt)
Comment on lines +150 to +152
console.error(
`\n❌ Error syncing ${contentType}: ${(error as Error).message}`
)
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.

2 participants