feat(extractEntries, extractItems, schemaMapper): enhance UID generat…#1110
feat(extractEntries, extractItems, schemaMapper): enhance UID generat…#1110aishwarya-cstk wants to merge 5 commits into
Conversation
…ion and filtering logic for WordPress migration
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
There was a problem hiding this comment.
Pull request overview
This PR updates the WordPress migration pipeline to generate deterministic, iteration-stable UIDs (avoiding Gutenberg clientId churn) and to filter extracted entries more aggressively by post type/status to reduce unsupported or irrelevant processing.
Changes:
- Introduces
stableSuffix()inschemaMapperand replacesclientId-based UID fragments across multiple block mappings. - Updates
extractItemsto align modular block UID generation with the new stable suffix logic. - Updates
extractEntriesto (a) namespace source UIDs for authors/terms and (b) filter items by allowed WordPress post statuses.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| upload-api/migration-wordpress/libs/schemaMapper.ts | Adds stable UID suffix generation and replaces clientId-derived UID composition across many block types. |
| upload-api/migration-wordpress/libs/extractItems.ts | Switches modular block UID generation to use stableSuffix() consistently with schema mapping. |
| upload-api/migration-wordpress/libs/extractEntries.ts | Adds allowed-status filtering and adjusts source UID generation/author mapping to support stable namespaced UIDs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…s, and schemaMapper
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
🔗 Jira Ticket
MIGRATION-XXXX
📋 PR Type
📝 Description
This PR enhances the WordPress migration pipeline by improving UID generation and filtering logic across the extraction and schema mapping flow. These changes help ensure only relevant WordPress content is processed while generating stable and unique UIDs for migrated entries.
What changed?
extractEntriesto produce consistent and unique entry identifiers.extractItemsto process only supported WordPress items.schemaMapperto work with the new UID generation and filtering behavior.Why?
The previous implementation could process unsupported items and generate inconsistent UIDs in certain scenarios. This enhancement improves migration accuracy, prevents duplicate or unstable entry identifiers, and ensures cleaner data mapping to Contentstack.
🧪 Testing
📸 Screenshots / Logs (if applicable)
N/A
✅ Checklist